Curves - PowerPoint PPT Presentation

1 / 85
About This Presentation
Title:

Curves

Description:

Subdivision: result to which a subdivision process converges ... We will look at several subdivision schemes for converting a control polyloop ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 86
Provided by: georgeb
Category:

less

Transcript and Presenter's Notes

Title: Curves


1
Curves
  • Path - trajectory - motion
  • Parameterization
  • Designing polyloops
  • Velocity, tangent, curvature, jerk
  • Smoothing polyloops
  • B-spline, Bezier and 4-points subdivisions
  • The Jarek subdivision schemes for polyloops
  • Arc-length parameterization
  • Tangent and curvature estimation
  • Curvature-driven adaptive parameterization

Updated January 25, 2014
2
How to specify a curve?
  • Implicit (equation) x2y2r2
  • Not convenient for walking on the curve
  • Parametric (function) P(s) ( r cos(s) , r
    sin(s) )
  • Polyloop cycles of edges joining consecutive
    points (vertices)
  • Not smooth,unless you use lots of vertices
  • Subdivision result to which a subdivision
    process converges
  • Procedural snowflake, fractal, subdivision

V2
V3
V1
V5
V4
V0
3
It is all about curves
Points, vectors
curves
Shapes
Motions
Animated shapes
4
Outline
  • We will talk about polygonal loops (polyloops) in
    the plane
  • We will discuss algorithms to transform them into
    smooth curves
  • We want to support an intuitive design paradigm
  • A designer adjust the vertices of the control
    polygon (polyloop)
  • The corresponding smooth curve is regenerated
    automatically
  • The effect of an adjustment should be local and
    predictible
  • We will look at several subdivision schemes for
    converting a control polyloop into a smooth curve
  • We will study their properties and look at
    several applications
  • Smooth rendering, culling and clipping
  • Computing intersections, areas
  • We will extend these results to
  • 3D curves
  • Surfaces
  • Animations

5
Geometry review
  • The constructions and algorithms that follow are
    formulated in terms of simple geometric
    constructions that involve points, vectors, and
    operators.
  • We will first
  • provide an overview of these fundamental concepts
  • propose a few convenient operations
  • define our notation

6
Points
  • A point is a location in space (zero dimensional
    entity)
  • Initially space will the plane (later we will go
    3D)
  • How to represent a point P?
  • Assume a known origin O and two orthogonal
    directions I and J (unit basis vectors)
  • Represent P by its two coordinates P(x,y) where
    POxIyJ
  • To get to P
  • start at O,
  • walk x units along the direction I,
  • then y units along the direction J
  • REMEMBER THIS EXPLANATION!
  • It is the key to understanding
  • Coordinate systems
  • Graphic transformations
  • Animations

7
Vectors
  • A vector is either a direction or a displacement
    between two points (locations).
  • We will also use vectors to represent forces and
    velocities.
  • A vector is often represented by its coordinates
    V(x,y)
  • Please do not confuse points and vectors!
  • A direction is a unit vector. It may represent
  • the direction of a ray from the eye through a
    pixel
  • the direction towards the light from a point on a
    surface
  • the tangent to a curve at a specific point
  • a basis vector for expressing the coordinates of
    points
  • Displacement vectors may be computed as point
    subtractions
  • Let V be the displacement vector from A(xA,yA)
    to B(xB,yB)
  • V may be denoted BA, or for short AB
  • Its coordinates may be computed as V (xBxA,
    yByA)
  • Hence, given O, a point P corresponds to the
    vector OP
  • Assuming that the coordinates of the origin O are
    (0,0)

8
Operations on vectors
  • Consider two vectors V(x,y) and V(x,y)
  • Scaling vectors sV (sx,sy)
  • Reversing a vector V(x,y)
  • Adding vectors VV (xx,yy)
  • Subtracting vectors VV (xx,yy)
  • What do the coordinate mean?
  • Consider a basis of two orthogonal unit vectors I
    and J
  • V(x,y) means that VxIyJ
  • Walk x units along I and y units along J

