Recitation 7- Santiago Salem

The previous recitation I draw a black and gray cube with some additional squares inside. This recitation I wanted to add some of the techniques we learned in class to create a more interactive and fun cube. Furthermore, I wanted to create a function in which the square is able to rotate and follow the mouse by using the translate and rotational function translate. (mouseX,  mouseY); rotate(radians( angle ));

On the other hand, I created a cooler and more Aerospatiale looking background, so I integrated the random function to create small stars (that multiply) with different types of white (fill color) in a black background. Void drawStars( int x, int y, color c ). By creating this background and having a cube floating around I created the notion of an object lost in space. Finally, another function that I integrated in my sketch was the drawCube function to synthesis my code and make it more understandable.  

During the process of creating this 3d rotational object I accidentally did a “coding mistake” that turned out to be a really cool effect on the drawing. The mistake was that, the cube multiplies itself every time I move the mouse (this is partly due to the order of the coding). Although, this wasn’t my original plan, (because the multiplication of the cube erased my background) this small mistake ended up enhancing the result of my drawing. 

The link to my code is: https://gist.github.com/ss11133/2e7c1816ff4e90fed66d391ad200badd

Leave a Reply