home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / grafik / 3d & render tools / irit / contrib / cagd / srfgeom / readme < prev    next >
Encoding:
Text File  |  1996-07-16  |  3.6 KB  |  103 lines

  1. !!! Warning: CreateSurfDemo takes some minutes on NT to cache curvatures.
  2. Be aware to run it once for the surface and curve.
  3.  
  4. -- Creation of demo objects in demo.irt ---------------------------
  5.  
  6. PlanarSurf = FUNCTION():
  7.     creates plane
  8. DemoSimpleSurf = FUNCTION():
  9.     creates surfaces you have seen today
  10. DemoSurf = FUNCTION():
  11.     creates surface you wanted
  12. DemoCurve = FUNCTION():
  13.         creates curve in parametric domain
  14.  
  15. -- Run demo functions ---------------------------------------------
  16.  
  17. RunSurfDomainDemo = PROCEDURE():
  18.     start with this demo, shows mapping from domain to surface
  19. RepeatMovie = PROCEDURE(numOfSamples):
  20.     repeats last movie as it was
  21. RunMovie = PROCEDURE(surfDeriv, surfCrvtr, curvDeriv, curvCrvtr):
  22.     runs movie customizing its view to be without domain
  23.         with surface and curve and geometry switched by
  24.         surfDeriv - frame of partial derivatives
  25.         surfCrvtr - osculating circles in principle directions
  26.         curvDeriv - frame of curve partial derivatives
  27.         curvCrvtr - geodesic and normal curvature circles
  28. RunHodographDemo = PROCEDURE():
  29.         runs movie of surface with frame and hodograph with frame
  30. RunSurfGeomDemo = PROCEDURE():
  31.         runs movie of surface with frame and principles
  32. RunCurvGeomDemo = PROCEDURE():
  33.         runs movie of curve in surface with frame and curvatures
  34. RunSurfAndCurvDemo = PROCEDURE():
  35.         runs movie of surface geometry with curve frame
  36. RunCurvAndSurfDemo = PROCEDURE():
  37.         runs movie of curve in surface geometry with surface frame
  38.  
  39. Each movie starts with pause and message letting you to adjust
  40. scene and ecxplain what is going on. Functions are 3-lines and
  41. describe well how to customize movie in other way.
  42.  
  43.  
  44. -- Customization global variables in surfcore.irt ----------------------
  45.  
  46. srfMainColor   = white;
  47. srfDomainColor = red;
  48. srfCurveColor  = yellow;
  49. srfUparColor   = magenta;
  50. srfVparColor   = green;
  51. srfNormColor   = cyan;
  52. srfCrvtrColor  = blue;
  53. crvTangColor   = yellow;    # tangent
  54. crvNormColor   = red;       # normal
  55. crvGCrvtrColor = cyan;      # geodesic osculating circle
  56. crvNCrvtrColor = blue;      # normal osculating circle
  57.  
  58. showSurfMain = true;
  59. showSurfDomain = true;
  60. showSurfHodo = true;
  61. showSurfDerivAtPoint = true;
  62. showSurfDerivAtHodo = true;
  63. showSurfCrvtr = true;
  64. showCurvDeriv = true;
  65. showCurvCrvtr = true;
  66.  
  67. hodoMat_ # matrix that operates on hodograph objects
  68.  
  69. -- Surface geometry objects creation functions in surfcore.irt ------
  70.  
  71. CreateSurfDemo = PROCEDURE(srf, crv):
  72.     start with new surface or curve
  73. SurfAndHodoScene = FUNCTION():
  74.         returns static elements of the scene,
  75.         subject to view customiz by showXXX flags
  76. GeomAtCurvParam = FUNCTION(t)
  77.         returns curve in surface geometry at t in [0, 1]
  78.     (frame and geodesic + normal curvatures), subject to view
  79.         customization by showXXX flags
  80. GeomAtSurfPoint = FUNCTION(u, v):
  81.         returns surface geometry at u and v in domain
  82.     (frame and principal curvatures), subject to view
  83.         customization by showXXX flags
  84. GeomAtParam = FUNCTION(t):
  85.         calls GeomAtSurfPoint substituting u and v by values of
  86.         curve in parametric domain at t in [0, 1]
  87.  
  88. -- Helpers to customize view -----------------------------------------
  89.  
  90. ShowSurfHodo = PROCEDURE(showHodo, showFrame):
  91. ShowSurfGeom = PROCEDURE(showDeriv, showCrvtr):
  92. ShowCurvGeom = PROCEDURE(showDeriv, showCrvtr):
  93.  
  94. -- Sample sequence found in demo.irt -----------------------------------
  95.  
  96. CreateSurfDemo(DemoSurf(), DemoCurve());
  97. RunSurfDomainDemo();
  98. RunHodographDemo();
  99. RunSurfGeomDemo();   # you can do RepeatMovie(20) here
  100. view(GeomAtParam(0.013640) + SurfAndHodoScene(), true); # k2 inflection
  101. RunSurfAndCurvDemo();
  102.  
  103.