CIS881
Homeworks



Homework #1
Due: Wednesday, April 28

FINALIZED
  1. Derive a modified Hermite curve based on the following information (the diagram shows Hermite, but use Bezier formulation). Give the matrix form P(u) = UMB What is P'(1)?

    Basic idea:


  2. For a blended parabolic curve passing through points P0, P1, P2, etc., what is the tangent of an internal control point equal to? Give is as an equation in terms of the other control points. See the diagram.

  3. How would you fit a cubic Bezier curve through 4 given points: Q0, Q1, Q2, Q3? (where P(0)=Q0 and P(1)=Q3). Give a procedure to form the Bezier control points of P0, P1, P2, P3 which would pass through the four points Q0, Q1, Q2, Q3.
    • First come up with estimates for the u values for Q1 and Q2
      • u1 = |Q1-Q0|/(|Q1-Q0|+|Q2-Q1|+|Q3-Q2|)
      • u2 = (|Q1-Q0|+|Q2-Q1|)/(|Q1-Q0|+|Q2-Q1|+|Q3-Q2|)
    • Two possible ways to go from here
      1. User four point method and convert to Bezier
        • Use the four point method from the book to derive p(u)=UMFQ (Section 3.7, p. 61) where Q = [ Q0 Q1 Q2 Q3 ]T
        • Convert to Bezier
          • p(u) = UMFQ = UMBP where P = [ P0 P1 P2 P3]T
          • MFQ = MBP
          • P = MB-1MFQ
      2. Alternative Solution: set up two cubic Bezier equations and two unknows and crank through the solution for P1 and P2
        • p(u1) = UMBP
        • p(u2) = UMBP
  4. In Catmull-Rom, the tangent at an interior point is totally determined by the position of adjacent points. Consider these sets of three sequential points:
    1. (0,0), (5,2), (10,0)
    2. (0,0), (1,2), (10,0)
    3. (0,0), (10,2), (10,0)
    In each of these cases the tangent computed at the middle point is the same. Discuss the problems this might create and come up with other suggestions on ways of computing internal tangents and discuss why they might be better.
    • For direction of tangent (T):
      • Calculate bisector of angle made by vectors
        • A = Pi-1 - Pi
        • B = Pi+1 - Pi
        • C = A/|A| + B/|B|
      • Calculate normal to plane of A and B: N = A x B
      • T = N x C
    • For length, use something like a fraction of min(|A|,|B|)
  5. I want to try to create a cubic Bezier segment which approximates a semicircular arc. I start out with P0=(0,0), P3 = (2*d,0), P1=(0,y), P2 = (2*d,y). What should 'y' be in order for P(0.5) = (d,d)? What is the value of P(0.25) and how much does it deviate from the desired semicircle?
    • p(u) = UMP
    • P = [ P0 P1 P2 P3 ]
    • U = [ u3 u2 u 1 ]
    • M =
      -1 3 -3 1
      3 -6 3 0
      -3 3 0 0
      1 0 0 0
    • we want the y coordinate of the p(0.5) point to be equal to d by adjusting the y coordinates of P1 and P2 given that the y coordinates of P0 and P3 are zero.
    • py(0.5) = d = [.125 .25 .5 0]M[0 y y 0]T
    • d = -3y*.25 + 3y*.5 = -.75y + 1.5y = .75y
    • y = (4/3)d
    • p(0.25) = < you can plug in the values and crank out the result >
    • compare distance of p(0.25) to the point (d,0) - remember that p(0.25) is not guaranteed to be at a 45% angle from the center point!
  6. For an open, uniform B-spline curve with k=4, what is P(0)? Give it as an equation in terms of the control points and use geometric construction to show it's position diagrammatically.
    • p(u) = UMSP
    • P = [ P0 P1 P2 P3 ]
    • U = [ u3 u2 u 1 ]
    • M = (1/6) *
      -1 3 -3 1
      3 6 3 0
      -3 0 3 0
      1 4 1 0
    • p(0) = [0 0 0 1]MSP = (1/6)(P0+4P1+P2)
    • as James said in class: p(0) = P1 - (1/6)(P0-P1) - (1/6)(P2-P1)

Homework #2
Due: Wednesday, May 26

FINALIZED Show your work to get credit for the following:
  1. Given an open, uniform, cubic B-spline with control points p0, p1, ...., pn, for an interior control point, pi, derive the equation for the point on the curve which is maximally influenced by pi. (Hint: refer to Figure 5.7 on page 130). Show how you derived the equation.
  2. Given: a cubic Hermite curve defined by three points p0, p1, and q where p0' = a*(q-p0) and p1' = b*(p1 - q). Determine what a and b have to be in order for p0 and p1 to be points of inflection (i.e., for pu and puu to be colinear at 0 and 1. (Hint: derive expressions for pu and puu at the endpoints and see what values of a and b make the respective vectors colinear - other than a=b=0.)
    diagram
  3. Given a surface definition, p(u,w) = UMBMTWT and a position on that surface defined by specific values for u and w, how would you determine which way a ball bearing would roll if placed at that position. Assume y is up. Give the direction in terms of both parametric coordinates (u,w) as well as model space (x,y,z space in terms of p(u,w), pu(u,w), etc.) .

syllabus
Last updated 4/23/99