Lab Assignment 1

Differential Geometry of Curves – Lab assignment 1

 

Instructor: Gershon Elber

T.A.: Boris van Sosin

Handed out: April 21st, 2025 Due date: May 12th, 2025

Description

Develop an interactive graphics program that will display a parametric curve by stepping and sampling the parametric domain at equal steps and help to visualize the moving Frenet frame (the tangent, normal, and binormal vectors), curvature, and torsion on parametric space curves. You should consider carefully ways to help visualize curvature and torsion. Simply printing numbers is not sufficient. For curvature, you should, at least, draw the osculating circle at a point on the curve. For torsion, you could draw a line of appropriate length. Provide an option to click on a point on a curve and visualize all the above-mentioned properties at that point. You also need to be able to animate the Frenet frame (and other primitives) moving along the curve. Also, provide in your program a way to interactively edit the curve’s equation form. Finally, you need to allow the user to modify the parameter domain over which the Frenet frame will move and the size of the steps it will take along the curve. Allow user control on the fineness of the curve display (i.e., the steps in the parametric domain) and allow the specification of the domain boundary.

 

Data file format

Your program is to work on arbitrary parametric space curves, which will be read from data files whose format is as follows (see here for examples) :

  • Every line that begins with ‘#’ is to be considered a comment and should be skipped.
  • Every empty line should be skipped.
  • The first three non-empty lines will hold the parametric form of X(t), Y(t) and Z(t) For example:
    sin(t)
    cos(t)
    t
  • The fourth non-empty line will hold the parameter domain tmin and tmax separated by white spaces. For example: 0 18.8496

Advanced – Choose two options from:

  1. Make an option to draw offset curves and evolute curves. For the offset curve (in the normal direction), provide a way to specify the offset amount (any real number).
  2. Make an option to draw the osculating sphere, as discussed in class.
  3. Implement an option to reparametrize the curves. Note that if a curve c(t) is reparametrized as c(t(r)), then the user also needs to provide both the function t(r) and the new domain of r. You can use this option to demonstrate that curvature and torsion are invariant under (a regular) reparameterization.
  4. You can think about other geometric properties of the curves and their visualization, other forms of visualization of required properties, etc. Feel free to introduce your own ideas but if you like your idea to serve as a substitute to 1, 2 or 3, talk to us first.

 

Submission

Make sure to submit on time a ZIP file containing the complete project, including all sources and one new data file (see below). Then, you will present your project at time and place coordinated with you, after the deadline. Call your executable file frenet.exe, and build your application in release mode. A user should be able to operate the application using nothing but the exe file. Use message-boxes and/or context-sensitive help as you see appropriate. All submissions of labs are either by individuals or in pairs.

Everyone should also contribute a new interesting data file to the class data directory in the format described above.

 

Tips

  • For this lab you could use a tool that:
    • will convert the infix form of the expressions, from strings to binary trees,
    • will evaluate the expressions at required values, and
    • will compute the derivatives of the expressions.
  • The tool can be found here. A short doc file is also included.
  • You can download an exe-example from here. In case of a discrepancy between this assignment and the behavior of this exe-example, this assignment governs.

 

Good luck!