I wanted to do more with the accidental butterfly that I made, so I conceived of a harmonious environment built around butterflies that would be disrupted if a user got on a balance board.  (I didn’t realize until after reading the mathematics and translate/rotate sections in the book how similar this idea was to the Lesson Six Project.  There are also two groups in my Pcomp class who just announced that they’re making balance boards, so I might change my physical interface).

Dan suggested that I just work on making one butterfly move in response to the mouse for the Week 7 class.  It wasn’t too hard to make the butterfly move in response to the mouse within the butterfly object class, but the vector curves didn’t move in tandem with the vx, vy coordinates.  I like the effect of the wings lagging behind though (one has to click on the image to initiate the butterfly moving with the mouse).  CLICK HERE to see this sketch.

I really wanted to try making the butterfly move in more complex ways though and in a three dimensional world, so I experimented with OPENGL, rotations and the perspective function, which I found in the 3D tutorials online.  I added a sun, which is a rotating sphere, and a ground which is a simple rectangle.  When you click on the mouse, the perspective is activated – move the mouse around to see the butterfly – still flapping its wings – in relation to the sun and ground.  I can’t figure out why the color of the wings doesn’t render well in 3D and I’m not crazy about the perspective on the butterfly, so this sketch certainly needs more work and I need to get some help with these 3D functions.  CLICK HERE to see the 3d version.

« »