Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

Coordinate Systems in geometric modeling software

 Screen Coordinate System (SCS)


 Model Coordinate System or Global Coordinate System | (MCS/GCS)
 Working Coordinate System or Local Coordinate System (WCS/LCS)
 Viewing Coordinate System (VCS)
Computer-aided design Slide #1
Characteristics of a geometric modeling software

 Better visual representation

 User friendly

 Computationally inexpensive (CPU memory, CPU time)

 Reduced calculations to produce geometry

Computer-aided design Slide #2


Representation of Point

P (x,y)

Lowest Entity in Geometric Modelling

Computer-aided design Slide #3


Vector-Matrix Representation of Point

P(x,y,z) = P [x y z]T

p(x,y,z)

Computer-aided design Slide #4


What is Non-Parametric Representation?

 It is also called as Algebraic Representation in a simple form.

 In algebraic representation we have two types:

(a) Explicit Representation

(b) Implicit Representation

Computer-aided design Slide #5


(a) What is Explicit Representation?
 Curve in 2D: y = f(x)

e.g. a straight line: y = ax + b

 Curve in 3D: y = f(x), z = g(x)

 Surface in 3D: z = f(x,y) What are the drawbacks?

 One to one correspondence:


for one value of x there is one value of y.

Computer-aided design Slide #6


Disadvantages of Explicit Representation

How about a vertical line x = c as y = f(x)?


 What about a closed curve such as circle or to a curve that gives several
‘y’ values corresponding to an ‘x’ (e.g. Spiral curve).

 Dependent on coordinate system


Therefore, rarely used in computer graphics

Computer-aided design Slide #7


(b) What is Implicit Representation?

Curve in 2D: f(x,y) = 0


– Line: ax + by + c = 0
– Circle: x2 + y2 – r2 = 0
Surface in 3D: f(x,y,z) = 0
– Plane: ax + by + cz + d = 0
– Sphere: x2 + y2 + z2 – r2 = 0 What are the drawbacks?

f(x,y,z) can describe 3D object:


– Inside: f(x,y,z) < 0
– Surface: f(x,y,z) = 0
– Outside: f(x,y,z) > 0

Computer-aided design Slide #8


Disadvantages of Implicit Representation

 Equation is solved to find its roots (y and z values) if a certain value of x is given.

 If the slope of a curve at a point is vertical or near vertical, its value becomes
infinity or very large, a difficult condition to deal with in computing

Both explicit and implicit non parametric curve representations are axis
dependent (x, y). choice of coordinate system affects the ease of use. (curve
should be axis independent)

 If curve is displayed as series of points or line segments, it is compute intensive

 The points on axes–dependent non parametric curve are not evenly distributed.

Computer-aided design Slide #9


Parametric Form of Point

We represent coordinates of each point as a function of single


parameter (say) u. umax
P(u) P’(u)
 x = x(u)
umin
 y = y(u) p(x,y,z)

 z = z(u)
P(x,y,z) = P(u) = [x(u) y(u) z(u)]T
P’(u) = [x’(u) y’(u) z’(u)]T
Can also be written as
Slope of a straight line can be expressed as
Computer-aided design Slide #10
Advantages of Parametric Form

1. Suitable for closed and multi-valued curve


2. When x’(u) = 0, the slope is infinite. Hence an infinite slope
can be defined by letting one component of the tangent
vector be zero. Computational difficulty is avoided by using a
parametric derivative.
3. Since a point on a parametric curve is specified by a single
parameter (u), the parametric form is axes independent.
4. The curve end points and length are fixed by the parametric
range umin≤u≤umax
Often, it is convenient to normalize the range as 0≤u≤1

Computer-aided design Slide #11


Modeling Analytic Curves
(Straight Line)

Computer-aided design
Parametric Representation of a Line

There are various ways to draw a line. Simple


method:

Computer-aided design
Parametric Representation of a Line

P = P1+ (P–P1)