9
Advanced vector operators and notation
  • Let V(x,y) and U(a,b)
  • Length of V is computed by V.normsqrt(x2y2)
  • Unit length vector obtained by normalizing V
    V.unit(1/V.norm)V,
  • Orthogonal vector (rotating V ccw by 90 degrees)
    V.left(y,x)
  • Cascading . notation (left-to-right)
    V.left.norm(V.left).norm
  • Dot product U?Vaxby (a scalar!)
  • When V.normU.norm1, then U?V is the projection
    of U onto V
  • Proof write UcVdV.left(cxdy,dxcy), solving
    for c with x2y21 yields caxby
  • Otherwise U?V is the projection of U onto V
    scaled by the length of V
  • U?V U.normV.normcos(angle(U,V))
  • Properties of dot product
  • U?V V?U
  • (U)?V (V?U)
  • U?V 0 implies that they are orthogonal or one
    has zero length
  • Tangential and orthogonal decomposition U with
    respect to a vector V
  • along V U.along(V)(U?V.unit)V.unit
  • away from V U.away(V)UU.along(V)

10
Walking along an edge
  • Consider an edge from point A to point B denoted
    Edge(A,B)
  • You can use a parameter, s, in 0,1 to identify
    any point P(s) on it P(s)AsAB
  • This is the proper notation start at A and move
    by s along vector AB
  • For convenience, we often use another equivalent
    notation
  • P As(BA)

  • (1s)AsB
  • Note that P(0)A and P(1)B

1s
B
s
P(0.6)
A
11
Closest point on an edge
  • Consider Edge(A,B) and a point P in the plane
  • Compute the point C of Edge(A,B) that is the
    closest to P
  • First compute the parameter s of the orthogonal
    projection H of P on Edge(A,B)
  • Then test it against 0,1 and decide
  • Procedure project (A,B,P)
  • sAP?AB/AB?AB assuming A?B
  • IF 0ltslt1 THEN RETURN AsAB
  • ELSE IF slt0
  • THEN RETURN A
  • ELSE RETURN B
  • To compute closest point to P on polyloop
  • Compute it for all edges and take closest

12
Arclength of an edge
  • Write the procedure L(A,B) that returns the
    arclength of edge (A,B)

13
Total arclength of a polyloop
  • Write the procedure L(C) that returns the total
    arclength of polyloop with vertices Ci, for i
    0, 1, n

14
Terminology (for lack of a better one)
  • A path is a parameterized curve (2D or 3D)
  • A point (of an object) may follow a curve
  • The path indicates where we are along the curve
    at each moment of the animation
  • The orientation of the object is not defined
    (could be pure translation?)
  • A motion defines the evolution of a pose
  • Position and orientation of the local CS or
    object(s) defined in it
  • A trajectory is a motion defined by a path
  • The orientation is defined by the tangent to the
    curve
  • and bi-tangent in 3D

15
Curve and path
  • Given a path P(t), what is the curve traced by
    P(t)?
  • Union of all points P(t)
  • What if P(t) starts at A, moves a few times back
    and forth along the segment (A,B) then finishes
    at B?
  • The path is complicated
  • The curve is trivial

16
Motivation
  • Assume that you have a polyloop P path defined by
    sampling positions Pi or produced by subdividing
    a control polygon L
  • In general, the vertices of P are not uniformly
    spaced
  • Their spacing may reflect the animators desire
    to slow down near turns or at specific places
  • or it may be the undesired side effect of data
    acquisition or creation
  • We may want to re-parameterize P to obtain a path
    P that moves at constant speed if you use
    s(Pi,t,Pi1) on each segment
  • Then, you can warp time (as in project P1a) to
    impose your own speed profile, independently on
    the original sampling of P

17
Example where resampling is needed
  • Subdivision of a bad control polygon

18
Arclength reparameterization
  • Write the procedure for computing a point on the
    polyloop that corresponds to parameter t in 0,1
  • Demonstrate it by animating a point at constant
    speed

19
Research challenge!!!
  • Given a polyloop P, place an ordered set of k
    points along P so that each point is at the same
    Euclidean (shortest) distance to its two
    neighbors.
  • Is is always possible?
  • Is there a deterministic algorithm?
  • Would an iterative algorithms always converge?

20
Polygon area calculation 2 methods
  • Sum of signed areas of triangles, each joining an
    arbitrary origin o to a different edge(a,b)
  • SUM (oa?ob) for each edge (a,b)
  • u?v is the dot product of v with the the vector
    obtained by rotating u by 90
  • Sum of signed areas of trapezoids between each
    oriented edge and its orthogonal projection
    (shadow) on the x-axis

