spiegedj – HW 2
Thought Processes:
I started off the project by converting the magnet pseudocode into a c++ class. I used a class instead of a struct for no real reason other than that I like classes better and I knew that there is little difference between them. I then worked on adding an OnDraw method to this magnet class so the magnets could draw themselves. Finally I set up the mouse click and drag events to correctly interact with the magnets. This required converted a point from the screen space to a point in world space.
Hurdles:
I think the most challenging aspect of this lab was the click events because you had to figure out the conversion function. Also the requirement of having only one vertex array object tripped me up for a while until I realized how that could be done. Of course I also had some errors when copying the pseudocode and that took me some time to find them all.
Pictures:
It is hard to capture the simulation in pictures. Here is my attempt: