Hello
I've been fiddling around with the idea of making a program for the Chaos Game, and in this program I want the user to be able to choose the shape of the polygon, instead of only using "perfect" polygons (eg. triangles with 120 degree corners, squares with 90 degree corners and so on). I've hit a little bump as to how to record the custom vertices. I thought that using the Mouse Down event in an Event Structure would do the trick nicely, but the program freezes up after it records the first vertex (1 click on the 2D picture).
I've centered the program around a State Machine, which has the following states:
Initialize - Setup picture size (only thing in there so far)
Setup Polygon - Record when the user clicks on the 2D picture
Get start point - Record the starting point for the algorithm via a mouse click on the 2D picture
Run algorithm - Runs the Chaos Game algorithm
Pause algorithm - Pause state where the user can either click a "Run", "Reset", or "Stop" button
Reset picture - Resets all the variables in the program and brings the user back to the Setup Polygon state
Stop - Speaks for itself
I haven't implemented the algorithm itself yet, it's just about getting the mouse clicks working, so any help regarding that (and any other ideas for the program for that matter) would be much appreciated.