View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Michael Langford's Milestone 1 (MathEquation illustrator)

For this project, I had decided I would do this class like you are supposed to: The teacher assigns the project, then you start RIGHT THAT DAY. So I did. I spent 5 hours designing, and 15 hours coding. One of the reasons it took so long was one of the best things that I got out of all of the course: having to ask all the tough questions.
When I started, no one else had started the project in earnest. I had to be that guy that has to ask about all the hazy parts of the assignments.
As to my design:
Uploaded Image: langfordm1.gif

All of the classes are children of MathEqation(except the scripts and MathOperation), that way they all make their form in the same way. For the superscripts and subscripts, I made a superclass that made a particular subclass depending upon the parameters passed to it, because the only difference between the two classes was how high the script was places vs the base. MathSequence was put in to allow groups of more then three, which our group found useful in the laTeX project later on.
The key thing that made my design so neat was that you could pass strings into any of the classes, and all they would do was make a MathEquation in that place. This worked well, since only one class needed to know how to parse strings then.
This one thing that I did bad on was the scripting appearence. I used graphical resizing to shrink my scripts. This leads to unclear scripts. It does look more uniform. However, uniformity is worthless if it destroys functionality, which graphical resizeing does for nested functions.
Here is the code that I hacked out. It requires morphic to run, as the GreekSymbol uses a morph to make properly. Some of the letters in the greek dictionary aren't there, but plenty of them do work (capital sigma and lowercase alpha work for sure). Enjoy:equation formatter.st



Links to this Page