Implement the following 3 curve types:

  • Bezier

    They should be cubic beziers splined together with C0 continuity. You'll need at least four control points to make a single bezier curve. Adjacent Bezier curves share control points so that the last control point of one Bezier curve will be the first control point of another. In this way you can have two complete Bezier curves with only 7 control points and so on.

    Note: In the lecture slides, you were shown an adaptive recursive algorithm for creating Bezier curves as well as a straightforward method that simply samples at a consistent rate. The adaptive Bezier curve generation is not required (but is a bell of extra credit). Feel free to sample the curve at a constant rate to fulfill the project requirements.

  • Catmull-Rom

    Include endpoint interpolation.

    Keep in mind that it is possible to make parametric curves that "double back" on themselves (x is not monotonically increasing as a function of t), which is obviously not desirable. It must be possible to interpret the curves that your solution produces as a function of time, so you'll have to think about and solve this case when it occurs (for any curves).

  • B-spline

    Include endpoint interpolation.

  • Create a particle system that:

  • Functions as part of the scene hierarchy

    When you attach your particle system to a node other than the root, it should behave properly as a child of that node. You'll have to think carefully about how to represent the positions of your particles.

    Suppose you want to attach a particle shower to your model's hand. When you apply the force of gravity to these particles, the direction of the force will always be along the negative Y axis of the world. If you mistakenly apply gravity along negative Y of the hand's coordinate space, you'll see some funky gravity that depends on the orientation of the hand (bad!).

    To solve this problem, you must operate in world space; particles' positions and velocities (and the forces that act on them) should be converted to world space by using the provided model_matrix_ field.

    Has two distinct forces acting on it

    The three most obvious distinct forces are gravity (f=mg), viscous drag (f=-k_d*v), and Hooke's spring law. Other interesting possibilities include electromagnetic force, simulation of flocking behavior, and buoyant force. If the forces you choose are complicated or novel (or listed in the Bells and Whistles) you may earn extra credit while simultaneously fulfilling this requirement.

    You must solve the system of forces using Euler's method.

    Implements collision detection

    You must detect and respond for two types of primitives that can be added to your scene:

    • Plane collision. A natural position for the plane is to have it act as the ground of your scene, but it could be placed anywhere. Planes have a width and height (not part of the Scale property).
    • Sphere collision. The sphere collision should be "natural" - i.e. the particles colliding with the sphere should reflect off the sphere dependent on the sphere's normal at the point of collision and the particle's incoming velocity direction.

    Note that either primitive should be able to be moved and the particle collisions should collide with their current position, not just its original position. Your particles should bounce off of the sphere and the plane, and the restitution constant slider should properly control how much the normal component of the reflected velocity is attenuated.