http:^^www.tc.cornell.edu^visualization^education^cs418^lab11.html
来自「This data set contains WWW-pages collect」· HTML 代码 · 共 177 行
HTML
177 行
Date: Mon, 16 Dec 1996 22:09:03 GMTServer: NCSA/1.5Content-type: text/htmlLast-modified: Mon, 12 Feb 1996 13:43:12 GMTContent-length: 6846<html><head><title>CS418 Lab 11</title></head><body><h2> <!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/gifs/teapot.thumb.gif">CS 418: Laboratory 11</h2> <h2> Implicit Surfaces</h2><b> Introduction. </b><p>In this lab you will investigate implicit surface generation. Implicit surfacesare generated by finding "level surfaces" in a 3D field. That is, by placing polygons in all of the voxels which have scalar data of a certainvalue. The surface descriptions often take forms familar from analyticalgeometry. For instance, a unit sphere at the origin is described by<p> <code> x^2 + y^2 + z^2 - 1.0 </code> <p>when a surface is fit to the points in 3D which have a value of zero.<b><hr>Procedure</b><p>Download:<ul><li><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/heart.net"> heart.net </a><li><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/heart.cfg"> heart.cfg </a><p><li><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/SurfaceCombine.net">SurfaceCombine.net</a><li><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/SurfaceCombine.cfg">SurfaceCombine.cfg</a><p><li><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/blobbyMacroUI.net">blobbyMacroUI.net </a><li><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/blobbyMacroUI.cfg">blobbyMacroUI.cfg </a><p><li> Put the following in <code> ~yourID/.DXmacros </code> so than when DXstarts up it will find these macros. Note the programs in this exercise<b> will not run </b> without these macros. <ul> <li><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/macros/InitCSGmacro.net">InitCSGmacro.net</a> <li><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/macros/MakeCSGsurfacemacro.net">MakeCSGsurfacemacro.net</a> <li><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/macros/UnionCSGmacro.net">UnionCSGmacro.net</a> <li><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/macros/blobbyMacro.net">blobbyMacro.net</a> </ul></ul><hr>The program heart.net takes as input an implicit function of x,y,z andforms an surface. The function is calculated at grid points, thenpolygonalized by isosurface rendering, assumingan isosurface value of zero. For example the formula<p> <code> (2*x^2 + y^2 + z^2 -1)^3 - 0.2*x^2*z^3 - y^2*z^3<p> </code> creates a heart-shaped object.<p> <!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/labgifs/lab11.heart.image.gif"> <p>Different functions of x,y,z will produce different shapes. (Note that for different functions, you mayhave to modify the range limits of the space defined by the Constructmodule.) As an example, the following image was made bydefining an implicit sphere in a separate module from the heart, then morphing between them by linearly intropolating between the two 3D fields.In this case, mixing .9 of the heart 3D fieldwith 0.1 of the sphere 3D field. The sphere used was:<p> <code> x^2 + y^2 +(z+.25)^2 -.5 </code> <p><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/labgifs/lab11.heartsphere.image.gif"><p><hr>The program SurfaceCombine.net shows how to combine two implicit surfacesto simulate the "union" operation as used in constructive solidgeometry (see page 35 of Watt). Three new macros are used in this program;InitCSG, UnionCSG, and MakeCSGsurface. You can inspect (or modify) themacros using the "Open Selected Macro" option in the "Windows" menu of thevisual program editor.The two cylinder surfaces are combined (in the UnionCSG macro)using a <code> min(a,b) </code> function so that the voxels which are in theinterior of either cylinder are interior to the result. (Remember thatan implicit function changes sign as the surface is crossed and that forthe surfaces used here, that points inside have a negative value.) Theimage below is the result of the union of two cylinders.<p> <!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/labgifs/lab11.cyls.image.gif"> <p><hr>The program blobby.net computes an implicit surface based on sphericalfields of influence which can add together. See one of last year's <!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><!WA14><a href="http://www.tc.cornell.edu/Visualization/contrib/cs490-94to95/shuang/bm.html"> studentprojects </a> for more information on blobby functions. The sphericalfields can have positive and negative field strengths. An example from blobby.net shows four positive spheres (transparent red) and two negativespheres (blue) which when summed together, then passed thorough anisosurface module produce the object shown to the right.<p><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><!WA15><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/labgifs/lab11.sphere.image.gif"><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><!WA16><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/labgifs/lab11.blobby.image.gif"><hr><b> Assignment: </b> <p>Execute the programs to understand their behavior, then modify them asfollows:<ul><hr><li>Modify heart.net to generate a torus from an implicit function of(x,y,z). You will need to construct a functionwhich is negative if the position (x,y,z) is within a certain distanceof a circle and positive otherwise. Include interactors to set theradius of the torus and the radius of its cross-section.<hr><li> Extend SurfaceCombine.net to perform the CSG operations of intersectionand subtraction by writing two new macros called IntersectCSG and SubCSG. Provide interactors for choosing any combination of two spheres, cylinders, tori,or cones. Provide interactors for performing a union,intersection, or subtraction of the two selected shapes. That is, yourprogram should be able to, for example, select a sphere and a cone, andform the subtraction of cone-minus-sphere or sphere-minus-cone or union the sphereand the cone or intersect the sphere and the cone. Shown below are theintersection of two cylinders and one cylinder "minus" the other.<p> <!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><!WA17><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/labgifs/lab11.cylsIntersect.image.gif"> <!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><!WA18><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/labgifs/lab11.cylsMinus.image.gif"> <p>The image below is formed as <p><code>((superquadric minus torus) union cylinder), </code><p>but with about 1% white noise added to the 3D field. <p> <!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><!WA19><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/labs/labgifs/lab11.noisy.image.gif"> <p><hr><li> Use the interactors in blobby.net to make a human head withrecognizable (but not necessarily artistic) eyes, nose, mouth andears.<p><hr><li> Modify blobbyMacroUI.net toproduce two separate groups of blobs (with separate interactor inputs)which can be combined using your CSG modules. You will need to modifyblobby.macro.net to output a 3D field rather than a surface. Show oneexample of to separate blob groups combined with CSG operations.</ul><hr>Be prepared to demo the programs to show the torus generator, the CSGoperations, the head you designed, and the grouped blobby program. Thegrader will exercise all interactors.<p>You should be able to explain your programs. You should usetransmitters/receivers, macros, and comments in the "Notation" field of each moduleso that you and the grader can understand the program. Control panels, if any,should be well organized, labeled, and with the appropriate numeric ranges.<p>The<!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><!WA20><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/GradeGuides/Lab11.grade.ps"> Lab 11 grading guide </a>will be filled out by a consultant during section to evaluate your work.<p><hr><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><!WA21><img src="http://www.tc.cornell.edu/Visualization/Education/cs418/gifs/leftarrow.icon.gif">Back to <!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><!WA22><a href="http://www.tc.cornell.edu/Visualization/Education/cs418/index.html">Main Page</a> <P><hr>Last modified, 10/20/95, B. Land.<! Revision history: Original document: Land 10/95><br><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><!WA23><IMG SRC="http://www.tc.cornell.edu/copyright.xbm"><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><!WA24><A HREF="http://www.tc.cornell.edu/ctcCopyright.html"> <i>Copyright Statement </I></A></body> </html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?