© All Rights Reserved

2 views

© All Rights Reserved

- Space
- Cubic Spline Tutorial v3
- tutorial1salome
- 4. Question Bank CAD 2161903 Even 2019
- Selected Papers of Charles Hinton About the Fourth Dimension, Hinton
- Freitas 2003 Paisagem
- polygons and solids plan
- 2015-AMO
- AMath-Solguide_17b
- 14 IIIB - S4 Test2 Transformations
- 10.1.1.14.1162
- 14
- Deduction of Lorentz trasformation
- Mentorpaper_92550 MEMS 1
- Table
- Remote Areas Arderner.pdf
- Proceedings of the American Mathematical Society Volume 126 Issue 9 1998 [Doi 10.2307_119208] M. Van de Vel -- Collapsible Polyhedra and Median Spaces
- Geometry Quiz
- 2D Viewing
- Math141 Final 2012w

You are on page 1of 43

REPRESENTATIONS

CEng 477

Computer Graphics

METU, 2004

Object Representations

●

Types of objects:

geometrical shapes, trees, terrains, clouds, rocks,

glass, hair, furniture, human body, etc.

●

Not possible to have a single representation for all

– Polygon surfaces

– Spline surfaces

– Procedural methods

– Physical models

– Solid object models

– .....

Polygon Surfaces

●

Set of adjacent polygons representing the object

exteriors.

●

All operations linear, so fast.

●

Non-polyhedron shapes can be approximated by

polygon meshes.

●

Smoothness is provided either by increasing the

number of polygons or interpolated shading methods.

Data Structures

●

Data structures for representing polygon surfaces:

– Efficiency

●

Intersection calculations

●

Normal calculations

●

Access to adjacent polygons

– Flexibility

●

Interactive systems

●

Adding, changing, removing vertices, polygons

– Integrity

Polygon Tables

V2

E2

●

Vertices Edges Polygons E1 V3

V1:(x1,y1,z1) E1: V1,V2 S1: E1,E3,E10,E9 E3 E5

V1 E4

V2:(x2,y2,z2) E2: V2,V3 S2: E2,E5,E4,E3 V5 V4

V3:(x3,y3,z3) E3: V2,V5 S3: E10,E11,E7,E8

E9 E10 E11 E6

V4:(x4,y4,z4) E4: V4,V5 S4: E4,E6,E11

V5:(x5,y5,z5) E5: V3,V4 V6 V7

V6:(x6,y6,z6) E6: V4,V7 E7

E8

V7:(x7,y7,z7) E7: V7,V8

V8:(x8,y8,z8) E8: V6,V8 V8

E9: V1,V6

E10: V5,V6

E11: V5,V7

E1: S1 E2: S2

●

Forward pointers: V1: E1,E9 V2: E1,E2,E3 E3: S1,S2 E4: S2,S4

i.e. to access V3: E2,E5 V4: E4,E5,E6 E5: S2 E6: S4

E7: S3 E8: S3

adjacent surfaces V5: E3,E4E10,E11 V6: E8,E9,E10

V7: E6,E7,E11 V8: E7,E8 E9: S1 E10: S1,S3

edges

E11: S3,S4

●

Additional geometric properties:

– Slope of edges

– Normals

– Extends (bounding box)

●

Integrity checks

– ∀ V , ∃ E a , E b such that V ∈E a ,V ∈E b

– ∀ E , ∃ S such that E ∈S

– ∀ S , S is closed

– ∀ S 1, ∃ S 2 such that S 1∩S 2≠∅

– S k is listed in E m ⇔ E m is listed in S k

Polygon Meshes

6 8 10

2 4

●

Triangle strips: 12

123, 234, 345, ..., 10 11 12

1 7

3 9 11

5

1 2 3 4 5 6 7 8 9 10 11 12

●

Quadrilateral meshes:

n×m array of vertices

Plane Equations

●

Equation of a polygon surface:

A xB yC zD=0

Linear set of equations:

A/ D x k B/ D y k C / D z k =−1, k =1, 2, 3

B=z 1 x 2− x 3 z 2 x 3− x1 z 3 x 1− x 2

C= x 1 y 2− y 3 x 2 y 3− y 1 x 3 y 1− y 2

D=−x 1 y 2 z 3− y 3 z 2 − x 2 y 3 z 1− y 1 z 3 − x 3 y 1 z 2− y 2 z 1

V2

●

