teaching machines

Ian Brown magnet

March 16, 2015 by . Filed under cs455, postmortems, spring 2015.

 

 

My first problem with this lab was to fully understand the openGL implementation and learn how to deal with the different coordinate spaces, I ended up using the getOrthographic to just set my GL coordinates to the windows so i could easily switch between the two.  The next big challenge was to get the magnets to interact.  This was kind of a pain because when i did get them to connect if i wiggled the magnets quickly they would separate.  There was alot of little glitchy things to fix when interacting the magnets.  Another problem was when the magnets were connected they would have a distance of zero so when you use the formula given you would devide by zero which is a bad so i was forced to make the magnets one pixel away so you can see the seperate magnets.

magnet2magnet1