3 <title>Box by faces
</title>
4 <script type=
"text/javascript" src=
"nt3d.js"></script>
5 <script type=
"text/javascript">
6 function box_by_faces(size_as_string) {
7 var size = parseFloat(size_as_string);
8 var origin = [
0,
0,
0 ];
10 var y = [
0, size,
0 ];
12 var xy = [size, size,
0 ];
13 var xz = [size,
0, size];
14 var yz = [
0, size, size];
15 var xyz = [size, size, size];
17 nt3d.quad(origin, y, xy, x), // bottom (near xy face)
18 nt3d.quad(origin, x, xz, z), // near xz face
19 nt3d.quad(origin, z, yz, y), // near yz face
20 nt3d.quad(y, yz, xyz, xy), // far xz face
21 nt3d.quad(x, xy, xyz, xz), // far yz face
22 nt3d.quad(z, xz, xyz, yz)); // top (far xy face)
24 var params = [["Size",
1]];
27 <body onload=
"nt3d.framework(box_by_faces, params)">
29 <p>Make a box by the most straightforward method: specify the six faces.
</p>