Surface Normal: Counterclockwise

order.

N = A , B ,C

V1

extracting normal from vertices:

N =V 2−V 1 ×V 3−V 1 V3

●

Find plane equation from normal

A , B ,C =N

N⋅ x , y , z D=0

P is a point in the surface (i.e. a vertex)

D=−N⋅P

●

Inside outside tests of the surface:

A xB yC zD0 , point is inside the surface

A xB yC zD0 , point is outside the surface

Spline Representations

●

Spline curve: Curve consisting of continous curve

segments approximated or interpolated on polygon

control points.

●

Spline surface: a set of two spline curves matched on

a smooth surface.

●

Interpolated: curve passes through control points

●

Approximated: guided by control points but not

necessarily passes through them.

Interpolated Approximated

●

Convex hull of a spline curve: smallest polygon

including all control points.

●

Characteristic polygon, control path: vertices along

the control points in the same order.

●

Parametric equations:

x= x u , y= y u , z=z u , u1uu2

●

Parametric continuity: Continuity properties of curve

segments.

– Zero order: Curves intersects at

one end-point: C0

– First order: C0 and curves has same

tangent at intersection: C1

– Second order: C0 , C1 and curves has

same second order derivative: C2

●

Geometric continuity:

Similar to parametric continuity but only the direction of

derivatives are significant. For example derivative (1,2)

and (3,6) are considered equal.

●

G0, G1, G2 : zero order, first order, and second order

geometric continuity.

Spline Equations

●

Cubic curve equations:

x u=a x u3b x u 2c x ud x

3 2

y u=a y u b y u c y ud y 0u1

3 2

z u=a z u b z u c z ud z

[]

ax

x u=[ u3 u2 u 1 ] b x =U⋅C

cx

dx

●

General form: x u=U⋅M s⋅M g

Mg: geometric constraints (control points)

Ms: spline transformation (blending functions)

Natural Cubic Splines

●

Interpolation of n+1 control points. n curve

segments. 4n coefficients to determine

●

Second order continuity. 4 equation for each of n-1

common points:

x k 1= p k , x k 1 0= p k , x'k 1= x'k 1 0 x 'k' 1=x 'k'1 0

4n equations required, 4n-4 so far.

●

Starting point condition, end point condition.

x1 0= p0 , x n 1= pn

●

Assume second derivative 0 at end-points or add

phantom control points p-1, pn+1.

'' ''

x 1 0=0 , x n 1=0

●

Write 4n equations for 4n unknown coefficients and

solve.

●

Changes are not local. A control point effects all

equations.

●

Expensive. Solve 4n system of equations for changes.

Hermite Interpolation

●

End point constraints for each segment is given as:

P 0= p k , P 1= p k1 , P ' 0= Dp k , P ' 1= Dp k1

●

Control point positions and first derivatives are given

as constraints for each end-point.

[] []

a a

P u= [ u3 u 2 u 1 ]⋅ b P ' u= [ 3 u 2 2 u 1 0 ]⋅ b

c c

d d

[ ] [ ][ ] [ ] [ ] [ ]

−1

pk 0 0 0 1 a a 0 0 0 1 pk

p k1 = 1 1 1 1 b

⋅ b =1 1 1 1

⋅ p k1

Dp k 0 0 1 0 c c 0 0 1 0 Dp k

Dp k1 3 2 1 0 d d 3 2 1 0 Dp k1

[][ ] [ ][ ][ ] [ ]

−1

a 0 0 0 1 pk 2 −2 1 1 pk pk

b =1 1 1 1 −3 3 −2 −1 p k1

⋅ p k1 = ⋅ = M H⋅ p k1

c 0 0 1 0 Dp k 0 0 1 0 Dp k Dp k

d 3 2 1 0 Dp k1 1 0 0 0 Dp k1 Dp k1

P u= p k 2 u3−3 u 21 p k1 −2 u33 u 2 Dp k u3−2 u 2u Dp k1 u 3−u 2

●

Segments are local. First order continuity

●

Slopes at control points are required.

●

Cardinal splines and Kochanek-Bartel splines

approximate slopes from neighbor control points.

Bézier Curves

●

A Bézier curve approximates any number of control

points for a curve section (degree of the Bézier

curve)

n

P u=∑ p k BEZ k , n u , 0u1

k =0

BEZ k , n u= n u k 1−un−k

k

n= n!

k k !n−k !

●

