Sie sind auf Seite 1von 33

Introduction to Modeling

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 1
WhatisModeling
a process of constructing a virtual 3D
graphicsobject
Modeling tools: creating and constructing
complex3Dmodelsfastandeasy.
Rendering is a process of creating images
fromgraphicsmodels.

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 2
Agraphicsmodel
geometricaldescriptions(particles,vertices,
polygons) and associated attributes (colors,
shadings,transparencies,materials)
canbesavedinafileusingastandard(3D
model)fileformat.

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 3
Models

Organizationalmodels:hierarchies
representinginstitutionalbureaucracies

Quantitativemodels:equationsdescribing
econometric,financial,socialogical,...
systems

Geometricmodels:collectionsof
componentswithwelldefinedgeometryand
theirinterconnections

Deformablemodels:thatchangeforms

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 4
Copyright @ 2003 by Jim X.
Chen: jchen@cs.gmu.edu 5
POLYGON MESHES

list of vertices - polygon; list of edges - polygon


list of polygons -- objects
Plane equation from 3 vertices:
Ax+By+Cz+D=0
Normal: (A,B,C) = k(P1P2 x P1P2)
A, B, and C are proportional to the signed areas
of the projections of the polygon onto the (y, z),
(x, z), and (x, y) planes. If the polygon is parallel
to the (x, y) plane, then A = B = 0.

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 6
QUADRIC SURFACES

