Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
MUR Drupal
d3-library
Commits
7c8abc09
Commit
7c8abc09
authored
Dec 19, 2012
by
Mike Bostock
Browse files
Remote delaunay example.
Replaced by <
http://bl.ocks.org/4341156
>.
parent
c9629d47
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/delaunay/delaunay.html
deleted
100644 → 0
View file @
c9629d47
<!DOCTYPE html>
<meta
charset=
"utf-8"
>
<title>
Delaunay Triangulation
</title>
<script
src=
"../../d3.js"
></script>
<style>
@import
url("../../lib/colorbrewer/colorbrewer.css")
;
path
{
stroke
:
#000
;
stroke-width
:
.5px
;
}
</style>
<body>
<script>
var
width
=
960
,
height
=
500
;
var
vertices
=
d3
.
range
(
500
).
map
(
function
(
d
)
{
return
[
Math
.
random
()
*
width
,
Math
.
random
()
*
height
];
});
var
svg
=
d3
.
select
(
"
body
"
)
.
append
(
"
svg
"
)
.
attr
(
"
width
"
,
width
)
.
attr
(
"
height
"
,
height
)
.
attr
(
"
class
"
,
"
PiYG
"
);
svg
.
append
(
"
g
"
)
.
selectAll
(
"
path
"
)
.
data
(
d3
.
geom
.
delaunay
(
vertices
))
.
enter
().
append
(
"
path
"
)
.
attr
(
"
class
"
,
function
(
d
,
i
)
{
return
"
q
"
+
(
i
%
9
)
+
"
-9
"
;
})
.
attr
(
"
d
"
,
function
(
d
)
{
return
"
M
"
+
d
.
join
(
"
L
"
)
+
"
Z
"
;
});
</script>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment