You are on page 1of 1

HW6, MEC 572

Goal:

This HW requires you to create a Bezier surface design program for user provided control net and degree.
Provide an option to read the input file from your code. Your input file will contain information about
your control net. For example, a 4x4 control net may be described by following data structure:

point3 ctrlpts[4][4] ={
{ {-7.5, -7.5, -5.0}, {-2.5, -7.5, 0.00}, {2.5, -7.5, 0.00}, {7.5, -7.5, -5.0}},
{{-7.5, -2.5, -7.5}, {-2.5, -2.5, 5.0}, { 2.5, -2.5, 5.0}, {7.5, -2.5, -7.5}},
{{-7.5, 2.5, 0.00}, {-2.5, 2.5, -5.0}, {2.5, 2.5, -5.0}, {7.5, 2.5, 0.00}},
{{-7.5, 7.5, -5.0}, {-2.5, 7.5, -10.00}, {2.5, 7.5, -10.00}, {7.5, 7.5, -5.0}}
};

In the above, each tuple of three numbers represents x, y, and z coordinates of a control point.

Requirements:

1. Your program should read from an input file that contains information about the control net. When I
run your program, I expect to see a bi-cubic clamped surface formed from a control net.
2. Your program needs to be general enough for any control net and any degree. Thus, you can create
multiple input files.

This is what my complete implementation of drawing a Bezier surface looks like in the GUI:

You might also like