y
by
b
a
ay
x
ax
bx
area(a,b)(ayby)(bxax)/2
21
Area implementation
  • float area ()
  • float A0
  • for (int i0 iltvn i)
    AtrapezeArea(Pi,Pthis.in(i))
  • return(A)
  • float trapezeArea(pt A, pt B) return((B.x-A.x)(B
    .yA.y)/2.)

22
Centroid of polygonal region
  • Weighted sum of centroids of trapezoids
  • Weight signed area of trapezoid / total area

23
Centroid of trapezoid
  • Any line through centroid cuts shape in 2 parts
    with same moment
  • x 0?1 sy(s)ds / 0?1 y(s)ds, with y(s)as(ba)
  • x 0?1 (ba)s2 as ds / 0?1 (ba)s a ds
  • x(a2b)/(3(ab))
  • Similar derivation
  • y (a2abb2)/(3(ab))

y
b
a
(x,y)
x
0
1
24
Implementation of centroid
  • pt barycenter () G.setTo(0,0)
  • for (int i0 iltvn i)
  • G.addScaledPt(
  • trapezeArea(Pi,Pthis.in(i)),trapezeCente
    r(Pi,Pthis.in(i)))
  • G.scaleBy(1./this.area())
  • return(G)
  • pt trapezeCenter(pt A, pt B)
  • return(new pt(
  • A.x(B.x-A.x)(A.y2B.y)/(A.yB.y)/3.,
    (A.yA.yA.yB.yB.yB.y)/(A.yB.y)/3.)
  • )

25
Principal directions of polyloop
  • For a set of points sampled along the curve
  • Not the same as principal axes (second order
    inertia moments)

26
Implementation of principal direction
  • void showAxis() pt Gthis.barycenter()
    stroke(black) G.show(10)
  • float xx0, xy0, yy0, px0, py0, mx0,
    my0
  • for (int i0 iltvn i) xx(Pi.x-G.x)(P
    i.x-G.x) xy(Pi.x-G.x)(Pi.y-G.y)
    yy(Pi.y-G.y)(Pi.y-G.y)
  • float a atan(2xy/(xx-yy))/2.
  • vec V new vec(50,0) V.rotateBy(a) vec U
    V.makeTurnedLeft()
  • for (int i0 iltvn i) vec
    WG.makeVecTo(Pi) float vddot(W,V) float
    uddot(W,U) if(vdgt0) pxvd else mx-vd
    if(udgt0) pyud else my-ud
  • if(mxgtmax(px,py,my)) V.rotateBy(PI)
    if(pygtmax(px,mx,my)) V.rotateBy(PI/2.)
    if(mygtmax(px,mx,py)) V.rotateBy(-PI/2.)
  • strokeWeight(1) stroke(black)
    V.showArrowAt(G)
  • stroke(black,60) V.turnLeft() V.showAt(G)
    V.turnLeft() V.showAt(G) V.turnLeft()
    V.showAt(G)

27
Questions
  • Describe two techniques for testing whether a
    point q lies inside a polygon P
  • Describe two techniques for computing the area of
    a polygon P
  • Assume that you have a function fill_tri(a,b,c)
    that will visit all pixels whose center falls
    inside the triangle with vertices (a,b,c). Assume
    that each time the function visits a pixel, it
    toggles its status. Initially, all the status of
    each pixel is OFF. Explain how you could turn to
    ON the status of all pixels whose center falls
    inside a polygon P.

28
Motivation
  • Smooth curves and surfaces are used for
    aesthetic, manufacturing, and analysis
    applications where discontinuities due to
    piecewise linear approximations would create
    misleading artifacts.
  • Designers like to specify such curves by
    adjusting a control network with only a few
    vertices
  • How to go from a crude 2D control polyloop
    (black) to a smooth curve (red)?
  • Suggestions?

29
Different requirements
interpolating
smooth
30
Operators on polyloops
Simplification Subsampling
Smoothing Denoising
Subdivision Refinement
Adding noise
31
Motivation for curve smoothing
  • Smooth curves and surfaces are used for
    aesthetic, manufacturing, and analysis
    applications where discontinuities due to
    triangulated approximations would create
    misleading artifacts.
  • Smooth curves may be used to design trajectories
    and paths for moving objects and cameras in
    animations.
  • Designers like to specify such curves by
    adjusting a crude control polygon with only a few
    vertices
  • How to go from a crude control polygon (black)
  • to a smooth curve (red)?
  • Suggestions?

