main-written3

Written Assignment: Curves and Texture

Due Wednesday, November 18th

These questions are meant to give you some practice thinking about things we’ve discussed in class - particularly things you might see on the exam.

This assignment will be graded check/no check. However, you can expect to see similar (but not identical) questions on the exam, so make sure you understand them.

Question 1 - Bezier Curves

1A. A quartic Bezier in 2D has its control points at (0,0), (0,1), (1,2), (2,1), (2,0). What is the value of the curve at u=.25? (the position of the point)

1B. If we want to cut the curve in part A into 2 pieces at u=.25, what would the control points be for each of the parts of the curve?

1C. What is the direction of the derivative (tangent vector) for the point in 1A? Give any vector that is parallel to the tangent vector. (getting the direction is easier than getting the magnitude. hint: use the answer to 1B)

1D. We want to connect another quartic Bezier curve to the end of the curve in 1A. If the two curves are to meet with C(1) continuity, where must its first two control points be?

1E. We want to connect a cubic Bezier curve to the end of the curve in 1A. If the two curves are to meet with C(1) continuity, where must its first two control points be?

Hint: the deCasteljau algorithm is particularly useful to do 1A-1C

Question 2 - Texture Map Coordinates

Consider a square pyramid (the base of the pyramid is a square) as shown in the picture. Texture coordinates are given for each point.

2A: Sketch what this pyramid would look like if the 2x2 checkerboard (texture 1) is applied.

2B: Suppose that you want to texture the pyramid with 4 horizontal stripes, but the only texture you had was the 4x4 checkerboard (Texture2). Give texture coordinates for the 5 vertices that would produce this. (note: every vertex only gets one texture coordinate).

2C: If mip-mapping is used, there are reasons why using the checkerboard texture might not be as good as using the more “obvious” texture (Texture3). Explain this.

Question 3 Catmull-Rom and Cubic Beziers

A Catmull-Rom curve (tension=0) has its control points at:

    (0,0) (0,1) (1,1) (1,0) (2,0) (2,1) (3,1) (3,0) (4,0) (4,1) (5,1) (5,0)

3A: Sketch this curve

3B: What is the bounding box for this curve?

3C: For the first segment of this curve (that is the cubic with control points (0,0) (0,1) (1,1) (1,0)), what would the control points be for an equivalent Bezier segment. Your answer should be the positions of the 4 Bezier control points.

Hint: the answer to 3C is useful in finding the answer to 3B

Question 4: OpenGL Texture Wrapping

OpenGL gives a number of different ways to handle texture coordinates that are out of bounds. Clamping is one of them. List 3 others, and describe something they might be good for.

Page last modified on November 10, 2009, at 09:44 PM