Assignment 4: Mouse interactivity

I modified the base in class program, with some help from others as I got caught up on the language and programing a few times, to meet what the TODO list said to do. In the actual assignment itself I added another layer of parsing which gave me the ability to generate different sized triangles. I then used this to create another series of random ranged triangles based on the points gather from the new information. I then made it so when a person clicks the left mouse button, anywhere on the screen, it would run the program and generate the triangles, and when someone right clicks the program restarts and clears the data.

After finishing the input side I began to mess around with the class function and what I could do to it. I found it boring that the shapes only went to one side of the screen and added some additional parameters allowing them to move in all directions. I added another set of parameters after that allowing me to generate random colors for each triangle, this one required some help from others as at first mine were only grey scaled. Lastly I moved on to changing the update me function to allow and change these results each time the program was called. The final product can be seen in the slide show below going from start, a series of left clicks, and finally a right click.

This slideshow requires JavaScript.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s