32
Local curve analysis
  • We first investigate local differential
    properties of a polyloop L
  • to measure forces, compare schemes, adjust
    speeds
  • but these are trivial for a polyloop
  • straight line segments (zero curvature)
  • not differentiable at vertices (infinite
    curvature)
  • So we really want the properties of the smooth
    curve or path J defined by L
  • tangent, normal, acceleration, curvature, jerk
  • but, we usually do not know J
  • it may be defined as the limit of a smoothing
    process
  • Therefore, we use discrete estimators for these
    properties

33
Velocity at a vertex V(B)(ABBC)/2
  • Let A,B,C,D,E be consecutive vertices in L
  • AB, BC, are the edges of L
  • J is the unknown smooth curve passing through the
    vertices
  • When traveling along J from A to B, it takes 1
    sec.
  • Hence the average velocity vector for that
    segment is AB.
  • Hence the velocity at B is estimated as
    V(B)(ABBC)/2

34
Implementing V(B)(ABBC)/2
  • class vec float x,y
  • vec average(vec U, vec V) return(new
    vec((U.xV.x)/2,(U.yV.y)/2))
  • void unit() float nsqrt(sq(x)sq(y)) if
    (ngt0.000001) x/n y/n
  • class pt float x,y
  • vec vecTo(pt P) return(new vec(P.x-x,P.y-y))
  • Write a method for the pt class that computes the
    velocity at point B
  • vec velocity (pt A, pt C)
  • tangent T(B) V(B).unit()

35
Normal at a vertex N(B)AC.left().unit()
  • The normal N(B) at B is the unit vector
    orthogonal to AC.
  • We pick the one pointing left N(B)AC.left().unit
    ()
  • class vec float x,y
  • void left() float wx x-y yw
  • void unit() float nsqrt(sq(x)sq(y)) if
    (ngt0.000001) x/n y/n
  • Write a method for the pt class that computes the
    normal at point B
  • vec normal (pt A, pt C)

36
Acceleration at a vertex g(B)BCAB
  • The acceleration at B is the velocity change
    g(B)BCAB
  • It is useful for computing forces during
    animation (dynamics)
  • Write a method for the pt class that computes the
    acceleration at point B
  • vec acceleration (pt A, pt C)

37
Radius of curvature r(B)V2/(2AB?N(B))
  • The radius r(B) of curvature (sharpness of turn
    in the path) at B could be estimated as the
    radius of the circle through A, B, and C, but
    this approach yields unexpected results when the
    angle at b is acute.
  • I prefer to use the parabolic curvature,
    r(B)V2/(2h), where V is the magnitude of V(B)
    and where h is the distance from B to the
    Line(A,C).
  • hAB?N(B) is the normal component of g(B)
  • It measures the centrifugal force
  • Curvature 1/r(B)
  • Write a method for the pt class that computes the
    r(B) at point B
  • vec radiusOfCurvature (pt A, pt C)

38
Jerk j(B,C)AD3CB
  • It is the change of acceleration between B and C.
    It measures the change in the force felt by a
    person traveling along the curve
  • j(B,C) g(C)g(B)
  • (CDBC)(BCAB) CDCBCBAB
  • ABBCCD CBCBCB AD3CB
  • To show the second degree discontinuities in the
    curve,
  • draw the normal component of j(B,C) at (BC)/2

39
Smoothing a polyloop
  • Given a polyloop L, we wish to move its vertices
    to produce a curve J that resembles L, but is
    smoother (less jerk?)
  • Smoothing does not change the number of vertices,
  • it only moves them

40
Tuck smoothing
  • tuck(s) moves the vertices by executing the
    following two steps
  • For each vertex B, compute M(B)(BABC)/2
  • A (r. C) is the previous (r. next) vertex in the
    cyclic order
  • Moving B to BM(B) brings it to the average of
    its neighbors
  • For each vertex B, move B to BsM(B)
  • Repeating tuck(s) tends to eliminate sharp
    features, but shrinks the curve


41
Avoid oscillations
  • Keep s in 0,2/3 to avoid oscillations

tuck(1)
tuck(1)
42
Avoid shrinking Tuck-tuck smoothing
  • Alternate tuck(s), which shrinks, and tuck(s),
    which expands
  • untuck cannot recover the sharp features lost
    during the tuck