Polynomial degree of a Bézier curve is one less than the

number of control points.

3 points : parabola

4 points : cubic curve

5 points : fourth order curve

●

Properties of Bézier curves:

– Passes through start and end points

P 0= p 0, P 1= p n

P ' 0=−n p 0n p1 , P ' 1=−n p n−1n p n

●

Joining Bézier curves:

– Start and end points are same (C0)

– Choose adjacent points to start and end in the

same line (C1)

p a , n= p b , 0 , p b ,1= p a , n p a , n− p a , n−1

– For second order (C2) choose the next point in

terms of the previous 2 of the other segment.

p b , 2= p a , n−24 p a , n− p a , n−1

pa,1 pa,2

pb,3

Pa,3 Pb,0

pa,0

pb,2

pb,1

Cubic Bézier Curves

●

Most graphics packages provide Cubic Béziers.

● 3 2

BEZ 0,3 u=1−u BEZ 1,3 u=3 u1−u

BEZ 2,3 u=3 u 2 1−u BEZ 3,3 u=u3

[]

p0

P u=[ u3 u 2 u 1 ]⋅M Bez⋅ p1

p2

p3

[ ]

−1 3 −3 1

3 −6 3 0

M Bez =

−3 3 0 0

1 0 0 0

Bézier Surfaces

●

Cartesian product of Bézier blending functions:

m n

P u , v=∑ ∑ p j , k BEZ j , m v BEZ k , n u 0u , v1

j=0 k =0

Bézier Patches

●

A common form of approximating larger surfaces by

tiling with cubic Bézier patches. m=n=3

●

4 by 4 = 16 control points.

p2,1 p3,1

p2,0

p2,2 p3,2

p1,1

p1,0

p1,2 p2,3

p0,1

p1,3

p0,2

p3,3

p0,0

p0,3

●

Matrix form

P u , v=U⋅M Bez⋅P⋅M TBez⋅T T =

[ ][ ][ ][ ]

−1 3 −3 1 p 0,0 p 0,1 p 0,2 p 0,3 −1 3 −3 1 v 3

[ u3 u 2 u 1 ]⋅ 3 −6 3 0 ⋅ p1,0 p1,1 p1,2 p 1,3

⋅

3 −6 3 0 v2

⋅

−3 3 0 0 p 2,0 p 2,1 p 2,2 p 2,3 −3 3 0 0 v

1 0 0 0 p 3,0 p 3,1 p 3,2 p 3,3 1 0 0 0 1

●

Joining patches:

similar to curves. C0, C1 and C2 can be established by

choosing control points accordingly.

Displaying Curves and Surfaces

●

Horner's rule: less number of operations for

calculating polynoms.

3 2

x u=a x u b x u c x ud x

x u=a x ub x uc x ud x

●

Forward differences calculations:

Incremental calculation of the next value.

– Linear case:

u k 1=uk , k=0, 1, 2 ... u0=0

x k =a x u k b x x k 1=a x uk b x

x k 1= x k x x=a x

●

Cubic equations

x k =a x u3k b x u2k c x uk d x x k 1=a x u k 3b x uk 2c x u k d x

2 2 3 2

x k =3 a x uk 3 a x 2 b x uk a x b x c x

2 x k 1=2 x k 3 x k 3 x k =6 a x 3

x 0=d x

x 0=a x 3b x 2c x

2 x 0=6 a x 32 b x 2

3 x k =6 a x 3

x 0=d x

x 0=a x 3b x 2c x

2 x 0=6 a x 32 b x 2

●

Example:

(ax,bx,cx,dx)=(1,2,3,4), δ = 0.1 x x 2 x

4.000 0.321 0.046

3 3 4.321 0.367 0.052

} 3 x k

x k =6 =0.006

4.688 0.419 0.058

5.107 0.477 0.064

5.584 0.541 0.070

6.125 0.611 0.076

6.736 0.687 0.082

7.423 0.769 0.088

8.192 0.857 0.094

9.049 0.951 0.100

Sweep Representations

●

Use reflections, translations and rotations to

construct new shapes.

P(u) v

u u

Hierarchical Models

●

Combine smaller/simpler shapes to construct

complex objects and scenes.

●

Stored in trees or similar data structures

●

Operations are based on traversal of the tree

●

Keeping information like bounding boxes in tree

nodes accelarate the operations.

Scene Graphs

●

DAG's (Directed Acyclic Graphs) to represent scenes

