Project 11 3D Castle
Skip to end of metadata
Go to start of metadata

-The task of this project was to create 3D shapes that could be used to make a scene.

-The first thing I had to do was create 3D shapes.  I started with a block shape that was difficult because if I wanted to shade my block I had to make sure I went over every separate side and filled it.  I started with the bottom face and then went to the back face.  Then i went from the right side face and went to the front face and so on.  Along the way I saved various points to get to the next side easily.  Then I wanted to make a pyramid so I created the string and first drew a square as the base.  Then I went up and in towards the center as a line to the top vertex.  I repeated this process for the other three lines I needed to make the pyramid.  I then used my pyramid to create a diamond which was just a pyramid and then an inverted pyramid connected.  

Then I went on to make a cylinder which was essentially just a lot of circles very close together.  I created a distance in between the circles called between that I set to a certain scale (very small) of the distance. Then I wanted to make a sphere which was difficult.  I could've taken many approaches but I decided to draw a circle and then turn a little bit and then go across the circle and then turn back and draw another circle.  I repeated this process in order to create my sphere shape.  

Lastly, I created a pentagonal prism that was rather tricky.  I used a very similar approach to my prism as I did my block because it involved connecting faces although in my prism I wasn't particular about being able to fill it.  I just made the turns I needed to create my prism and.....

In the end my shapes looked like this:

I used the dash linestyle on the prism and I used the broken style on my diamond.

Then I had to create a scene so I decided on a castle.  I first made a for loop of blocks because I wanted to get the walls to look like bricks.  I then called the bricks in 4 columns and 20 rows and then generated block colors using a random choice of my list of brick colors.  I then simply moved by the block width in the x direction every block and then moved up and over to generate a row on top of that one.  I repeated this process twice because I wanted two separate pillars.  Then my last loop was to create bricks as the base of the castle in between the pillars.  This was fairly similar, all I had to do was make sure my coordinates were correct.  
Then I added pyramids to the top of my pillars using a loop two times and also added a gold sphere at the top of each pyramid.  I used the parallel linestyle on my pyramids.  Then to add effect I decided to make a new ring class in my shapes file which was simply a fraction of a sphere.  All I did was change the angle the turtle moved when it went across the circle in order to draw another one.  
Then I placed a cylinder in the bottom right corner of my castle to act as a tunnel.  Then I wanted to create windows and balconies on each pillar.  So, I started with filled white boxes on each pillar.  Then I used a pentagonal prism right under the cube in order to look like a balcony.  Lastly, I put a diamond in each cube to create the window look.  My final image looked like this:

Unfortunately all of the bricks made the computer lag and makes it hard to turn the 3D image.

-For my extension I took on the challenge of scaling my scene and being able to move it.  This was tough because of its pettiness, but the main thing I needed was to reset my x, y, and z values after each loop because at that point they had changed.  Then I had to scale everything and put the coordinates into x, y and z forms instead of harding coding them.  I created this ending image:

-I learned so much about 3D and how to use strings to create shapes in 3D.

Labels