cse590b lecture 5 cubic bezier curves...2d=p1 point sets on line linear quadratic cubic quartic....

46
CSE590B Lecture 5 Cubic Bezier Curves Moving up in degree, Moving up in dimension James F. Blinn JimBlinn.Com http://courses.cs.washington.edu/courses/cse590b/13au/

Upload: others

Post on 05-Feb-2021

5 views

Category:

Documents


3 download

TRANSCRIPT

  • CSE590B Lecture 5

    Cubic Bezier Curves

    Moving up in degree,

    Moving up in dimension

    James F. Blinn JimBlinn.Com

    http://courses.cs.washington.edu/courses/cse590b/13au/

    http://courses.cs.washington.edu/courses/cse590b/13au/

  • Cubic Bezier Curves

    When does cusp/loop happen?

    Parameters at self intersection?

    Implicit Equation?

  • The Grid

    1

    4D=P3

    Surfaces

    in space

    3D=P2

    Curves

    in plane

    2D=P1

    Point sets

    on line

    Linear

    Quadratic

    Cubic

    Quartic

  • Other Dimensions

    x y w 3D algebra Points in P2

    4D algebra

    Points in P3

    x y z w

    2D algebra

    Points in P1

    x w

    P

    1

    4D=P3

    Surfaces

    in space

    3D=P2

    Curves

    in plane

    2D=P1

    Point sets

    on line

    Linear

    Quadratic

    Cubic

    QuarticxXw

    x y

    X Ww w

    x y z

    X Y Zw w w

  • Other Dimensions

    , ,A

    f x y w Ax By Cw x y w B

    C

    Lines in P2

    3D algebra

    Planes in P3

    4D algebra , , ,

    A

    Bf x y z w Ax By Cz Dw x y z w

    C

    D

    Point in P1

    2D algebra ,

    Af x w Ax Bw x w

    B

    P L1

    4D=P3

    Surfaces

    in space

    3D=P2

    Curves

    in plane

    2D=P1

    Point sets

    on line

    Linear

    Quadratic

    Cubic

    Quartic

  • Other Orders

    1

    4D=P3

    Surfaces

    in space

    3D=P2

    Curves

    in plane

    2D=P1

    Point sets

    on line

    Linear

    Quadratic

    Cubic

    Quartic

    2 2, 2x w Ax Bxw Cw Q

    3 2 2 3, 3 3x w Ax Bx w Cxw Dw C

    4 3 2 2 3 4, 4 6 4x w Ax Bx w Cx w Dxw Ew F

    ,x w Ax Bw L

    5 4 3 2 2 3 4 5, 5 10 10 5x w Ax Bx w Cx w Dx w Exw Fw N

  • Other Orders

    1

    4D=P3

    Surfaces

    in space

    3D=P2

    Curves

    in plane

    2D=P1

    Point sets

    on line

    Linear

    Quadratic

    Cubic

    Quartic

    ,A B x

    x w x wB C w

    Q p Q p=

    ,A B B C x x

    x w x wB C C D w w

    C p= C

    p

    p

    p L=

    ,

    A B B C

    B C C D x xx w x w x w

    w wB C C D

    C D D E

    F F

    p p

    pp

    ,A

    x w x wB

    L

  • Quadratic,

    Different dimensions 1

    4D=P3

    Surfaces

    in space

    3D=P2

    Curves

    in plane

    2D=P1

    Point sets

    on line

    Linear

    Quadratic

    Cubic

    Quartic

    ,A B x

    x w x wB C w

    Q

    p Q p=

    , ,A B C x

    x y w x y w B D E y

    C E F w

    Q

    , , ,

    A B C D x

    B E F G yx y z w x y z w

    C F H J z

    D G J K w

    Q

  • Diagram Same Across Dimensions

    P L = 0

    P Q P = 0

    P = 0C

    P

    P

    = C'CT*

    T*

    T*

    F

    P

    PP

    P

    P Q = L

  • Dimensionality and Epsilon

    ijke

    i

    k

    j

    l

    ijkleijke

    i

    kj

    ije

    i j

    3D algebra

    2D geometry

    2D algebra

    1D geometry

    4D algebra

    3D geometry

  • 2D Epsilon

    0 1

    1 0e

    K L K L

    QQ-2detQ =

    QQ*

    Adjugate of Matrix

    Determinant of Matrix

  • 3D Epsilon

    0 0 0 0 0 1 0 1 0

    0 0 1 0 0 0 1 0 0

    0 1 0 1 0 0 0 0 0

    e

    P S S P

    1 if is an even permutation of 012

    1 if is an odd permutation of 012

    0 otherwise

    ijk

    ijk

    ijk

    ijk

    ijk

    e

    e

    e

  • 3D Epsilon Usage

    P

    S

    = L

    Q

    Q

    Q* 2

    = det Q

    Q

    Q

    Q

    Adjugate of Matrix

    Determinant of Matrix

    Line thru two points

  • 4D Epsilon

    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0

    0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0

    0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0

    0 0 0 0 0 0 0 0 0 0 0 1

    0 0 0 0 0 0 0 0 0 0 0 0

    0 0 0 1 0 0 0 0 0 0 0 0

    0 0 1 0 0 0 0 0 1 0 0 0e

    0 0 1 0

    0 0 0 0

    1 0 0 0

    0 0 0 0

    0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0

    0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0

    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

    0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 1 0

    0 0 1 0 0 0 0 0

    0 1 0 0 1 0 0 0

    0 0 0 0 0 0 0 0

    0 1 0 0 0 0 0 0

    1 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 0

    1 if is an even permutation of 0123

    1 if is an odd permutation of 0123

    0 otherwise

    ijkl

    ijkl

    ijkl

    ijkl

    ijkl

    e

    e

    e

    =

  • 4D Epsilon Usage

    = E

    P

    S

    T

    =S

    T

    L

    Q

    Q

    Q

    Q

    = 24 det Q

    3 Points = A Plane

    2 Points = A Line Determinant of Matrix

    Q

    Q

    Q = 6 adj Q

    Adjugate of Matrix

  • P1 Quadratic Polynomial

    2 2, 2x w Ax Bxw Cw Q

    p Q p=

    QQ

    discriminant

    1

    4D=P3

    Surfaces

    in space

    3D=P2

    Curves

    in plane

    2D=P1

    Point sets

    on line

    Linear

    Quadratic

    Cubic

    Quartic

    x

    w

    f(x,w)

    x

    w

    f(x,w)

    x

    w

    f(x,w)

    x

    w

    f(x,w)

    x

    w

    f(x,w)

    2- 11 2+1

    1

    1

    1

    Q

    I

    Q

    Q 0 0

  • P1 Cubic Polynomial

    3 2 2 3, 3 3x w Ax Bx w Cxw Dw C

    p= C

    p

    p

    A B B C x x

    x wB C C D w w

    Type 1

    11

    Type 12Type 111Type 3

    1

    4D=P3

    Surfaces

    in space

    3D=P2

    Curves

    in plane

    2D=P1

    Point sets

    on

    Linear

    Quadratic

    Cubic

    Quartic

    Note: can always flip

    sign with 180o rotation

  • 2D Cubic Polynomial Covariants

    p C

    p

    pp

    p

    p

    p

    C C = 0

    = Hpp C C

    C C = 0

    p

    p

    p

    C C

    = 0C

    C

    C = J

    C

    p

    p p

  • Derivatives

    x,w= C

    x,w

    3 2 2 3, 3 3x w Ax Bx w Cxw Dw

    A B B C x xx w

    B C C D w w

    C

    x,w

    2 2

    2 2

    23

    2

    x

    w

    Ax Bxw Cw

    Bx Cxw Dw

    C

    C= 3

    x,w

    C

    x,w

  • Derivatives

    1,0 C

    x,w

    1

    0

    A B B C xx w

    B C C D w

    x,w

    A B x

    x wB C w

    3

    21 1 1 3

    d d d d dx xxx x xx x x x xx x

    dx dx dx dx dx

    xx x x xx x

    x,w =C

    x,w

    x

    x,w

    x,w +C

    x,w

    x

    x,w

    x,w C

    x,wx

    x,w

    +x,w C

    x,w

    x

    x,w

    = 1,0 +C

    x,w

    x,w

    x,w C

    1,0

    x,w

    +x,w C

    x,w

    1,0

    = 1,0 C

    x,w

    x,w

    3

  • Derivatives

    x,w= C

    x,w

    3 2 2 3, 3 3x w Ax Bx w Cxw Dw

    A B B C x xx w

    B C C D w w

    C

    x,w

    2 2

    2 2

    23

    2

    x

    w

    Ax Bxw Cw

    Bx Cxw Dw

    C

    C= 3

    x,w

    C

    x,w

    x,w6 6xx xw

    xw ww

    Ax Bw Bx Cw

    Bx Cw Cx Dw

    C C

    C CC

  • Hessian of cubic

    x,w Hessian det 18xx xw

    xw ww

    C CC

    C CC C x,w

    C CºH

    x,w6 6xx xw

    xw ww

    Ax Bw Bx Cw

    Bx Cw Cx Dw

    C C

    C CC

    2 2det 6 36

    218

    2

    Ax Bw Bx CwAC BB x AD BC xw DB CC w

    Bx Cw Cx Dw

    AC BB AD BC xx w

    AD BC DB CC w

    Hessian det xx xw

    xw ww

    º

    C CC

    C C

  • Other Hessians

    C CH

    Higher orders

    F FH

    N NH

    Higher Dimension

    C C

    C

    H

  • Geometric Meaning of Hessian

    C CH

    H

    H

    2det 2 H

    C C

    C C

    2

    LCL

    L H L

    L

    LL

    L

    L

    0

    MCL

    L L

    M

    L L

    L

    M

    Type 3

    Type 21

    H LL

    ML

    L

    M

    C

    C

    0

    H

    H

    C

    C=

  • Geometric Meaning of Discriminant

    H

    H

    2det 2 H

    C C

    C C

    L K

    L M

    M

    K

    K

    M

    M

    L

    L

    K

    = +...

    MCL

    K L

    M

    K K

    L

    M

    LK

    M K

    M

    LM

    K

    L

    Type 111

    =

    K K

    K KL L

    L L

    M M

    M M

    Negative

  • Types of Cubic

    C CH

    H

    H

    C C

    C C

    2

    H

    H

    0

    Type 1

    11

    Type 12Type 111Type 3

    H 0

    H

    H

    0

    H

    H

    0

  • Discriminant Surfaces

    C C

    C C

    2 2

    3 3 2 2

    62

    4 4 3

    A D ABCD

    AC B D B C

    F/E

    B/E

    QQ 22 AC B

    Quadratic Cubic

    A

    C

    B

    Q

    ?

  • Discriminant Surface 2 2 3 3 2 26 4 4 3 0A D ABCD AC B D B C

    , ,B C D

    X Y ZA A A

    º º º

    2 3 3 2 2

    6 4 4 3 0D B C D C B D B C

    A A A A A A A A A

    2 3 3 2 26 4 4 3 0Z XYZ Y X Z X Y

  • Discriminant Surfaces

    C C

    C C

    2 2

    3 3 2 2

    62

    4 4 3

    A D ABCD

    AC B D B C

    B/A

    C/A

    D/A

    F/E

    B/E

    QQ

    Quadratic Cubic

  • Types of Cubics

    11

    1Type 3Type

    21Type

    111Type

  • Locus of Cubics with

    one (or more) roots at (x,w)=(0,1)

    Plane rolls along surface as root=0 changes

    B/A

    (0,d

    ,d)

    (s,0,0)(0,0,0)

    Slice thru space at D/A

    (a,b,0)

    (0,c,c)

    C/A

    3 2 2 3, 3 3 0f x w Ax Bx w Cxw w

    Tangent

    Three roots: (r1,r2,r3),

    r1=0

  • Less obvious property

    Triple root line is tangent to plane at infinity

  • A New Coordinate System

    cos sinx w r r

    3 34 43 2 2 3 3

    1 14 4

    cos sin3 3

    3 cos3 3 sin3

    A C B DAx Bx w Cxw Dw r

    A C B D

    / 4

    / 4

    3 / 4

    3 / 4

    E A C

    F B D

    G A C

    H B D

    C(x,w)

    33 cos 3 sin

    cos3 sin3

    E Fr

    G H

  • Discriminant in new system

    C C

    C C

    2 2

    3 3 2 2

    62

    4 4 3

    A D ABCD

    AC B D B C

    3

    3

    E G A

    E G C

    F H B

    F H D

    4 2 2 4

    2 2 3 3

    2 2 2 2 2 2 2 2

    4 2 2 4

    3 6 3

    24 24 8 8

    6 6 6 6

    2

    4

    F F E E

    FHE GEF GE HF

    F G F H G E H E

    G G H H

    22 2

    2 2 2

    2 2 2 2

    22 2

    3

    8 3

    64

    8 3

    F E

    HF E F GE FF E

    F E G H

    G H

  • Discriminant Plot in new system

    E/G

    H/G

    F/G

    C C

    C C

    22 2

    2 2 2

    2 2 2 2

    22 2

    3

    8 3

    64

    8 3

    F E

    HF E F GE FF E

    F E G H

    G H

  • Discriminant in EFGH space Zeeman 1976

    Helamon Fergusen

  • Another View of Discriminant

    E/G

    H/G

    F/G

    F/E

    H/E

    G/E

    C C

    C C

    22 2

    2 2 2

    2 2 2 2

    22 2

    3

    8 3

    64

    8 3

    F E

    HF E F GE FF E

    F E G H

    G H

  • Transforming Deltoid to Cardioid

  • Degree 3 Diagrams

    p

    p

    p

    C C

    = 0C

    C

    C = J

    C

    p

    p p

    p

    C

    C

    = 0C

  • Proof of 0

    C

    C

    C

    C

    C

    C

    C

    C

    C

    C

    C

    C

    C

    C

    C C

    C

    C

  • Proof of 0

    p

    p

    p

    C C

    C

    p

    p

    p

    C C

    C

    Mirror

    p

    r

    q

    C C

    C

    q

    r

    p

    C C

    C

    q

    p

    p

    C C

    C b

    q

    q

    p

    C C

    C

    p p p p

    p p p p

    Bx Cw Ax Bw

    Cx Dw Bx Cw

    C

    p

    What about?

    q

    r

    p

    C C

    C

    Write r in terms of p,q

    Or: brute force expansion

  • Skew covariant

    2 3

    2 2

    2 2

    2 3

    3 2

    2

    2

    3 2

    J

    J

    J

    J

    A A D ABC B

    B AC ABD B C

    C ACD B D BC

    D AD BCD C

    C C Cx,w

    x,w

    x,w

    3 2 2 33 3J J J JA x B x w C xw D w ,x w J

    Cx,w

    x,w

    x,w

    3 2 2 33 3Ax Bx w Cxw Dw ,x w C

    2 2

    2 2

    2 0 1 2

    2 1 0 2

    TAC BB AD BC Ax Bxw Cw

    x wAD BC DB CC Bx Cxw Dw

  • Syzygy of J

    C

    C

    C

    C

    C

    p p

    p

    pC

    p p

    C

    C

    C

    C

    C

    p p

    p

    pC

    p p

    C

    p p

    p

    C

    C

    C

    C

    C

    p p

    p

    C

    CC

    pp

    C

    p p

    C

    C

    p

    p

    1

    2= +

    1

    2

    C

    C

    C

    p p

    p

    +=C

    C

    C

    C

    C

    p p

    p

    pC

    p p

    C

    C

    C

    C

    C

    p p

    p

    pC

    p p

  • Terminology

    Q C

    Q C

    Jacobian of Q,C

    = First Transvectant of Q,C

    Second Transvectant of Q,C

    = Apolar Covariant of Q,C

  • Terminology

    A B n2

    ......

    m2

    Jacobian of A,B

    = First Transvectant of A,B

    Second Transvectant of A,B

    = Apolar Covariant of A,B

    A B n1

    ......

    m1

    A B nm

    ......

    m

    mth Transvectant of A,B

  • Terminology using H

    H C

    H C

    Skew = Jacobian of H,C

    = First Transvectant of H,C

    Second Transvectant of H,C

    = Apolar Covariant of H,C = 0