and complex objects.

●

Nodes: Grouping nodes, Transform nodes, Level Of

Detail nodes, Light Source nodes, Attribute nodes,

State nodes.

Leaves: Object geometric descriptions.

●

Why not tree but DAG?

●

Available libraries: i.e. www.openscenegraph.org

●

Efficient display of objects, picking objects, state

change and animations.

G

T T L

T T T T

G G

T T T T T T T

Constructive Solid Geometry

●

Combine multiple shapes with set operations

(intersection, union, deletion) to construct new

shapes.

●

●

Set operations and transformations combined:

●

union(transA(box),diff(transB(box),transC(cylinder)))

T -

T T

●

Ray casting methods are used for rendering and finding

properties of volumes constructed with this method.

●

Simply +1 for outside inside

-1 for inside outside transition.

Positives are solid.

A B C D RAY A BC D

E∪ B 1 2 1 0

E∩ B 1 2 1 0 E B

E- B 1 0 -1 0

B- E -1 0 1 0

●

Similarly find unit cubes interior to calculate mass, center

of mass etc.

Octrees

●

Divide a volume in equal binary partitions in all

dimensions recursively to represent solid object

volumes. Combining leaf cubes give the volume.

●

2D: quadtree

1 2

1 2 3 4

3 4

●

2D: quadtree; 3D: octree

●

Volume data: Medical data like Magnetic Resonance.

Geographical info (minerals etc.)

●

2D: Pixel ; 3D: voxel.

●

Volumes consisting of large continous subvolumes

with properties. Volumes with many wholes, spaces.

Surface information is not sufficient or tracktable.

●

Keeping all volume in terms of voxels, too expensive:

space and processor.

●

8 elements at each node. 6

●

If volume completely resides in 5

4

a cube, it is not further divided: 1

leaf node 0

7 2

●

Otherwise nodes recursively 3

subdivided.

●

Extends of a tree node is the extend of the cube it

defines.

●

Surfaces can be extracted by traversing the leaves

with geometrical adjacency.

Fractal Geometry Methods

●

Synthetic objects: regular, known dimension

●

Natural objects: recursive (self repeating), the higher the

precision, the higher the details you get.

●

Example: tree branches, terrains, textures.

●

Classification:

– Self-similar: scaled-down shape is similar to original

– Self-affine: self similar with different scaling

parameters and transformations. Statistical when

random parameters are involved.

– Invariant: non-linear transformations, i.e. Complex

space.

●

Fractal dimension:

– Detail variation of a self similar object. Denoted as D.

– Fragmentation of the object.

n s D =1

ln n n : number of pieces s : scaling factor

D=

ln 1 / s

ln 4

● n=4 s=1/3 D= =1.2619

ln 1/1/3

Random Mid-point Variation

●

Find the midpoint of an edge A-B. Add a random

factor and divide the edge in two as: A-M, M-A at

each step.

●

Usefull for height maps, clouds, plants.

●

2D: x m= x A x B / 2

y m= y A y B / 2 r , r : a random value in 0−c

c c× f , f a fraction in 0−1

●

3D: For corners of a square: A, B, C, D

z AB= z Az B / 2r , z BC = z B z C / 2r , A B

z M = z ABz BC z CDz DA / 4r

D C

- SpaceUploaded bymobilecrackers
- Cubic Spline Tutorial v3Uploaded byPraveen Srivastava
- tutorial1salomeUploaded byLuis Felipe Gutierrez Marcantoni
- 4. Question Bank CAD 2161903 Even 2019Uploaded byFux
- Selected Papers of Charles Hinton About the Fourth Dimension, HintonUploaded bykatepol8264
- Freitas 2003 PaisagemUploaded bySimone R. Freitas
- polygons and solids planUploaded byapi-235840787
- 2015-AMOUploaded byferrouswei
- AMath-Solguide_17bUploaded byapi-3855009
- 14 IIIB - S4 Test2 TransformationsUploaded byEduar Rodriguez
- 10.1.1.14.1162Uploaded byPeter Szasz
- 14Uploaded byapi-240724606
- Deduction of Lorentz trasformationUploaded byLuca Nutricati
- Mentorpaper_92550 MEMS 1Uploaded bysebasTR13
- TableUploaded bylaoraculo
- Remote Areas Arderner.pdfUploaded byMara Dicenta Vilker
- Proceedings of the American Mathematical Society Volume 126 Issue 9 1998 [Doi 10.2307_119208] M. Van de Vel -- Collapsible Polyhedra and Median SpacesUploaded byEduardo Muller
- Geometry QuizUploaded byvaishalioberoi
- 2D ViewingUploaded byGuruSwami Gandham
- Math141 Final 2012wUploaded byexamkiller
- Surpac Block Model ConceptsUploaded byMitra Mineral
- Sight Distance on Vertical.pdfUploaded byلازلت احلم
- CalculusUploaded byNayli Athirah
- Add Math SPM KCM Exam Tips 4®.pdfUploaded byJennyThian
- ÇÇUploaded bymari abrego
- 104_3Uploaded bySunil Kumar
- AreasUploaded bynikhil c
- Solution of AIATS Test 8 for JEE Adv.-2015(P-1 & P-2)Uploaded byChirag Kaushik
- 4 Position-graphical.pdfUploaded byumair rasheed
- A2 Cambridge English Key Handbook for TeachersUploaded bylorena

