CS100433 Viewing and Modeling Basics - Tongji...
Transcript of CS100433 Viewing and Modeling Basics - Tongji...
![Page 1: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/1.jpg)
CS100433
Viewing and Modeling Basics
Junqiao Zhao 赵君峤
Department of Computer Science and Technology
College of Electronics and Information Engineering
Tongji University
![Page 2: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/2.jpg)
Review the elements of Image formation• Objects
• Viewer
• Light source(s)
• Attributes (Materials)
• Attributes that govern how light interacts with the materials in the scene
• Note the independence of the objects, the viewer, and the light source(s)
![Page 3: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/3.jpg)
Object Specification
• Primitives including• Points (0D object)
• Line segments (1D objects)
• Polygons (2D objects)
• Some curves and surfaces
• Quadrics
• Parametric polynomials
• All are defined through vertices, which are locations in space
![Page 4: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/4.jpg)
Synthetic Camera Model
![Page 5: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/5.jpg)
Synthetic Camera Model
center of projection
image plane
projector
p
projection of p
![Page 6: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/6.jpg)
Camera Specification
• Six degrees of freedom• Position of center of lens
• Orientation
• Lens
• Film size
• Orientation of film plane
![Page 7: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/7.jpg)
Viewing
•Analog to the physical viewing• Objects• Camera
• the position of camera
• the type of lens
• the position and the shape of film
•Viewing is based on the relationship among these elements
![Page 8: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/8.jpg)
Viewing Transformations
(2013 Steve Marschner)
Part of the Vertex processing in the Graphics Pipeline
![Page 9: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/9.jpg)
Normalized Device coordinates (NDC)
• Device-independent two-dimensional or three-dimensional Cartesian coordinate system whose coordinates are in the range -1 to 1.
• Why?
![Page 10: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/10.jpg)
Coordinate frames
• Local coordinates (Local space)
• World coordinates (World space)
• Camera coordinates (Viewing space)
• Clip coordinates (Clip space)
• Normalized Device coordinates (NDC)
• Viewport coordinates
• Window coordinates (device coordinates)
3D/4D
2D
![Page 11: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/11.jpg)
Viewing implementation
• Transform into camera coordinates.
•Perform projection into view volume.
•Clip geometry outside the view volume.
•Perform Perspective-division into NDC.
•Remove hidden surfaces
![Page 12: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/12.jpg)
2D viewing
• The Clipping Window• 2D NDC
• The Viewport• Mapped from NDC
What if the aspect ratio w/h is not 1?
Viewport vs Window
![Page 13: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/13.jpg)
2D viewing
• How to implement Zooming?• Zoom in
• Zoom out
• Should we adjust the Clipping window or the Viewport or the Window?
![Page 14: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/14.jpg)
OpenGL
• Defining the Clipping Window• glOrtho(left, right, bottom, top, -1, 1)
• Defining the Viewport• glViewport(x, y, width, height)
In Camera Coordinates
In Window Coordinates
![Page 15: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/15.jpg)
The 3D viewing pipeline
![Page 16: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/16.jpg)
Before the virtual camera..
• The 2D clipping window => The 3D clipping volume
![Page 17: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/17.jpg)
Orthographic view volume
(Ken Power 2011)
![Page 18: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/18.jpg)
Orthographic projection
![Page 19: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/19.jpg)
Defining an orthographic view volume• glOrtho(left, right, bottom, top, near, far)
NDCVC
![Page 20: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/20.jpg)
(2005 Angel)
Multiview Orthographic Projection
• Projection plane parallel to principal face
• Usually form front, top, side views
isometric front
sidetop
in CAD and architecture,
we often display three
multiviews plus isometric
![Page 21: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/21.jpg)
Advantages and Disadvantages
• Preserves both distances and angles• Shapes preserved
• Can be used for measurements
• Building plans
• Manuals
• Cannot see what object really looks like because many surfaces hidden from view• Often we add the isometric
![Page 22: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/22.jpg)
Perspective projection
![Page 23: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/23.jpg)
Perspective projection
(Ken Power 2011)
![Page 24: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/24.jpg)
Perspective view volume
• Also a 3D clipping volume called frustum
(2013 Steve Marschner)
![Page 25: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/25.jpg)
Defining perspective viewing frustum• glFrustum(left, right, bottom, top, near, far)
NDCVC
![Page 26: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/26.jpg)
Defining perspective viewing frustum• gluPerspective(fov, aspect, near, far)
![Page 27: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/27.jpg)
Perspective projection
![Page 28: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/28.jpg)
Advantages and Disadvantages
• Objects further from viewer are projected smaller than the same sized objects closer to the viewer (diminution)• Looks realistic
• Equal distances along a line are not projected into equal distances (nonuniform foreshortening)
• Angles preserved only in planes parallel to the projection plane
• More difficult to construct by hand than parallel projections (but not more difficult by computer)
![Page 29: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/29.jpg)
Finally the camera
• the position of camera• The default camera is located at origin and
points in the negative z direction
• the type of lens and the position of the film• OpenGL also specifies a default view volume
that is a cube with sides of length 2 centered at the origin
• Orthogonal
![Page 30: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/30.jpg)
Moving the camera
default frames
frames after translation by –d
d > 0
(2005 Angel)
![Page 31: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/31.jpg)
gluLookAtglLookAt(eyex, eyey, eyez, atx, aty, atz, upx, upy, upz)
(2005 Angel)
![Page 32: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/32.jpg)
References
• Ed Angel, CS/EECE 433 Computer Graphics, University of New Mexico
• Steve Marschner, CS4620/5620 Computer Graphics, Cornell
• Tom Thorne, COMPUTER GRAPHICS, The University of Edinburgh
• Elif Tosun, Computer Graphics, The University of New York
• Lin Zhang, Computer Graphics, Tongji Unviersity
![Page 33: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/33.jpg)
• Questions?
![Page 34: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/34.jpg)
What is a (3D) model ?
![Page 35: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/35.jpg)
A (3D) model
• The data describing the size, position, and shape of (3D) objects (ISO10303 Abbrev.)
• The model describes the process of forming the shape of an (3D) object (Wikipedia)
Utah Teapot Stanford Bunny
Wikimedia Commons
![Page 36: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/36.jpg)
Dimensions of Space and Object
• 0D?
• 1D?
• 2D?
• 3D?
![Page 37: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/37.jpg)
Geometry vs Topology
• Point -> Vertex
• Line Segment -> Edge
• Surface -> Face
![Page 38: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/38.jpg)
Geometry vs Topology
• Same geometry, different topology
• Same topology, different geometry
(2013 Steve Marschner)
![Page 39: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/39.jpg)
Geometry vs Topology
•Generally it is a good idea to look for data structures that separate the geometry from the topology• Geometry: locations of the vertices• Topology: organization of the vertices and
edges• Topology holds even if geometry changes
![Page 40: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/40.jpg)
Vertex Lists
• Put the geometry in an array
• Use pointers from the vertices into this array
• Introduce a polygon listx1 y1 z1
x2 y2 z2
x3 y3 z3
x4 y4 z4
x5 y5 z5.
x6 y6 z6
x7 y7 z7
x8 y8 z8
P1P2P3P4P5
v1v7v6
v8v5v6
topology geometry
![Page 41: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/41.jpg)
Solid modeling
• Surface-based
• Volume-based
http://www.kellbot.com/
![Page 42: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/42.jpg)
Boundary representation - B-rep
• A type of geometric model in which the size andshape of the solid is defined in terms of the faces,edges and vertices which make up its boundary(ISO10303).• Representation by bounding low-dimensional elements
• Organised collection of low dimensional elements
• Simple B-reps (planar faces, straight edges) and complexB-reps (curved surfaces and edges)
![Page 43: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/43.jpg)
B-rep (cont’)
• Geometry• Surfaces, Curves, Points
• Topology• Faces, Edges, Vertices Wikipedia
Euler’s formula V-E+F= 2
![Page 44: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/44.jpg)
Polygonal mesh
Wikipedia
![Page 45: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/45.jpg)
Pros and Cons
• Pros: flexible and computers can render themquickly. The vast majority of 3D models today arebuilt as textured polygonal models
• Cons: polygons are planar and need approximatecurved surfaces using many polygons,representation is not unique
![Page 46: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/46.jpg)
Constructive solid geometry (CSG)
• A type of geometric modelling in which a solid isdefined as the result of a sequence of regularisedBoolean operations operating on solid models (ISO10303).
Wikipedia
![Page 47: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/47.jpg)
Primitive solid
• Cube
• Sphere
• Cylinders
• …
• Must be solids!
![Page 48: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/48.jpg)
Point-set topology
• Boundary
• Interior
• Exterior
• Closure
𝑥2 + 𝑦2 + 𝑧2 = 1
𝑥2 + 𝑦2 + 𝑧2 < 1
𝑥2 + 𝑦2 + 𝑧2 > 1
𝑥2 + 𝑦2 + 𝑧2 ≤ 1
![Page 49: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/49.jpg)
Boolean operations
• Union
• Difference
• Intersection
• Regularised
Wikipedia
![Page 50: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/50.jpg)
Pros and Cons
• Pros: Computer-Aided Manufacturing: a brick witha hole drilled through it is represented as “justthat” and CSG can easily assure that objects are“solid” or water-tight
• Cons: Relationships between objects might bevery complex (search the entire tree) Real worldobjects may get very complex
![Page 51: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/51.jpg)
Volume-based representation
• Spatial decomposition• Voxels
• Octree
• BSP
![Page 52: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/52.jpg)
Voxels
• A voxel is a volume element (3D “pixel”)
• A 3D cubical (or spherical array), with each elementholding one (or more) data value (boolean, real)
OpenVDB
![Page 53: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/53.jpg)
Cubic worlds
Minecraft
![Page 54: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/54.jpg)
Volume4D Rockware
![Page 55: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/55.jpg)
Operations with voxels
• Voxel adjacencies:
• the 6-voxels: have adjacent face (1)
• the 18-voxels: have adjacent face and edge (2)
• the 26-voxel: have adjacent face, edge and vertex (3)
• N-path: a sequence of voxels is a 6-path (18-path, 26-path) ifevery two consecutive voxels along the sequence are 6-adjacent (18-adjacent, 26-adjacent).
![Page 56: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/56.jpg)
Pros and cons
Pros:• Modelling continues phenomena: Medical, geology,
body, etc.
• Regular data
• Easy to compute volume, make slices
Cons:• Massive data for high resolution
• The surface is always somehow “rough”
![Page 57: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/57.jpg)
![Page 58: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/58.jpg)
Point based representation
• Point cloud• Easily accessed with laser scanning, range camera or
stereo image matching
• No connectivity
• Widely used!
![Page 60: CS100433 Viewing and Modeling Basics - Tongji Universitycs1.tongji.edu.cn/...2_viewing_modeling_basics.pdf · Viewing and Modeling Basics ... •Film size •Orientation of film plane.](https://reader033.fdocuments.net/reader033/viewer/2022041612/5e38f11eed2f4c3b1d16d425/html5/thumbnails/60.jpg)
References
• Ed Angel, CS/EECE 433 Computer Graphics, University of New Mexico
• Steve Marschner, CS4620/5620 Computer Graphics, Cornell
• Tom Thorne, COMPUTER GRAPHICS, The University of Edinburgh
• Elif Tosun, Computer Graphics, The University of New York