Week 8 Tutorial

Question 1: Bezier Curves

  1. Use de Casteljau's algorithm to generate the point a t = 0.25 on the degree 3 Bezier curve with control points (0,0), (4,16), (20,8), (20,0).

  2. Prove that de Casteljau's algorithm describes the same curve as given by the degree 3 Berstein polynomials.

  3. Find the tangent vector for the point on the Bezier curve from part a.

Question 2: 3d Modeling

  1. Write code/pseudocode to generate a cylinder. The front face of the cylinder should be a circle of radius 1 at (0,0,-1), lying on the z=-1 plane with a back face at z=-3. The two faces should be connected by quads or a quadstrip. Make sure you do not forget to specify normals.
  2. Suppose we have a profile of a curve that is a quarter of a circle as defined by the following function

    C(u) = (radius*cos(u),radius*sin(u)) For u [0..90]
    
    What would the surface of revolution around the y-axis be defined as in terms of t and the angle v for v[0..360]
    P(u,v) = ?
    

    Write a piece of code to generate a list of vertices and normals for the object.

    Write a piece of code to draw the the object given the list of vertices.

  3. Calculate the frenet frame for the helix spine at t = PI for b = 1
    C(t) = (cos(t), sin(t), bt)
    

    Suppose you had the triangle with points P0, P1 and P2 and you wanted to extrude it along the given helical spine. How would you generate the points at the cross section where t = 0.5 on the spine?

Question 3:

Consider an L-System with the rules

X -> F[+X]F[-X]+X
F -> FF

Starting with the symbol X compute the first three iterations of this system.

Suppose the symbols translate to the following commands:

X : null
F : forwards 10
+ : rotate 30
- : rotate -30
[ : push the current pen position
] : pop the pen position

Draw the shapes for the strings generated above.

Assignment 2

If there is any time left discuss assignment 2.