]>
Commit | Line | Data |
---|---|---|
4e2bdb62 SW |
1 | <html> |
2 | <head> | |
3 | <title>Box by quadstrip</title> | |
4 | <script type="text/javascript" src="nt3d.js"></script> | |
5 | <script type="text/javascript"> | |
6 | function box_by_quadstrip(size_as_string) { | |
7 | var size = parseFloat(size_as_string); | |
8 | var origin = [0, 0, 0 ]; | |
9 | var x = [size, 0, 0 ]; | |
10 | var y = [0, size, 0 ]; | |
11 | var z = [0, 0, size]; | |
12 | var xy = [size, size, 0 ]; | |
13 | var xz = [size, 0, size]; | |
14 | var yz = [0, size, size]; | |
15 | var xyz = [size, size, size]; | |
16 | return [].concat( | |
17 | nt3d.quad(origin, y, xy, x), // bottom | |
18 | nt3d.quad(z, xz, xyz, yz), // top | |
19 | nt3d.closed_quadstrip([origin, z, y, yz, xy, xyz, x, xz])); | |
20 | } | |
21 | var params = [["Size", 1]]; | |
22 | </script> | |
23 | </head> | |
24 | <body onload="nt3d.framework(box_by_quadstrip, params)"> | |
25 | <h1>Box by quadstrip</h1> | |
26 | <p>Make a box with a top, bottom, and a quadstrip for the sides.</p> | |
27 | </body> | |
28 | </html> |