Each 16 control points allow me to create a spline surface in between indices (1,1), (1,2), (2,1), (2,2). So the blue area in the picture above is the only area that the control points will draw. When I edit the control points locations we can see some cool types of spline surfaces (the six images below). 

Single Spline Surface

For my final project I wanted to create a golf simulator game that had spline surfaces and some real life physics. The spline surfaces are similar to the spline curves that we learned in class, but it involves 16 control points rather than just 4; the spline surfaces also draw a plane rather than just a line.  I used the equations right below to generate the planes. Each P(u,v) equation allowed me to find the X,Y,Z position of the points for each spline surface. 


To create a bigger spline surface, I had to join multiple spline surfaces together. To do this, I had a NxN grid that was at least N=4. Since each 4x4 of control points create one spline surface, I iterated through each group of 4x4 in the columns and rows. This allowed me to join multiple spline surfaces that would overlap in control points. This creates a unified look when you modify a control point, because that one control point affects all of the spline surfaces that use it. This makes really cool looking surfaces (see images below). The low density spline planes have only 20x20 points drawn for each spline surface, while the high density ones have about 30x30 points. 

Multiple Spline Surface

Golfball Physics

To implement golfball physics I used an initial velocity anytime a player wanted to hit the golf ball. The golfball gets hit by that initial velocity and then gravity is the only force that is applied onto the ball until a collision is detected. Once a collision is detected on the spline surface, I had to bounce the ball back up and dampen the ball velocity and tangent. I calculated the normal of the spline surface by taking the cross product of P'(u,v) of both the u and v direction. Then I was able to calculate the way the ball would bounce off and what direction to bounce the ball in (see image on side for detail).