3 <title>Box by trianglefan
</title>
4 <script type=
"text/javascript" src=
"nt3d.js"></script>
5 <script type=
"text/javascript">
6 function box_by_trianglefan(size) {
7 var origin = [
0,
0,
0 ];
11 var xy = [size, size,
0 ];
12 var xz = [size,
0, size];
13 var yz = [
0, size, size];
14 var xyz = [size, size, size];
16 nt3d.closed_trianglefan([origin, x, xz, z, yz, y, xy]),
17 nt3d.closed_trianglefan([xyz, yz, z, xz, x, xy, y]));
19 var params = [["Size",
1]];
22 <body onload=
"nt3d.framework(box_by_trianglefan, params)">
23 <h1>Box by trianglefan
</h1>
24 <p>Make a box with two triangle fans from opposite corners.
</p>