Docstoc

Modeling Grab Bag

Document Sample
Modeling Grab Bag Powered By Docstoc
					                                                         Choose
                                                         • Acquisition
                                                         • Seashells
                                                         • Fractals
             Modeling Grab Bag                           • Volumes
                                                         • Constructive Solid Geometry
                     Greg Humphreys
                  CS445: Intro Graphics
             University of Virginia, Fall 2005




Model Construction                                       Interactive Modeling Tools
• Interactive modeling tools                             • User constructs objects with drawing program
  o CAD programs                                           o Menu commands, direct manipulation, etc.
  o Subdivision surface editors :)                         o CSG, parametric surfaces, quadrics, etc.

• Scanning tools
  o CAT, MRI, laser, magnetic, robotic arm, etc.

• Computer vision
  o Stereo, motion, etc.




                                                                                                        Cosmoworlds, SGI




Interactive Modeling Tools                               Model Construction
• Example: Mechanical CAD                                • Interactive modeling tools
                                                           o CAD programs
                                                           o Subdivision surface editors :)

                                                         • Scanning tools
                                                           o Laser, magnetic, robotic arm, etc.

                                                         • Computer vision
                                                           o Stereo, motion, etc.




                                        H&B Figure 9.9




                                                                                                                           1
Scanning tools                                                    Scanning tools
• Acquire geometry of objects with active sensors                 • Acquire geometry of objects with active sensors
  o   CAT/MRI                                                       o   CAT/MRI
  o   Laser range scanner                                           o   Laser range scanner
  o   Magnetic sensor                                               o   Magnetic sensor




                                                                                                                      Color
  o   Robotic arm                                                   o   Robotic arm
  o   etc.                                                          o   etc.




                                                                                                                      Depth
                                                                            Xp        (Xc,Yc)


                   Lorensen       Stanford Graphics Laboratory




Laser Range Scanning                                              Scanning tools
• Example: 70 scans                                               • Acquire geometry of objects with active sensors
  o Volumetric reconstruction                                       o   CAT/MRI
                                                                    o   Laser range scanner
                                                                    o   Magnetic sensor
                                                                    o   Robotic arm
                                                                    o   etc.




                                   Stanford Graphics Laboratory




Scanning tools                                                    Computer Vision
• Acquire geometry of objects with active sensors                 • Infer 3D geometry from images
  o   CAT/MRI                                                       o   Stereo
  o   Laser range scanner                                           o   Motion
  o   Magnetic sensor                                               o   Constraints
  o   Robotic arm                                                   o   etc.
  o   etc.




                                                                                                                              2
Computer Vision                                                    Computer Vision
• Infer 3D geometry from images                                    • Infer 3D geometry from images
   o   Stereo                                                        o   Stereo
   o   Motion                                                        o   Motion
   o   Constraints                                                   o   Constraints
   o   etc.                                                          o   etc.




                                                                                                                                     Debevec96




Procedural Modeling                                                Example: Seashells
• Goal:                                                            • Create 3D polygonal surface models of seashells
   o Describe 3D models algorithmically

• Best for models resulting from ...
   o Repeating processes
                                                                         “Modeling Seashells,”
   o Self-similar processes                                              Deborah Fowler, Hans Meinhardt,
   o Random processes                                                    and Przemyslaw Prusinkiewicz,
                                                                         Computer Graphics (SIGGRAPH 92),
                                                                         Chicago, Illinois, July, 1992, p 379-387.
• Advantages:
   o Automatic generation
   o Concise representation
   o Parameterized classes of models


                                                                                                                     Fowler et al. Figure 7




Example: Seashells                                                 Example: Seashells
• Sweep generating curve around helico-spiral axis                 • Connect adjacent points to form polygonal mesh

       Helico-spiral definition:
            # i +1 = # i + "#
            ri +1 = ri !r
            zi +1 = zi !z




                                          Fowler et al. Figure 1                                                             Fowler et al. Figure 6




                                                                                                                                                      3
Example: Seashells                                                             Example: Seashells
• Model is parameterized:                                                      • Generate different shells by varying parameters
  o Helico-spiral: z0, λ z , r0, λr, Ν θ, Δθ
  o Generating curve: shape, N c, λ c




                                                                                                  Different helico-spirals
                                                  Fowler et al. Figure 1                                                         Fowler et al. Figure 2




Example: Seashells                                                             Example: Seashells
• Generate different shells by varying parameters
                                                                                                         Generate many interesting shells
                                                                                                         with a simple procedural model!




                        Different generating curves
                                                      Fowler et al. Figure 3                                                 Fowler et al. Figures 4,5,7




Fractals                                                                       Fractals
• Defining property:                                                           • Useful for describing natural 3D phenomenon
  o Self-similar with infinite resolution                                        o   Terrain
                                                                                 o   Plants
                                                                                 o   Clouds
                                                                                 o   Water
                                                                                 o   Feathers
                                                                                 o   Fur
                                                                                 o   etc.




                             Mandelbrot Set           H&B Figure 10.100                                                             H&B Figure 10.80




                                                                                                                                                           4
Fractal Generation                                                      Deterministic Fractal Generation
                                                                        • General procedure:
                                                                          o Initiator: start with a shape
