January 30, 2014

Polar graphs - Part 4

So this is getting pretty cool!

Added floating point parsing functionality, so I can pass in decimal points now. And I made it so the separate graphs will display in different colors, so you know which one's which.  Removed the annoying exclamation point when it displays it in the equation window.

Further improvements that could be made:
- Allow for whitespace in the equation
- Expand the equation display screen if needed (right now it's a fixed size)
- More robust error handling - for now the parser assumes everything is valid input
- Make my "remove from char array" functions more flexible (removeCharFromEnd is probably kind of stupid)
- Most importantly, start refactoring the code.  I hate long methods and that's exactly what I have.  Also, all of this shouldn't be in one file.  Some of my variable names could be better.  I can probably hook up the colors together better - right now it's the programmer's responsibility to make sure my int declarations of colors (RED, ORANGE, GREEN, etc.) match up with the order in my colors matrix (ooh - dictionary).

Anyways, click here to see my messy code:

And my crazy picture:

I actually really like the first couple (PI/4 and PI/2).  Of course it all looks pretty cool.  But the beginning ones look.. wispy.  I like that.