- 2_H_Nily RanjanUploaded byHabib Cse
- AssemblerUploaded byindian01
- 20181001102014_ISSB_EXAM_DEO_2019_A_BATCH_14_17_28_31_October_2018Uploaded byHabib Cse
- 80-BAFA.pdfUploaded byHabib Cse
- computer graphicsUploaded byKour Neetu
- Basics of Data Communication and Computer Networking (262 KB)Uploaded bybhabani009
- Research Proposal on vanet securityUploaded byHabib Cse
- Transport Layer StdUploaded byHabib Cse
- OpenGLUploaded byHabib Cse
- lecture9animation-120317134228-phpapp01Uploaded byHabib Cse
- Chap9Notes.pdfUploaded byRahul Gupta
- Computer Graphics FractalsUploaded byHabib Cse
- AnimationUploaded byHabib Cse
- 0509.pdfUploaded byHabib Cse
- Spline Representations Computer Graphics Lecture SlidesUploaded byHabib Cse
- IJCTT-V9P125Uploaded byHabib Cse
- Robdd Step by StepUploaded byHabib Cse
- OtsuUploaded byfamtalu
- Lec2Uploaded byHabib Cse
- MTS Quality of Service ParametersUploaded byHabib Cse

- Practical 2 Pre-prac Report (20140826) Jm2Uploaded byJoseph Henry Mervitz
- all project 3 reportUploaded byapi-281332282
- A574.1112550-1.pdfUploaded byAriel Fernandez
- philips_26_pfl_3405_chassis_tpn1.1e-la_sm.pdfUploaded byViorel Gabriel
- CATIA V5 ED2 ConfigurationUploaded bysouheil_sou
- BOOK 4 TEXTO.pdfUploaded byConcepcionBautistaGallegos
- Final 04 SolUploaded byHungDo
- ProductionUploaded byMaheesh
- Literature Review of CrmUploaded byJoney Deep
- 6A._Koporetz_Tom_2-Instrumentation__Process_Control_custom_screen.pdfUploaded bymohamednibin
- Brian F Kinnaman Resume 2013Uploaded byBrian Kinnaman
- Porosity of the SoilUploaded byB S Praveen Bsp
- Oracle 9i Forms Developer Quick NotesUploaded byHéba Noweir
- EPS2007106ORG9058921413MEYER.pdfUploaded bygfjxf khpoa
- eb-10-07Uploaded bySatyanauth Baul
- LG LED LCD 5400.Uploaded byAndrewHallen
- ALU - C++ - GoodUploaded byRajendra Acharya
- Nature 13290Uploaded byUnique Ark
- Inductor ChartUploaded byshaswat_23
- project.docUploaded byashok-871451
- electric energy transformations glowing pickle stem camp 2014Uploaded byapi-260629496
- Tips for FmeaUploaded byENRIQUESG
- 01_Probability of Simple EventsUploaded byKimberly Combs Morrow
- research paperUploaded byapi-405689767
- RedundancyUploaded byCHETSUN
- COURSE REQUIREMENT #3 Critiquing a Research ArticleUploaded byGolda Myere Aguon
- Clare Gallagher_HSMS-An Analysis of System Types and EffectivenessUploaded byDiandra Renya Alison Swift
- Insights for Facebook Pages: Product GuideUploaded byFacebook
- TOK ReflectionUploaded byLawoiri Riffi
- Week3.pptxUploaded byMinh Tieu