Wave system
Sped the wave system up quite a bit on my computer. The problem was that, like an idiot, I was using sqrt() in quite a few places, probably about 5 times for each wave. These took approximately 90% of the draw function, so if each wave did 5 sqrts, it added up quickly. Last week, 6-7 waves brought my system down to about 14 FPS. This week, 11 waves takes it to 23. Yeehaw, that's pretty slick. I discarded one sqrt because it wasn't necessary (idiot), I took care of the distance sqrt by calculating it once and storing it in an array to match the points. I got rid of another one by using a sqrt look up table. I couldn't find a way to get rid of the last two, because they are needed to normalize the normal vector once, then again in order to make it 3 dimensional. This teaches me that I shouldn't rely on normalizing to make my normal vectors. It's still pretty good considering how nice the waves look.
I tried to use the Newton shortcut to finding the sqrt, but it was slower than the computer's sqrt. So I tossed that out. The code is still there though, and profiling was used through this whole thing. It was pretty easy to turn on, it spits out the amount of time each function takes.
Controls:
movement, same as usual
p - toggle time
click - generates a new wave in the middle
CTRL+Z increase z points
CTRL+X increase x points
CTRL+S increase scale size of sheet
