-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
78 lines (76 loc) · 1.85 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<head>
<title>Thar be Dragons!</title>
<style>
body {
background: black;
}
svg {
background: #121;
cursor: pointer;
}
p {
color: #bbb;
}
a:link, a:visited {
color: #595;
}
.plug, .instructions {
color: #aa1;
}
.container {
width: 800px;
display: block;
margin-left: auto;
margin-right: auto;
}
#draw-here {
display: inline-block;
vertical-align: top;
margin: 5px;
width: 550px;
height: 500px;
}
#samples {
display: inline-block;
vertical-align: top;
}
.sample {
padding: 5px;
}
.sample-svg {
fill: #252;
text-anchor: end;
width: 200px;
height: 85px;
}
.sample-svg--hovered {
fill: #5f5;
}
</style>
</head>
<body>
<div class='container'>
<div>
<p>Dragon curves are a family of fractal curves. By iterating a simple
substitution rule over and over, complex and interesting patterns emerge.
More info can be found on <a
href='http://en.wikipedia.org/wiki/Dragon_curve'>Wikipedia</a>.</p> <p>This
page is a work in progress. Note that generating a curve of more than
10-15 iterations will be hard on your computer, and may crash your
browser.</p>
<p class='instructions'>Click inside the canvas on the left to perform one
iteration.<br>
Click any of the generation rules to the right to reset the
canvas with that rule.</p>
</div>
<div>
<div id='draw-here'></div>
<div id='samples'></div>
</div>
<div>
<p class='plug'>Made by <a href='https://www.github.com/mziwisky'>Mike Ziwisky</a> during a dragon curve obsession</p>
</div>
</div>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src='dragon.js'></script>
</body>