• Deterministically self-similar fractals
                                                                          o Generator: replace subparts with scaled copy of original
   o Parts are scaled copies of original



• Statistically self-similar fractals
   o Parts have same statistical properties as original




                                                                                                                          H&B Figure 10.68




Deterministic Fractal Generation                                        Deterministic Fractal Generation
• Apply generator repeatedly                                            • Useful for creating interesting shapes!




                                                      Koch Curve
                                                     H&B Figure 10.69                                                  Mandelbrot Figure X




Deterministic Fractal Generation                                        Deterministic Fractal Generation
• Useful for creating interesting shapes!                               • Useful for creating interesting shapes!




                                             Mandelbrot Figure 46                                                     H&B Figures 75 & 109




                                                                                                                                             5
Fractal Generation                                                    Statistical Fractal Generation
                                                                      • General procedure:
                                                                        o Initiator: start with a shape
• Deterministically self-similar fractals
                                                                        o Generator: replace subparts with a self-similar
   o Parts are scaled copies of original                                                random pattern


• Statistically self-similar fractals
   o Parts have same statistical properties as original




                                                                                        Random Midpoint Displacement




Statistical Fractal Generation                                        Statistical Fractal Generation
• Example: terrain                                                    • Useful for creating mountains




                                                                                                                        H&B Figure 10.83a
           H&B Figure 10.83b




Statistical Fractal Generation                                        Statistical Fractal Generation
• Useful for creating 3D plants                                       • Useful for creating 3D plants




                                                   H&B Figure 10.82                                                    H&B Figure 10.79




                                                                                                                                            6
Solid Modeling                                                                Motivation 1
• Represent solid interiors of objects                                        • Some acquisition methods generate solids
    o Surface may not be described explicitly                                   o Example: CAT scan




                                            SUNY Stony Brook

     Visible Human
  (National Library of Medicine)
                                                                                                                           Stanford University




Motivation 2                                                                  Solid Modeling Representations
• Some applications require solids                                            • What makes a good solid representation?
    o Example: CAD/CAM                                                          o   Accurate
                                                                                o   Concise
                                                                                o   Affine invariant
                                                                                o   Easy acquisition
                                                                                o   Guaranteed validity
                                                                                o   Efficient boolean operations
                                                                                o   Efficient display




                                                     Intergraph Corporation                                                         Lorensen




Voxels                                                                        Voxel Acquisition
• Partition space into uniform grid                                           • Scanning devices
    o Grid cells are called a voxels (like pixels)                              o MRI
                                                                                o CAT
• Store properties of solid object with each voxel
    o   Occupancy                                                             • Simulation
    o   Color                                                                   o FEM
    o   Density
    o   Temperature
    o   etc.
                                                                                                                     Stanford University




                                                       FvDFH Figure 12.20
                                                                                                 SUNY Stoney Brook




                                                                                                                                                 7
Voxel Storage                                                               Voxel Boolean Operations
•   O(n3)   storage for nxnxn grid                                          • Compare objects voxel by voxel
    o 1 billion voxels for 1000x1000x1000                                     o Trivial




                                                                                                     ∪               =




                                                                                                     ∩               =




Voxel Display                                                               Voxel Display
• Isosurface rendering                                                      • Slicing
    o Render surfaces bounding volumetric regions of constant                 o Draw 2D image resulting from intersecting voxels
      value (e.g., density)                                                     with a plane




                                                 Isosurface Visualization                                                   Visible Human
                                                   Princeton University                                                  (National Library of Medicine)




Voxel Display                                                               Voxels
• Ray casting                                                               • Advantages
    o Integrate density along rays through pixels                             o   Simple, intuitive, unambiguous
                                                                              o   Same complexity for all objects
                                                                              o   Natural acquisition for some applications
                                                                              o   Trivial boolean operations

                                                                            • Disadvantages
                                                                              o   Approximate
                                                                              o   Not affine invariant
                                                                              o   Large storage requirements
                                                                              o   Expensive display


                                               Engine Block
                                            Stanford University




                                                                                                                                                          8
Quadtrees & Octrees                                                  Quadtree Boolean Operations
• Refine resolution of voxels hierarchically
   o More concise and efficient for non-uniform objects
                                                                                 A                          B




                                                                           A∪B                              A∩B


             Uniform Voxels              Quadtree

                                                FvDFH Figure 12.21                                              FvDFH Figure 12.24




Quadtree Display                                                     Constructive Solid Geometry (CSG)
• Extend voxel methods                                               • Represent solid object as hierarchy of
   o Slicing                                                           boolean operations
   o Isosurface extraction                                             o Union
   o Ray casting                                                       o Intersection
                                                                       o Difference


    Finding neighbor cell requires
    traversal of hierarchy (O(1))




                                                FvDFH Figure 12.25                                               FvDFH Figure 12.27




CSG Acquisition                                                      CSG Boolean Operations
• Interactive modeling programs                                      • Create a new CSG node joining subtrees
   o CAD/CAM                                                           o Union
                                                                       o Intersection
                                                                       o Difference




                                                    H&B Figure 9.9                                               FvDFH Figure 12.27




                                                                                                                                      9
CSG Display & Analysis
• Ray casting

                             Union


                         Circle      Box




                                           10

				
DOCUMENT INFO