Will Reynolds CS151 project2
Skip to end of metadata
Go to start of metadata

In the second project of the class, we started by creating versatile yet simple shapes. They took three parameters, which decided the location and size of the shape. After I created two more intricate shapes, one a sail boat and the other a buoy. I made two different scenes with the boat and buoy by changing there location and size to create a sailing race starting line and an image of a sail boat cruising through waters dense with buoys. 

Approach: 
These were the first two shapes I drew. Each took two parameters for setting the location(x and y), and one for determining the length of each leg. The two shapes could be called at any point and any size. 
Next, I created two, more intricate shapes. The two shapes take three parameters. Two for location and one for size. The size parameter for these two functions uses a scale. The scale is multiplied to all of the default measurements to allow for changing the size of the objects without messing up the proportions. I initially had trouble getting the point to jump to the placement i wanted. I fixed the issue by placing the directing code in a for loop with one rotation as shown below. 

"The Line"- Next, I utilized the functions to create an image. The two original functions remained in a file "shape library" and the function coast1(), imports the files to the mainframe. Under the function coast1(), i placed two buoys on the end to serve as a starting line, and placed "racing" boats in between.

"Sailing through Stonington"- This is my second Maine scene. A sail boat boat cruises through a dense sea of buoys. I utilized the same process as the one before. 

What we did: In this project we created basic shapes, added features to allow for more functionality, and integrated those shapes to make a beautiful scene of Maine.

What i learned: This project was another beneficial home work. I am now able to create shapes with much more ease, as in the beginning it can be hard to visualize the motions and rotations. I also became very familiar with referencing and calling functions from other files. This skill will now allow me to keep code more organized as i can separate main frame from function libraries. I also became much more familiar with the de-bugging process, as i was suck with a bug for about an hour!

Labels