Jonathan's CS151 Project 11

Skip to end of metadata
Go to start of metadata

Overview:

The purpose of this project was to enter the world of 3D coding. In order for us to be able to code in 3D, we needed to adjust a lot of our past codes. During lab, we added another variable, z, to our lsystem, shapes and turtle_interpreter files. We did not necessarily need to add new classes to these files, however wherever we had our x and y variables, we needed to add the z variable. 

Task 1:

The first task asked us to create 4 new 3D shape methods. These methods were added on the our shapes class in the shapes file. All of the shapes were created by strings that get read in by our TurtleInterpreter class. Branching played a key role in coming up with the shapes and strings, as it allowed us to create more efficient strings. Below is an image showing my 4 new shapes:


I created a box, a house, a chair and a 3D triangle.

Task 2: For task 2 we were asked to make at least one of our functions recursive. I decided to choose my 3D triangle class, and to make my 3D triangle recursive. Below is my new 3D triangle function that uses recursion:

Task 3:

Task 3 asked us to incorporate the new shapes we created to make a scene. The scene could be abstract, artistic or realistic. I decided to make my scene realistic. My scene includes a bedroom that has a bed, 2 night stands, a lamp, flowers and tiled flooring. I used 3D methods for creating all of the shapes within the scene. Below is my scene for Task 3:


I particularly like the lamp that I created. 3D shapes cannot be filled properly, so I needed to improvise. I decided to use my 2D square method, set the color to yellow, and stack a bunch of squares on top of each other. Once that was completed, I added a black box around the cube in order to give it a nice touch of detail. 
Task 4:
For task 4 we were asked to be creative. However my task 4 is not creative at all. When setting out to work on this task, I tried many different things. First I tried to make a tennis court, then I attempted at making a village, and finally I came to what I currently have. It is nothing special, as it is just 2 of my house methods and 3 trees. Below is my task 4:

Again, I know it is nothing special. I spent a very long time attempting my first two ideas for task 4 that I ended up not having enough time to do something crazy. However I did look to get more creative within my extensions.
Extensions:
1.)  For my first extension I created another scene. This scene is very different from the first one I made. It is still a realistic scene, within a room, however the layout is very different. I was going for a classroom/auditorium type look. I set up the room with three rows of chairs, all facing one side of the room. In from of all the rows, I put a floating tree. I like to call this scene the floating tree. Below is my first extension:


What I learned:

During this project I learned how to code in 3D. It was a very exciting project and I enjoyed playing around with the many new features. 

Acknowledgements:Prof. Taylor, Prof. Li, Riley Janeway, Holli Olsen

Labels:
cs151s17project11 cs151s17project11 Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.