-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
130 lines (107 loc) · 2.56 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<h1>
Random Non-Intersecting* Polygon Generator
</h1>
<p>
* most of the time
</p>
<div id="container">
<div id="svg-holder"></div>
<form>
<label>
Threshold: <span class="val"></span>
<input
type="range"
min="0"
max="1"
step="0.01"
value="0.24"
data-controls="threshold"
/>
</label>
<label>
Concavity: <span class="val"></span>
<input
type="range"
min="1"
max="50"
value="10"
data-controls="concavity"
/>
</label>
<label>
Noise Zoom: <span class="val"></span>
<input
type="range"
min="1"
max="300"
value="180"
step="5"
data-controls="resolution"
data-should-regenerate=true
/>
</label>
<label>
Vignette: <span class="val"></span>
<input
type="range"
min="0"
max="1000"
value="850"
data-controls="vignette"
data-should-regenerate=true
/>
</label>
<label>
Simplify: <span class="val"></span>
<input
type="range"
min="0"
max="10"
value="10"
data-controls="simplify"
/>
</label>
<label>
Rectilinear
<input
type="checkbox"
data-controls="rectilinear"
/>
</label>
<label>
Seed
<input
type="text"
id="seed"
data-controls="seed"
data-should-regenerate=true
>
</label>
<button
id="regen"
>
Regenerate Seed
</button>
</form>
<textarea id="output"></textarea>
</div>
<div>
<h2>Notes</h2>
<ul>
<li>Rectilinear mode will probably cause intersections</li>
<li>Simplification will maybe cause intersections</li>
<li>Best to decrease threshold as you increase the noise zoom</li>
</ul>
<p>
by <a href="https://samjbrenner.com">sam brenner</a> / <a href="https://github.com/sambrenner/random-nonintersecting-polygons">view source</a>
</p>
</div>
<script src="index.js"></script>
</body>
</html>