Quadric Surfaces
The implicit surface equation of the form
defines the family of quadric surfaces:
ax2 +by2 +cz2 +2(dxy+eyz+fxz+gx,+hy+jz)+k=0
Sphere
x2+y2+z2 =R2 ;orinparametricform
x=rcoscos,y=rcossin,z=rsin
Ellipsoid
2 2 2
(x/a) +(y/b) +(z/c) =1;orinparametricform
x=acoscos,y=bcossin,z=csin
Torus
[r((x/a)2 +(y/b)2 )1/2 ]2 +(z/c)2=1;or
x=a(r+coscos,y=b(r+cossin,z=csin
Copyright @ 2003 by Jim X.
Chen: jchen@cs.gmu.edu 7
Superquadrics
supperellipse: x=acoss,y=bsin s
supperellipsoid
x=rcosscost,y=rcoss sint,z=rsins

Blobby Objects
Some objects do not maintain a fixed shape, but
change their surface characteristics in certain
motions or when in proximaity to other objects.
One way to model: combinations of Gaussian
density functions, or bumps:
T
bk e
k
a k X k2 y k2 z k2
whereTisathreshold

andaandbaretoadjusttheamountof
blobbiness
Copyright @ 2003 by Jim X.
Chen: jchen@cs.gmu.edu 8
PARAMETRIC BICUBIC SURFACES
General form of cubic curve: Q(u) = U M G
where G, the geometry vector, is a constant
If we allow G to vary in 3D along some path:
G1 (t )
G (t )
Q( s, t ) S M G (t ) S M 2
G3 (t )

G (t
4 )
Then, a functional description is often tesselated
to produce a polygon-mesh approximation to the
surface (trianglular polygon patches)
For a fixed t1, Q(s, t1) is a curve because G(t1) is
constant. If Gi (t) are cubics, the surface is said
to be a parametric bicubic surface
Copyright @ 2003 by Jim X.
Chen: jchen@cs.gmu.edu 9
Hermite Surfaces
P1 2 2 1 1
P 3 3 2 1
Curve: x(u ) u 3 u2 u 1 Mh 4
R1 and Mh
0 0 1 0

R4 x 1 0 0 0
x(0,0)
P1 (t ) x(0,1)
P (t )
P1x (t ) T M h
Surface: x ( s, t ) S M h 4 , (0,0)
R1 (t ) t

R (t
4 ) x x ( 0,1)
t

Since: P1 (t ) P4 (t ) R1 (t ) R4 (t ) x T M h GHx
T

we have:
Copyright @ 2003 by Jim X.
Chen: jchen@cs.gmu.edu 10
P1 (t )
P (t )
x ( s, t ) S M h 4 S M h GHx M hT T T
R1 (t )

R4 (t )
Where

x(0,0) x(0,1) x(0,0) x(0,1)
t t

x(1,0) x(1,1) x(1,0) x(1,1)
GHx t t
2 2
s x(0,0) s
x(0,1)
st
x(0,0)
st
x(0,1)

x(1,0)
x(1,1)
2
x(1,0)
2
x(1,1)
s s st st

Where x coordinates, coordinates of the


tangent vectors and twists are specified
Copyright @ 2003 by Jim X.
Chen: jchen@cs.gmu.edu 11
Just as the Hermite cubic curves, the Hermite
bicubic permits C1 and G1 continuity from one
patch to the next
1st, to have C0 continuity, the matching curves
of the two patches must be identical, which
means the control points for the two surfaces
must be identical along the edge
To have C1 continuity, the control points along
the edge and the tangent and twist vectors
across the edge be equal.
To have G1 continuity, the tangent and twist
vectors across the edge be in the same direction,
but do not need to have the same magnitude. .

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 12
Bezier Surfaces
The Bezier bicubic formulation can be derived in exactly the same way
as above. The results are: x( s, t ) S M b GBx M bT T T

B-Spline Surfaces
The B-Spline bicubic formulation can be derived in exactly the same
way also. The results are: x ( s, t ) S M G M T T T
Bs BSx Bs

Normals to Surfaces
The cross product between the s and t tangent vectors of the surface
Q(s, t) results in the normal at given s and t:

Q ( s, t ) Q ( s, t )
s t

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 13
Solid Modeling Methods
(Modeling Solids)

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 14
Creating solid models.
Volumes
A solid model is defined by volumes.
Hierarchy of entities from low to high:
keypoints lines areas volumes. Areas

You cannot delete an entity if a higher-


Lines &
order entity is attached to it. Keypoints

Volumes
Areas
Lines
Keypoints

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 15
File formats
Representing Solids (solid models) Volumes

The domain of representation should be


large to allow a useful set of physical Areas
objects (solids)
Lines &
The representation should be Keypoints
unambiguous
Volumes
Modeling Tools have their own file Areas

formats Lines
Keypoints

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 16
Simple 3D Half-Spaces
Sphere
Cylinder
Cone
Torus
Box
Plane
it splits space into two infinite half-spaces
you can use an infinite cylinder and two planes to make a capped cylinder
You can also get a box from 6 planes

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 17
Modeling Approaches
Two approaches to creating a solid model:
Top-down
Bottom-up
Top-down modeling starts with a definition of volumes (or areas),
which are then combined in some fashion to create the final shape.

add

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 18
Approaches
Bottom-up modeling starts with keypoints, from which you build up
lines, areas, etc.

You may combine both methods.

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 19
Top-Down Modeling
Top-down modeling starts with a definition of
volumes (or areas), which are then combined in
some fashion to create the final shape.
The volumes or areas that you initially define are called
primitives.
Primitives are located and oriented with the help of the
working plane.
The combinations used to produce the final shape are
called Boolean operations.

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 20
Primitives
2-D primitives include rectangles, circles,
triangles, and other polygons.

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 21
Primitives
3-D primitives: blocks, cylinders, prisms,
spheres, and cones.

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 22
Top-Down Modeling
...Primitives
When you create a 2-D primitive, a modeling tool usually
defines an area, along with its underlying lines and keypoints.
When you create a 3-D primitive, a modeling tool usually
defines a volume, along with its underlying areas, lines and
keypoints.

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 23
Top-Down Modeling
...Primitives
You can create primitives by specifying
their dimensions or by picking locations in
the graphics window.

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 24
Top-Down Modeling
Boolean Operations
Boolean operations: combinations of geometric entities:
add, subtract, intersect, divide, glue, and overlap, etc.
The input to Boolean operations: geometric entities,
simple primitives or complicated volumes imported
from a CAD system.

add

Input entities Boolean operation Output entity(ies)


Copyright @ 2003 by Jim X.
Chen: jchen@cs.gmu.edu 25
Boolean CSG Operations
Union
Addition, A B

Intersection
A B

Difference
Subtraction, A B, A not B
Difference is not commutative

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 26
A more complicated example
Difference of:
Intersection of Sphere and Cube
Union of 3 Cylinders

- =
Copyright @ 2003 by Jim X.
Chen: jchen@cs.gmu.edu 27
Bottom-Up Modeling
Most modeling tools use top-down approach
Low level programming systems usually adopts
with bottom-up modeling

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 28
Primitive Instancing
In a hierachical model, there are parts that are exactly
thesame.
For example,all four wheelsof acar canbethesame
model.
Insteadofsavingfourcopiesofthemodel,wesavejust
oneprimitivemodelandthreeinstances
Ifwemodifytheprimitive,weknowthattheprimitive
andtheinstancesareidenticallychanged.

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 29
Sweep Representations
a 2D area swept along a linear path
normal to the plane of the area to create
a volume
2D/3D along a trajectory through space
defines a new object -- sweep

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 30
More representations
Boundary Representations

describe object by its surface boundaries: shared edges have
pointers to 2 polygons, etc.

Spatial-partitioning representations

Spatial-Occupancy Enumeration
identical solids called voxels (volume elements) arranged in a fixed
regular grid.

Octrees: divide-&-conquer power of subdivision.

Binary Space-partitioning Trees: recursively divide space into
pairs of subspaces, each separated by a plane. Originally used in
determining visible surfaces in graphics.
Copyright @ 2003 by Jim X.
Chen: jchen@cs.gmu.edu 31
Physics-based Modeling
Modeling triangular polyhedron: all vertices
and the surrounding triangular shapes are
congruent

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 32
Modeling Tools
http://www.cs.gmu.edu/~jchen/graphics
Examples in 3D Studio MAX 3, the book

Copyright @ 2003 by Jim X.


Chen: jchen@cs.gmu.edu 33

Das könnte Ihnen auch gefallen