43
Tuck(1/2) dual of dual
  • Tuck(.5) is the dual of the dual
  • refine introduces a new vertex in the middle of
    each edge
  • kill deletes the old vertices
  • dual (refine, kill)
  • tuck(.5) (dual, dual)

refine
kill
44
Cubic fit tuck-tuck (A4B4DE)/6
  • Compute a cubic polynomial curve,
    C(t)at3bt2ctd, through vertices A, B, D, E
    satisfying C(2)A, C(2)E, C(1)B, and C(1)D
  • We want to insert a point CC(0)d between B and
    E. Solve for d
  • C(2)8a4b2cdA and C(2)8a4b2cdE yields
    AE8b2d
  • C(1)abcdB, and C(1)abcdD yields
    AE8b2d
  • AE8b2d and AE8b2d yields 6d4(BD)(AE)
  • d (A4B4DE)/6 MMM/3, with M(BD)/2,
    M(AE)/2)
  • To insert such a cubic fit for each edge
    tuck(2/?6), tuck(2/?6)
  • Note that 2/?60.82, which may be unstable
  • Move towards C

45
Smoothing vs subdivision
  • Smoothing should be performed when the desired
    curve has been densely sampled but the resulting
    polyloop has undesired sharp features
    (acquisition noise, too many details, sharp
    changes in direction or curvature)
  • Subdivision refines the polyloop (adds more
    vertices). It should be performed when the
    polyloop is a crude outline of the desired curve.

subdivision
smoothing
46
Polyloop refine/smooth operators
  • We will use the following operators
  • r (refine) introduces a new vertex in the middle
    of each edge
  • k (kill) deletes the old vertices (those present
    before r)
  • d (dual) performs (r, k)
  • t (tuck) performs tuck(1/2), which is (d, d)
  • us (parameterized untuck) performs tuck(s)
  • u (untuck) performs tuck(1/2), same as u.5
  • Write a polyloops smoothing scheme using these

47
Quadratic uniform B-spline (r,d)
  • Repeating (r,d) converges to a piecewise
    quadratic B-spline curve that interpolates the
    mid-edge points
  • r rd rdrd rdrdrdrd

48
Cubic uniform B-spline (r,t)
  • Repeating (r,t), which is (r,d,d) converges to a
    piecewise cubic B-spline curve that has second
    degree continuity (no jerk)
  • rt rtr rtrt rtrtrt

49
Splittweak B-spline subdivision
  • Given a control polygon, for example (A,B,C,D),
    repeat the following sequence of two steps, until
    all consecutive 4-tuples of control points are
    nearly co-linear.
  • 1. Split insert a new control point in the
    middle of each edge (2,4,6,8)
  • 2. Tweak move the old control points
    half-way towards the average of their new
    neighbors (1,3,5,7)
  • The polyloop converges rapidly to a smooth curve,
    which happens to be a cubic B-spline curve.

50
Can the limit curve self-intersect?
  • Can it self-intersect when P does not?

51
Where do the control vertices converge to?
  • The original control vertex B converges to
    B(A4BC)/6
  • The tangent at B to the B-spline curve is
    parallel to AC

b
c
b
a
52
Local control for B-spline curves
  • Trace the original vertices during subdivision
  • Do they move along straight lines?
  • They subdivide the final curve into spans
  • Each span is influenced by 4 control vertices
  • Each control vertex influences 4 spans
  • Each span converges to a cubic Bezier curve

53
Cubic B-splinetoBezier conversion
  • Introduce 2 new vertices in each edge to split it
    in 3 equal parts
  • Move the old vertices to the average of their new
    neighbors
  • Make groups of 4 consecutive vertices (each
    sharing its old vertices with consecutive groups)
  • Each group is the control polygon (A,B,D,E) of a
    Bezier curve

