CPSC 645/VIZA 675 - Geometric Modeling
Home Page


Syllabus


News and Notes


Assignments

Note that you need to have GLUT installed in order to use this code. Your code should go in the routine YourCode(), and your file input can go in the routine init(). Note that you can set up to 6 colored line sequences, following the example given. Also, note that you should set NumSegments when you read in the curve information. Holding down the left mouse button while moving the mouse changes your view. Clicking the right button increments WhichSegment, and you will use this to step through the Bezier segments of the curve.

First sample curve data file
Second sample curve data file

Notes about curve data. All control points will have coordinates with absolute value no greater than 1 (i.e., all lie in the box that extends from -1 to 1 in each coordinate). Weights may be higher. The first line of the data file gives the degree of the curve. The next line gives the number of knots, n. Following are the n knots, listed in nondecreasing order. The next line gives the number of control points, N. Following is the list of N control points, one per line. Each control point is given as a coordinate x,y,z, and a weight w, in that order.

  • Homework 3.
    Skeleton Code for assignment 3.
  • It is run similar to the last assignment's code. Your code should go into the section marked as your code. You need to create the vertices, setting the color and normals, and put pointers to the vertices in the triangles. Be sure to set numtriangles correctly (numvertices doesn't really get used)

    First sample surface data file
    Second sample surface data file

    The format of the data file is as follows. The first line gives two numbers, the degree in s and the degree in t. The next lines give the control points - each as a 3D position, with no comma separation between coordinates. The control points are ordered such that the first one is the s=0,t=0 position, then they proceed along the 's' axis until reaching the control point at s=1,t=0. Then the next row of control points is given, etc. After all the control points, the next line contains the number of trimming curves, n. Following that are the n points that lie on the trimming curves. These are given in s and t coordinates, again with no comma separation. The trimming region will always be convex, and the points will be ordered in counterclockwise order. For example, a trimmed region of a triangle with base along the s=0 edge, and peak at the point s=.5, t=1 would have the points listed as: 0 0 on the first line, 1 0 on the next line, and 0.5 1 on the third line. Note: all control points will lie in the [-1,1]x[-1,1]x[-1,1] cube, and all coordinates in the patch domain will be in the [0,1]x[0,1] region.

  • Homework 4.
    Note: Assignment due date changed to November 26. Turning it in by November 21 will give a 10 point bonus.
    Skeleton Code for assignment 4.
  • The skeleton code should let you visualize the data similar to the previous assignments. Note there are two places for you code - one that will read in and create the initial winged-edge structure, and one that will perform a subdivision step. The program operates like the previous ones as far as viewing. The right mouse button causes the code to perform subdivision to be called. Note that after you have created the winged-edge structure (and after each subdivision) you need to update the list of polygons that are to be displayed. Sample code for setting up that list is given.
    Right now, there is an error with the lighting. I'll post what I have and I'll try to fix it if I get a chance.

    First sample object data file.
    Second sample object data file.
    Third sample object data file.
    Fourth sample object data file.

    The format for the data files will follow the .obj file format. You do not need to implement the full .obj file reader. A couple of links describing that format can be found HERE and HERE. You may make the following simplifying assumption: the only lines you need to worry about are the v and f (vertex and face) description lines. You do not need to worry about vt, vf, g, s, #, etc. lines for this project. You should be able to find several sample files on line. I have included some very simple sample files above.

  • Homework 5.

  • Schedule (all future dates are tenative)

    Note: All chapter references refer to the required textbook.
    Day Topics Reading Covered or Assigned Homework Assigned Homework/Report Due
    1 Tue. Sep. 3 Introduction, Syllabus, Coordinate Systems Chapter 1
    2 Thu. Sep. 5 Implicit and explicit forms of curves and surfaces Chapter 2 through 2.3
    3 Tue. Sep. 10 Hermite, LaGrange, other interpolation methods 10.1, 10.2, 10.4
    4 Thu. Sep. 12 Bezier curves, the Bernstein basis 5.1 through 5.4 Homework 1
    5 Tue. Sep. 17 The deCasteljau algorithm and other Bezier properties
    6 Thu. Sep. 19 Degree elevation, reduction, and other Bezier operations 5.6 Project Proposal
    Tue. Sep. 24 Class cancelled - Dr. Keyser sick
    7 Thu. Sep. 26 Continuity and splines, introduction to rational curves 5.5
    8 Tue. Oct. 1 Rational curves, Introduction to B-splines 6.1 Homework 1
    9 Thu. Oct. 3 B-spline basis functions 6.2, 6.3, Chapter 8 Homework 2
    10 Tue. Oct. 8 B-spline operations and knot insertion 7.2, 16.1
    11 Thu. Oct. 10 Differential geometry for curves
    Tensor product surfaces
    Chapter 4, 13.1, 13.2
    12 Tue. Oct. 15 Trimming, Operations on surfaces
    Bezier triangles
    13.3, 13.4, 13.6.3
    13 Thu. Oct. 17 Derivatives for Bezier triangles
    Coons patches
    14.4 Project Update 1
    14 Tue. Oct. 22 Differential geometry on surfaces Chapter 12 Homework 3 Homework 2
    15 Thu. Oct. 24 Subdivision surfaces I 20.1
    16 Tue. Oct. 29 Subdivision surfaces II 20.2-20.4
    17 Thu. Oct. 31 Solid modeling paradigms and operations
    Volumetric, sweeps, instantiation
    18 Tue. Nov. 5 B-reps, topological data structures Chapter 19 Homework 4 Homework 3
    19 Thu. Nov. 7 CSG representations
    20 Tue. Nov. 12 The Medial Axis Transform,
    Conversions between solid model formats
    21 Thu. Nov. 14 Boolean operations on B-rep models Chapter 18, especially 18.6
    22 Tue. Nov. 19 Robustness and numerical error Project Update 2
    23 Thu. Nov. 21 Degeneracies Homework 5
    24 Thu. Nov. 21 6:00-7:15 p.m. - note rescheduled from Dec. 5
    Advanced topics: Trivariate objects
    Chapter 21
    25 Tue. Nov. 26 Advanced topics: tentative
    Intersection and Collision detection
    Homework 4
    26 Tue. Dec. 3 Advanced topics: tentative
    Compression and simplification of B-reps
    Thu. Dec. 5 Note: No class Dr. Keyser out
    27 Tue. Dec. 10 Advanced topics: tentative
    Fitting data
    Homework 5
    Wed. Dec. 18 8:00 a.m.
    Final exam time from 8-10 a.m.
    We will not meet at this time
    Project Final Report

    Final Grades