(P–P1) is proportional to (P2 – P1)

P-Equation:

P(u) = P1 + u(P2 – P1) | 0≤u≤1


Computer-aided design
Parametric Representation of a Line

In Vector Matrix form:


P(u) = P1 + u(P2 – P1)

In scalar form: x(u) = x1 + u(x2 – x1)


y(u) = y1 + u(y2 – y1)
z(u) = z1 + u(z2 – z1)

Tangent vector: P’(u) = [x’(u) y’(u) z’(u)]

Computer-aided design
Parametric Representation of a Line

Position Vector: P(u) = P1 + u(P2 – P1)

Tangent Vector: dP(u)/du = P’(u) = (P2 – P1)


Or (x2 – x1), (y2 – y1) and (z2 – z1) in scalar form
Observations:
1. The independence of the TV from u indicates the constant slope of straight line.
2. For a 2-D line the infinite slope and zero slope can be obtained by letting x’(u) = 0
and y’(u) = 0, respectively.

Computer-aided design
Parametric Representation of a Line

Computer-aided design
Model Solution for a Parametric Line
For the position vectors: P1[2 3] and P2[4 5]
(a)Write down a parametric equation
(b)Write down a scalar form
(c)Write down a Tangent Vector
(d)Find out slope
(e)Find out length
(f) Unit vector in the line direction

Computer-aided design
Model Solution for a Parametric Line
For the position vectors: P1[2 3] and P2[4 5]
(a)Write down a parametric equation

P(u) = P1 + u(P2 – P1) | 0≤u≤1

P(u) = [2 3] + u([4 5] – [2 3])

P(u) = [2 3] + u([2 2])

Computer-aided design
Model Solution for a Parametric Line
For the position vectors: P1[2 3] and P2[4 5]
(b) Write down a scalar form

x(u) = x1 + u(x2 – x1)


= 2+(4-2)u = 2 + 2u

y(u) = y1 + u(y2 – y1)


3+(5-3)u = 3 + 2u

Computer-aided design
Model Solution for a Parametric Line
For the position vectors: P1[2 3] and P2[4 5]
(c)Write down a Tangent Vector
(d)Find out slope

P(u) = [2+2u 3+2u]


Tangent Vector: P’(u) = [x’(u) y’(u)] = [2 2]

Slope: dP(u)/du = y’(u)/x’(u) = 2/2 = 1

Computer-aided design
Model Solution for a Parametric Line
For the position vectors: P1[2 3] and P2[4 5]
(e) Find out length

Computer-aided design
Model Solution for a Parametric Line

Computer-aided design
Parametric Line [Tut-1]
For the position vectors: P1[1 2 3] and P2[4 5 6]
(a)Write down a parametric equation
(b)Write down a scalar form
(c)Write down a Tangent Vector
(d)Find out slope
(e)Find out length
(f) Unit vector in the line direction

Computer-aided design
Parametric Line [Tut-2]

Computer-aided design
Parametric Line [Tut-3]
Correlate the following CAD/M command to it’s
mathematical foundation: The command that
measures the angle between two intersecting
lines.

Computer-aided design
Parametric Line [Tut-4]
Find equations of 3 lines: L1, L2 and L3 shown in
Fig. Are L1 and L2 perpendicular? Are L1 and L3
parallel?

Computer-aided design
Parametric Line [Tut-4]
Find equations of 3 lines: L1, L2 and L3 shown in
Fig. Are L1 and L2 perpendicular? Are L1 and L3
parallel?
L1 & L2 Perpendicular:

(P2-P1).(P3-P1) = (4)(0)+(0)(3) = 0 Hence the proof

Computer-aided design
Parametric Line [Tut-5]
Find angles between pair of lines in (a) and (b).

4,4 4,4
(a) (b)
5,5 5,5

1,1 1,1

3,3 3,3

(a) n1.n2 = 1 (b) n1.n2 = -1

Computer-aided design

You might also like