54
How to evaluate the Bezier control polygon
  • Let t be the parameter in 0,1.
  • Let C(t) be the point on the Bezier curve
    corresponding to t
  • You can compute t as
  • C(t)s( s(s(A,t,B),t,s(B,t,C)) , t , s(s(
    B,t,C),t,s(C,t,D) )
  • where s(A,t,B) returns AtAB
  • Note that this is a cubic polynomial in t

B
D
C(t)
tAB
E
A
55
How to subdivide the Bezier control polygon
  • Perform the evaluation of C(0.5) and keep the
    construction points

56
Convex hull
  • Each Bezier curve lies in the convex hull of 4
    control vertices
  • The convex hull of 4 points in 3D?
  • A tetrahedron
  • The convex hull of 4 points in 2D?
  • Contained in the union of 3 triangles ABD, ABE,
    BDE

57
How can we use the convex hull property?
  • Display uncertainty (region guaranteed to contain
    the limit curve)
  • Shade triangles (in 2D) or tetrahedra (in 3D)
  • Decide when to stop the subdivision
  • All triangles or tetrahedra are nearly linear
  • Quickly decide when two B-spline curves in 2D are
    not intersecting
  • The convex hulls do not overlap
  • Useful for accelerating collision detection and
    for computing the exact collision time

58
Open curves
  • If you want to subdivide an open polygon
  • Trace the original vertices through the
    subdivision process
  • They split the curve into spans (one per original
    edge)
  • Delete the span (vn1,vn) and the two adjacent
    spans
  • v0 should not influence the head (beginning of
    the curve)
  • vn1 should not influence the tail (end)

59
B-spline curves are not interpolating
  • The cubic B-spline is approximating
  • It does not go through the control vertices
  • You may prefer the 4-point, which is interpolating

B-spline (approximating)
4-point (interpolating)
60
4-point subdivision
  • We want to leave the original vertices of L where
    they are.
  • Hence, we displace (bulge-out) each inserted
    mid-edge point C.
  • By how much? Fit a cubit CC(t) through A, B, D,
    and E
  • C(t)at3bt2ctd, and thus C(0)d
  • We use different constraints than the cubic fit
    tuck-tuck!
  • BC(1) abcd
  • DC( 1) abcd
  • AC(3) 27a9b3cd
  • EC( 3) 27a9b3cd
  • CC(0)dMMM/8

M(BD)/2bd
M9M8d
M(AE)/29bd
8MMM8d
subdivision bulge MM/8
61
Implementing 4-point subdivision
  • Design the construction of CMMM/8 using
    s(A,t,B)
  • Avoid computing M
  • instead extrapolate AB and ED and take the
    mid-point
  • We will use this construction for smoothing
    key-frames motions

Compare with your neighbor
s( s(A,9/8,B) ,.5, s(E,9/8,D) )
62
4-point (r,t,u1)
  • r rt rtu1 rtu1rt
    rtu1rtu1

Refine (r) puts a mid-edge point C at
M. Surprise! (t,u1) produces the cubic-fit bulge
MM/8 Verify by inspection
63
Compare cubic B-spline 4-point
  • Which one interpolates the original vertices?
  • Which one produces the smoothest curve?
  • When is this important?
  • Can both have cusps (non smooth points)?
  • How can you force the B-spline curve to go
    through a point?
  • Which one has a convex-hull property?
  • When is this important?

64
Cubic B-spline and four-points
  • From James Koch

65
Which one is smoother?
  • By Stevie Strickland

66
Making a sharp corner in a B-spline curve
  • By Stevie Strickland
  • HOW?

67
A compromise
  • B-spline subdivision rounds the corners and thus
    shrinks a convex shape
  • 4-points subdivision bulges the edges out and
    hence grows a convex shape
  • Both produce curves that are relatively far from
    the initial control polygon
  • We may want a compromise
  • Closer to the polygon
  • Bulge less
  • Cut less

68
Jareks compromise J4
  • Split each edge as before (in both schemes)
  • Tweak old vertices by half of the B-spline
    displacement and the new vertices by half of the
    4-point displacement

69
3 subdivision schemes
Bezier
J4
4-points
70
Implementing J4
1 - For each vertex vi, compute the average ai of
its neighbors and store a displacement vector
Di(aivi)/8.
2 - For each edge (vi,vi1), insert a new vertex
mi(vivi1)/2, and displace it by (DiDi1)/2.
3 - Displace each old vertex vi by Di.
71
Three subdivision schemes
  • B-spline (uniform cubic B-spline), most popular
  • Introduces new vertices at edge mid-points
    (split)
  • Tucks in the old vertices by 1/2 the displacement
    towards the average of their new neighbors
    (tweak)
  • Very smooth result piecewise cubic parametric
    formulation
  • Does not interpolate the original vertices
  • Shrinks convex regions
  • 4-points
  • Leaves the old vertices unchanged
  • Bulges the edges by displacing their mid-point
    away from the average of the neighbors (split
    tweak)
  • Interpolates the original vertices
  • Grows convex regions
  • J4
  • Combines half of the tweaks of the other two
  • Final curve is closer to the original polygon

72
A unifying theory Js refinements
  • Js ( r , t , u(s/8) )
  • J0 cubic B-spline
  • J2 osculates edges (smoother than quadratic
    B-spline)
  • J4 in general preserves area well
  • J5 reduces discrepancy with L (good for LoD)
  • J8 4-point (interpolating)

J8
J4
J2
J0
73
Comparing Js schemes
  • Jm J2, J0, J2, J2, J2

L
J0
J2
J4
J5
J6
J8
Jm
74
Retrofitting
  • A new control polygon may be computed so that the
    subdivision curve passes through, or close to,
    the original control vertices.

75
Continuity measures for paths and curves
  • Parametric (path)
  • C0 Continuous trajectory at finite speed (?
    acceleration?)
  • C1 Velocity is a continuous function of
    parameter t
  • C2 Acceleration is a continuous function of
    parameter t
  • C3 Jerk is a continuous function of parameter t
  • Geometric (curve)
  • G0 Continuous curve, no gap
  • G1 Tangent is a continuous function of arclength
  • G2 Curvature is a continuous function of
    arclength

76
Smoothness
  • Visualize (lack of smoothness) using jerk
  • J0 (no visible jerk) second degree (curvature)
    continuous, I.e., C2
  • J8 (total jerk) first degree (tangent)
    continuous, I.e. C1
  • Jm (brown) is C3

77
Open curves
  • Temporarily add (guesses of) 2 extra points on
    each end
  • Subdivide as before
  • Render curve, except 5 spans
  • Remove the extra points

78
Spans
  • Subdivision bends each original edge into a span

79
Per span subdivision
  • You do not need to subdivide the entire curve at
    the same time
  • You can subdivide one span at a time (need 6
    control vertices)
  • Or use a sliding window (ringing), which requires
    storing a ring of only 4 vertices per level of
    subdivision (see paper)

80
Multiresolution design
  • At each level of subdivision, let the user
    specify adjustment vectors for some of the
    vertices
  • Retain these vectors and apply them during
    rendering
  • This lets the user control large and small
    features with few strokes

81
What about curves in 3D?
  • The smoothing and subdivision procedures work for
    any dimension
  • 1D for speed control in P1a
  • 2D for curves, paths, and trajectories of cars
  • 3D for curves, paths, and trajectories of
    airplanes
  • 2D for designing and smoothing trajectories on
    surfaces (skier)
  • In the space of screws for smoothing key-frames
    motions

82
What about animation?
  • At each frame, draw subdivision curve
  • Its control vertices move with time
  • Their trajectories are each defined as a
    subdivision curve

83
What about surfaces?
  • Same as curve animation, but draw quads between
    consecutive frames (curves)

84
Adaptive resolution
  • The level of subdivision of a curve or surface
    should be adjusted to the resolution and the size
    of its projection on the screen
  • When the size changes, as we switch resolution, a
    popping may be perceived.
  • Jarek subdivision exhibits less popping that
    four-point and cubic B-spline
  • Geomorphs are also used to smoothen the popping
    over several frames

85
Examples of quiz/exam questions
  • Define/illustrate curve, path, motion, trajectory
  • Explain interpolating and approximating
  • Constructions of velocity, normal, acceleration,
    radius of curvature, jerk
  • Implementation of r, k, d, t, u, u(x) steps
  • Write polyloop smoothing using them
  • Why tuck-tuck is better then tuck
  • Cubic fit formulation for tuck-tuck
  • Difference between smoothing and subdivision
  • Subdivision formula for quadratic B-spline
  • Subdivision formula for cubic B-spline
  • Spans. local control, open curves
  • Bezier control polygons from polyloop
  • Cubic Bezier evaluation and subdivision
  • Convex hull of cubic bezier curve
  • 4-point subdivision as cubic fit
  • Draw 4-points, jarek, and cubic B-spline for a
    simple polyloop by hand
  • General formulation for jarek subdivision Js
  • Properties of J0, J3, J4, J5, J8
Write a Comment
User Comments (0)
About PowerShow.com