Pierre Bezier (September 1, 1910--November 25,
1999)
DUE DATE: Nov. 17, 2024
Purpose:. Practice in curved surfaces
Add the capability to your Assignment 04 to
create and view cubic surfaces.
This assignment modifies the "Load and Display
Objects" command in your assignment 04 such that it can read the
geometry vectors of cubic Bezier patches by reading the coordinates
of the control points from an input file. There will be 16 points
for each surface patch. Maximum number of cubic patches is 100. The
order for the points is P11,P12, ... P44 .
The following command should also be added to the
previous commands
Decrement / Increment resolution of Bezier
patches: "r" and "R" keys Hitting the "r" key should decrement the
resolution of Bezier patches by 1. The minimum possible resolution
is 2.
Hitting the "R" key
should increment the resolution of the Bezier patches by one. The
maximum possible patch resolution should be set to
100.
Notice that this Lab adds additional
functionality to your Assignment 04.All the previous
functionalities should stay the same.
Format of the data file:
n
<n> //resolution of the patches
in both u and v directions
b
<x1>
<y1>
<z1> //Control
point p11
b
<x2>
<y2>
<z2> //Control
point p12
b
<x3>
<y3>
<z3> //Control
point p13
.
.
b
<x16>
<y16>
<z16> //Control
point p44 (first patch ends here)
b
<x1>
<y1>
<z1> //Control
point p11 (second patch starts here)
b
<x2>
<y2>
<z2> //Control
point p12
b
<x3>
<y3>
<z3> //Control
point p13
.
.
b
<x16>
<y16>
<z16> //Control
point p44 (second patch ends here)
b
<x1>
<y1>
<z1> //Control
point p11 (third patch starts here).
.
.
v <x1> <y1> <z1> //Define
a vertex (The same as assignments 03 and 04 )
v <x2> <y2> <z2>
.
.
.
v <xn> <yn> <zn>
f <u1> <v1> <w1> //Define a
face (u,v, and w are integers)
...
.
Notes:
The cubic patches should be displayed by a
polygon mesh of triangles.
The input file may include data for Bezier
patches as well as polygon vertices (same as assignments 03 and
04). Make sure that the parametric surfaces (cubic patches)
and polygons are shown at the same time on the
viewports.