Skip to content

A hermite Spline written in cpp. This is only the anim foulder out of the entire project, since it's too big to upload everything

Notifications You must be signed in to change notification settings

nslaba/CSC-473---HermiteSpline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HermiteSpline ~ Assignment a ~ CSC 473

Task

Build a Hermite Spline system and a simulator

Criteria

  • Hermite spline class with a maximum of 40 control points.
  • Catmull-Rom initialization with second-order accurate boundary conditions using the following command:

system cr

  • Manipulation of control points and tangents using the console:

system set tangent system set point system add point # adds a point with the given tangent at the end of the spline.

  • Arc Length parameterization using a piecewise linear approximation and lookup table.

system getArcLength

  • Input/output from/to a file.

system load "" system export ""

  • Loading the path for the object:

system objectpath load ""

  • You need to align the major axis of the object with the tangent of the path as it moves. Twist along the major axis can be ignored.
  • The moving object should start and stop in an easy-in easy-out way and should have a constant speed during the rest of the motion.

Summary

I have implemented the assignment according to the specifications listed

The object following the Hermite Spline always stays upright and rotates based on the spline's curves:

Untitled video - Made with Clipchamp

Functionality

My project first deals with the input text file by reading it and creating a hermite spline path based on the given control points.

Once The Hermite Spline is loaded (all done within HermiteSpline.cpp), on user input command "s", the simulator is activated. An animation of a car appears traversing the entire Spline. The car is always up-right and turns based on the Spline's curves. The car speeds up for the first 10% of the spline, then drives at a constant speed and looses acceleration for the last 10% before coming to a stop at the end of the spline.

Grade received

96.77% - I left a mistake in my "export command" by leaving an infinite loop. Oh well!

About

A hermite Spline written in cpp. This is only the anim foulder out of the entire project, since it's too big to upload everything

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published