of 10

• date post

25-Apr-2018
• Category

## Documents

• view

228

2

Embed Size (px)

### Transcript of Computer Graphics Geometric Modeling - Webcourse (tm) Computer Graphics Copyright 1996 C. Gotsman G....

• 1

Computer Graphics

Copyright 1996 C. Gotsman & G. Elber

Computer Science Dept. Technion

Geometric Modeling

Page 1

Geometric

Modeling

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

2

An Example

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

3

OutlineObjective: Develop methods and algorithms to

mathematically model shapes of real world objects

Categories:

Wire-frame representations

Boundary representations

Primitive based

Freeform based

Meshes & subdivision

Volumetric representations

Freeform based

Voxel Based

Octree Based

Trivariate Functions

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

4

Wire-Frame Representation

Object is represented as as a set of points and edges (a graph)

containing topological information.

Used for fast display in interactive systems.

Can be ambiguous:

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

5

Ambiguity

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

6

Volumetric Representation

Voxel basedSpace subdivided into equal size boxes each has on/off flag according to if inside/outside object

Scalar values (e.g. density) per voxel are also common

Common in imaging applications (CT,MRI,Ultrasound)

Memory consuming

Extension Octree (recursive construction).

Advantage: simple and robust Boolean operations, in/out tests, can represent and model the interior of the object.

Disadvantage: memory consuming, non-smooth, time consuming to manipulate.

• 2

Computer Graphics

Copyright 1996 C. Gotsman & G. Elber

Computer Science Dept. Technion

Geometric Modeling

Page 2

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

7

Display Iso surfaces

Difficulty to display volumetric content.

Instead we can represent the boundary of the volume,

solving for T(u, v, w) = T0

Marching cubes examine each individual cube (eight

neighboring voxels) and locally decide the shape of the

iso surface there.

Result is a polygonal approximation of the iso surface.

-3

-3

-3

+3-3

+3

-3

+3

-3

+3

-4

+8+8

+8

-8

-8

T0 = 0

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

8

Constructive Solid Geometry

Use set of volumetric primitives

Box, sphere, cylinder, cone, etc

For constructing complex objects

use Boolean operations

Union

Intersection

Subtraction

Complement

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

9

CSG Trees

Operations performed

recursively

Final object stored as

sequence (tree) of

operations on

primitives

packages

mechanical parts fit well

into primitive based

framework

Can be extended with

free-form primitives

C2

B2

S S C3 2 2

S S B2 1 2

C1

B1

S B C1 1 1

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

10

Freeform Representation

Explicit form: z = z(x, y)

Implicit form: f(x, y, z) = 0

Parametric form: S(u, v) = [x(u, v), y(u, v), z(u, v)]

Example origin-centered sphere of radius R:

],[],2,0[),sin,cossin,coscos(),,(

0

:

:

22

2222

222222

RRRzyx

Rzyx

yxRzyxRz

:Parametric

Implicit

Explicit

Explicit is a special case of

implicit and parametric form

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

11

A representation of choice

What makes a good representation for

solid modeling?

Ease/Intuitive shape manipulation

Class of representable models

Ease of display and evaluation

Ease of query answering such as inside/outside,

subdivision, interference

Robustness and accuracy

Closure under operations such as Booleans.

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

12

Intuitive Curve Editing

• 3

Computer Graphics

Copyright 1996 C. Gotsman & G. Elber

Computer Science Dept. Technion

Geometric Modeling

Page 3

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

13

Splines Free Form Curves

To allow control of curves need description via set of

basis functions + coefficients

Require geometric meaning of coefficients (base)

Approximate/interpolate set of positions, derivatives, etc..

Typically parametric

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

14

Polynomial Bases

Monomial basis {1, x, x2, x3, }

Coefficients are geometrically

meaningless

Manipulation is not robust

Number of coefficients =

polynomial rank

We seek coefficients with geometrically intuitive meanings

Polynomials are easy to analyze, derivatives remain polynomial,

etc.

Other polynomial bases (with better geometric intuition):

Lagrange (Interpolation scheme)

Hermite (Interpolation scheme)

Bezier (Approximation scheme)

B-Spline (Approximation scheme) Lagrange

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

15

Mathematical Continuity

C1(t) & C2(t), t [0,1] - parametric curves

Level of continuity of the curves at C1(1) and C2(0) is:

C-1: C1(1) C2(0) (discontinuous)

C0: C1(1) = C2(0) (positional continuity)

Ck, k > 0 : continuous up to kth derivative

Continuity of single curve inside its parameter domain is

similarly defined - for polynomial bases it is C

kjCCjj

0),0()1( )(

2

)(

1

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

16

Geometric Continuity

Mathematical continuity is too strong a requirement

May be relaxed to geometric continuity

Gk, k 0 : Same as Ck

Gk, k =1 : C'1(1) = C'2(0)

Gk, k 0 : There is a reparameterization of C1(t) & C2(t), where the two are Ck

E.g.

C1(t)=[cos(t),sin(t)], t[/2,0]

C2(t)=[cos(t),sin(t)], t[0,/2]

C3(t)=[cos(2t),sin(2t)], t[0,/4]

C1(t) & C2(t) are C1 (& G1) continuous

C1(t) & C3(t) are G1 continuous (not C1)

C1

C2, C3

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

17

More on Continuity Consider a set of points {Pi}i=0,n

A piecewise constant interpolant will be C-1

A piecewise linear interpolant will be C0

Polyhedra are usually piecewise linear approximation

of freeform polynomials

Polyhedra are C0 continuous

Higher order polynomials posses better continuity

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

18

Cubic Hermite Basis

The set of polynomials of degree k is a linear vector

space of degree k+1

The canonical, monomial basis for polynomials is

{1, x, x2, x3,}

Define geometrically-oriented basis for cubic

polynomials

hi,j(t): i, j = 0,1, t[0,1]

Has to

satisfy:

..\..\Applets\applets\lagrange\GermanApplet.html../../Applets/applets/lagrange/html/index.html

• 4

Computer Graphics

Copyright 1996 C. Gotsman & G. Elber

Computer Science Dept. Technion

Geometric Modeling

Page 4

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

19

Hermite Cubic Basis (contd)

The four cubics which satisfy these conditions are

Obtained by solving four linear equations in four

unknowns for each basis function

Prove: Hermite cubic

polynomials are linearly

independent and form a

basis for cubic

polynomials

)1()()1()(

)32()(1)32()(

2

11

2

10

2

01

2

00

ttthttth

ttthttth

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

20

Hermite Cubic Basis (contd)

Lets solve for h00(t) as an example.

h00(t) = a x3 + b x2 + c x + d

must satisfy the following four

constraints:

Four equations and four unknown to solve for.

.230)1('

,0)0('

,0)1(

,1)0(

00

00

00

00

cbah

ch

dcbah

dh

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

21

Hermite Cubic Basis (contd)

Let C(t) be a cubic polynomial defined as the linear

combination:

What are C(0), C(1), C(0), C(1) ?

Pi

)()()()()( 111100011000 thTthTthPthPtC

Hermite

C(0) = P0, C(1) = P1, C(0) = T0, C(1) = T1

To generate a curve through P0 & P1 with slopes T0 &

T1 use

)()()()()( 111100011000 thTthTthPthPtC

Geomertic Modeling I - Center for Graphics and Geometric Computing,

Technion

22

Parametric Splines

So far we solve for a single explicit function C(t)