lec4a wireframe

Upload: sathishjey

Post on 04-Jun-2018

245 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Lec4a Wireframe

    1/32

    Lecture 3 1

  • 8/13/2019 Lec4a Wireframe

    2/32

    Wire frameSurface

    Solid

    Pemodelan Permukaan Pemodelan PepejalPemodelan Kerangkadawai

    Lecture 3 2

  • 8/13/2019 Lec4a Wireframe

    3/32

    What we cover?

    ype o en esTopologies and geometriesWhy we need certain number of

    commands to modelParametric entities and itsdevelopment toward surface

    Lecture 3 3

  • 8/13/2019 Lec4a Wireframe

    4/32

    Types of entityLine

    Y

    Polyline

    Y

    Y

    X

    Curves3D Polyline

    Lecture 3 4

  • 8/13/2019 Lec4a Wireframe

    5/32

    Definition Topology and geometry

    is the connectivity and associativity of the objectentities. Topology states that L1 shares vertex with L2

    Geometris metric information which defines the entities of theobejcts. Geometry states that the coordinates of thevertices of a lines.

    Geometric modeling requires both topology and geometry asits low-level model definition.

    Lecture 3 5

  • 8/13/2019 Lec4a Wireframe

    6/32

    Importance of topology andgeometric in model definition

    ,has the same low-level definition

    Determine the manipulation of the entities

    space

    Lecture 3 6

  • 8/13/2019 Lec4a Wireframe

    7/32

    Understanding topology andgeometry

    other topology. Geometry has horizontalrelationship with topology.

    Line

    Topology GeometryCurve Straight line

    Lecture 3 7

  • 8/13/2019 Lec4a Wireframe

    8/32

    Understanding topology andgeometry cont

    Same topology but different geometry

    Lecture 3 8

  • 8/13/2019 Lec4a Wireframe

    9/32

    Geometry of curves

    their arrays of points or by theirmathematical re resentations.Mathematical representation is preferable

    description due to its practicality forcomputational purposes.The mathematical representation can be

    parametric

    Lecture 3 9

  • 8/13/2019 Lec4a Wireframe

    10/32

    Curve representation: implicit Line

    f(x,y) = 0 =

    0)x(xy)y(yx)xy(x)yx(y 1211211212 =+

    Circle 0r yx 222 =+

    Elli se

    1 by

    ax

    22

    =

    +

    xayn

    0i

    ii

    = =

    Curve

    Lecture 3 10

    verticescontroltotal1nwithtcoefficienisawhere +

  • 8/13/2019 Lec4a Wireframe

    11/32

    Curve representation: parametric

    Line x = x(t)y = y(t)

    t)((t)t)x(xxx(t) 121121 +=+= y y y y

    z = z(t)where

    t)sin(2r (t)t)cos(2r x(t) == y

    10 t

    t)sin(2 by(t)t)cos(2ax(t) ==

    ta(t)tax(t)n

    0i

    ii

    n

    0i

    ii

    == ==

    y

    urve

    Lecture 3 11

    verticescontroltotal1nwithtcoefficienisawhere +

  • 8/13/2019 Lec4a Wireframe

    12/32

    Circle: Implicit and ParametricrepresentationParametric

    Parametric representation generates evenly spaced points andhence generates more smooth curves.

    Lecture 3 12

  • 8/13/2019 Lec4a Wireframe

    13/32

    Synthetic curve representation

    n erpo a on me oCubic, cubic spline (piecewise polynomial)

    Approximation methodBezier, B-Spline, Non-rational & rational curve,uniform and non-uniform

    Lecture 3 13

  • 8/13/2019 Lec4a Wireframe

    14/32

    Parametric Cubic

    3i

    Parametric Cubic Equation

    0iia=

    =

    0123 atatataP(t) +++=

    P(t): point on the curve

    a i:algebraic coefficient

    Lecture 3 14

  • 8/13/2019 Lec4a Wireframe

    15/32

    Parametric Cubic: cont

    t = 1 P(1) = a 3 + a 2 + a 1 + a 0 eq2

    e e angen a ant = 0 P(0) = a 1 eq3

    t =1 P(1) = 3a 3 + 2a 2 + a 1 eq4

    Set the equation a0, a1, a3 and a4 in terms of P(0), P(1),P(0) and P(1) and insert into the parametric cubic equation.

    P(t) = (2t 3 3t 2 + 1)P(0) + (-2t 3 + 3t 2 )P(1) +

    (t 3 2t 2 + t)P(0) + (t 3 t 2 )P(1)

    Lecture 3 15

  • 8/13/2019 Lec4a Wireframe

    16/32

    Parametric Cubic: cont

    x(t) = (2t 3 3t 2 + 1)x(0) + (-2t 3 + 3t 2 )x(1) +

    (t 3 2t 2 + t)x(0) + (t 3 t 2 )x(1)

    y(t) = (2t 3 3t 2 + 1)y(0) + (-2t 3 + 3t 2 )y(1) +(t 3 2t 2 + t)y(0) + (t 3 t 2 )y(1)

    Used constraint: slope of the end point.

    Matrix representation

    ]1[

    ]0[

    1233

    1122

    23 P

    P

    ]1[']0['

    00010100

    PP

    Lecture 3 16

  • 8/13/2019 Lec4a Wireframe

    17/32

    Cubic Spline

    Spline is introduced to replace flexiblecurve. Flexible curve enables the continuitof the curve to second derivative (C 2)

    u c sp ne s a spec a or parame r c cu c(first derivative at each ends of thesegment) with ensure continuity at secondderivative. Therefore, smoother curve isgenerated.

    Lecture 3 17

  • 8/13/2019 Lec4a Wireframe

    18/32

    Curve continuity

    Lecture 3 18

  • 8/13/2019 Lec4a Wireframe

    19/32

    Cubic spline: cont

    01

    2

    2

    3

    3 atatataP(t) +++=Cubic polynomial equation

    23 a2ta6(t)P" +=Second derivative

    At P i end point of segment curve i-1 when t =1

    start point of segment curve I when t = 0

    P i-1 (1) = P i(0)

    At P i+1 end point of segment curve i when t =1

    start point of segment curve i+1 when t = 0

    P i(1) = P i+1 (0)

    Lecture 3 19

  • 8/13/2019 Lec4a Wireframe

    20/32

    Cubic spline: cont

    '' i1111 ++ iiiii

    If second derivatives both end point of curvesegment i-1 and start point of curve segment

    ,spline

    Lecture 3 20

  • 8/13/2019 Lec4a Wireframe

    21/32

    Interpolation vs approximation

    It is originated for data-fitting.The curve enerated will o throu h thevertices

    The curve is not necessarily passingthrough all of the vertices

    Generate free-form surface.Suitable to model car body, hull etc.

    Lecture 3 21

  • 8/13/2019 Lec4a Wireframe

    22/32

    Bezier Curve

    0)()( ==

    N

    ii BiPt P

    :1+ verticestotal N

    Bi is blending function

    )1()!(

    =i vvi N i B

    Lecture 3 22

  • 8/13/2019 Lec4a Wireframe

    23/32

    Bezier Curve: example , , , , , ,

    P(t)= P(0)(1-t) 3 + P(1)3t(1-t) 2 + P(2) 3t 2 (1-v) + P(3)v 3

    Therefore

    x(t)= x 0 (1-t) 3 + x 13t(1-t) 2 + x 2 3t 2(1-v) + x 3 v 3

    y(t)= y 0 (1-t) 3 + y 13t(1-t) 2 + y 2 3t 2(1-v) + y 3 v 3

    Lecture 3 23

  • 8/13/2019 Lec4a Wireframe

    24/32

    Bezier Curve: example

    1,4

    3,5t x y0 0 0

    0.1 0.102 0.347

    0.2 0.216 0.616

    0.3 0.354 0.849

    0.4 0.528 1.088

    2,2

    . . .

    0.6 1.032 1.752

    0.7 1.386 2.261

    0.8 1.824 2.944

    0,0

    0.9 2.358 3.8431 3 5

    Lecture 3 24

  • 8/13/2019 Lec4a Wireframe

    25/32

    B-Spline Curve

    Bezier Curve,connected end to end.

    1

    )()(

    1

    0 ,

    t t t for

    V t N t P

    ii

    i ik i

    +

    =

    =

    introduced. Thisdegree functionbasically pushes thecurve away.

    0,

    and

    otherwiset i =

    )()(

    )()(

    )(1,1

    11,

    1, t N t t

    t t t N

    t t t t

    N k iik i

    k ik i

    ik i

    ik i +

    ++

    +

    +

    +

    =

    Ni,k : blending function

    Lecture 3 25

  • 8/13/2019 Lec4a Wireframe

    26/32

    B-Spline: k = 2 and k = 3

    )()(

    )()(

    2,02

    2,00

    3,0 t N t t

    t t t N

    t t t t

    N

    +=

    = near 1

    2

    )()(

    )()(

    )()(

    2,1

    23

    32,1

    12

    13,1 t N t t

    t t t N

    t t t t

    N

    +=

    )()(

    )()(

    103

    100

    20 t N t t

    t N t t

    N

    +=

    k =30

    3

    )()(

    )()(

    )()(

    1,124

    41,1

    13

    12,1

    ,

    23

    ,

    02

    ,

    t N t t

    t t t N

    t t t t

    N

    t t t t

    +=

    4

    Lecture 3 26

    ...

  • 8/13/2019 Lec4a Wireframe

    27/32

    B-Spline: k = 4

    k = 4 1

    2

    )()(

    )()(

    )()()(

    5

    4,114

    44,0

    03

    04,0

    t t t t

    t N t t

    t t t N

    t t t t

    N

    +=

    ...

    )()( 4,1254,1

    144,1 t t t t

    =0

    3

    4

    Lecture 3 27

  • 8/13/2019 Lec4a Wireframe

    28/32

  • 8/13/2019 Lec4a Wireframe

    29/32

    Rational Curve

    space. It is referred as weight (w(t))

    Parametric curve = , ,

    Rational CurveP(t) = [ x(t)/w(t), y(t)/w(t), z(t)/w(t) ]

    Lecture 3 29

  • 8/13/2019 Lec4a Wireframe

    30/32

    Homogenous CoordinateCoordinate declaration

    (x, y, z)

    Homogenous coordinate(x*, y*, z*, h)

    W

    h: scalar vector

    Homogenous coordinate

    ( x*/h, y*/h, z*/h, 1)Ph (x,y,h)

    P2d (x/h,y/h,1)1

    X

    Lecture 3 30

    Y

  • 8/13/2019 Lec4a Wireframe

    31/32

    Disadvantages of wire frame

    u p e n erpre a on

    Lecture 3 31

  • 8/13/2019 Lec4a Wireframe

    32/32

    Disadvantages of wire frame

    Ambiguousm l

    Unreal object

    line)so ne

    Lecture 3 32

    (a) (b)