Moving Snowman
Kristen Olsen
Email: kmvolsen45@gmail.com


★Using Graphics3D and cuboid I form a cube with the coordinates of 0 and 50. I used the Opacity to make the cuboid transparent. For this example I made the cuboid 40% transparent.

g1=Graphics3D[{Opacity[.4],Cuboid[{0,0,0},{50,50,50}]}]

★I begin with the smallest snowman I can use. and assign it to g2

g2=Graphics3D[{Gray,Sphere[{5,5,5},4],Sphere[{3,3,3},3],Sphere[{1,1,1},1.5]}]

★Next I will show the snowman inside the cuboid using the function SHOW

Show[g1,g2]

★Next I will try and see what the largest snowman I can use will look like inside of the cubiod. I will assign the large snowman as g3 for now.

g3=Graphics3D[{Gray,Sphere[{30,30,30},20],Sphere[{17,17,17},13],Sphere[{8,8,8},7]}]

Show[g1,g3]

★Now I need to manipulate my spheres to first have it go from smallest to largest using y. Each coordinate of the sphere is multiplied by y with the range of y being from 0 to 1. 

★Next  the range for a,b,c are placed at 0 to 50. This is used because if the range was any higher the snowman would move outside of the cube.

★ Because each coordinates in the snowman represents a different part sphere using a, b, c will help move the snowman around the cube.

g4= Manipulate[Show[
Graphics3D[{Opacity[.4],Cuboid[{0,0,0},{50,50,50}]}],(*this will be the smaller cube in the diagram this is used to show the snowman moving and which way he will more in the larger cube*)
Graphics3D[{Opacity[.4],Cuboid[{0,0,0},{100,100,100}]}],(*this is the larger cube shown in the diagram, the cube the snowman moves around in*)Graphics3D[{Gray,Sphere[{30y+a,30y+b,30y+c},20y],(*this is the largest circle on the snowman (the bottom) the y*)Sphere[{17y+a,17y+b,17y+c},13y],(*this is the second largest sphere and the middle*)Sphere[{8y+a,8y+b,8y+c},7y]}]],
(*this is the smallest and the snowmans head*)
{y,0,1},(*the y will dictate the size of the snowman, it will move from 0 to 1*)
{a,0,50},(*the a will control the snowmans movements from side to side*){b,0,50},(*the b will control the snowmans movements from front to back*)
{c,0,50}] (*the c will move the snowmans from top to bottom of the cube*)

For the next part I want to place a space shuttle inside of the cube and have it move around. I begin with the 3D space shuttle.

ExampleData[{"Geometry3D","SpaceShuttle"}]

Next I use the same Cuboid that I used in the snowman, except I change the coordinates to have the spaceship fit inside the box.

g5=Graphics3D[{Opacity[.4],Cuboid[{-10,-10,-10},{10,10,10}]}]

I want to place the space shuttle inside a 3D cube. So I use assign the space shuttle as g6.

g6=Graphics3D[Translate[ExampleData[{"Geometry3D","SpaceShuttle"},"GraphicsComplex"],{0,0,0}]]

And use the Show function to place the plane in the cube.

Show[g5,g6]

Last I will manipulate the function just like I did in the snowman to make it seem like the space shuttle is flying.

Manipulate[Show[Graphics3D[{Opacity[.4],Cuboid[{-10,-10,-10},{10,10,10}]}],(*The smaller cube will be the cube that the shuttle will fly through at first*)
Graphics3D[{Opacity[.4],Cuboid[{-50,-50,-50},{50,50,50}]}],(* This was the larger cube that the shuttle must stay inside*)
Graphics3D[Translate[ExampleData[{"Geometry3D","SpaceShuttle"},"GraphicsComplex"],{1a,1b,1c}]]],
{a,30,-30},(*Here the plane is moving from left to right inside the cube*){b,30,-30},(*Here is where the plane moves across the cube*)
{c,30,-30}] (*Here is where the plane will move up and down*)