-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
72 lines (67 loc) · 3.03 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
<!DOCTYPE html>
<html>
<head>
<script
src="https://code.jquery.com/jquery-3.1.1.slim.min.js"
integrity="sha256-/SIrNqv8h6QGKDuNoLGA4iret+kyesCkHGzVUUV0shc="
crossorigin="anonymous"></script>
<!-- Twitter Bootstrap -->
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<div class="container">
<div class="row center-block">
<h1>Marching Cubes</h1>
<p>
Marching cubes is an algorithm which transforms a shape format into a polygon format. The animation below demonstrates the different stages of the marching cube animation in 2D.
</p>
<p>
The goal for this site is to provide a demonstration which illistrates how the marching cubes algorithm works.
</p>
<h3>Demo</h3>
<p>Instructions: Use your mouse to draw something in the box below. Then, press "Activate Marching Cubes" to see the algorithm trace it's outline.</p>
<div id="sketch">
<canvas id="paint" width="200px" height="200px" style="border:1px solid #000000;"></canvas>
<div style="padding:5px;">
<button id="clickMe" type="submit" class="btn btn-primary" />Activate Marching Cubes</button>
</div>
</div>
<h3>2D Algorithm</h3>
<ol>
<li>A Shape is created</li>
<li>Overlay a grid on the shape</li>
<li>Select the verticies inside the shape</li>
<li>Generate mid-points based on vertex cases</li>
<li>Draw lines between the generated points</li>
</ol>
<h3>Challenges</h3>
<ul>
<li>Detection of line intersection</li>
<li>Determining the vertex cases</li>
</ul>
</div>
<div class="row center-block">
<h3>
Bibliography
</h3>
<p>
<a href="http://www.cs.carleton.edu/cs_comps/0405/shape/marching_cubes.html">
Marching Cubes Paper</a>
</p>
</div>
</div>
<script type="text/javascript" src="marchingCubes.js">
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-88757682-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>