# 3D Snowman

In this blog post we will use Glowscript to create a 3D animation of a snowman.

Our aim is to create our snowman by adding different 3D shapes such as spheres, cylinders, cones, etc. We will then create a compound object to join these shapes together in a single object. Finally, we will use an infinite while loop to animate/rotate the snowman around the Y axis.

#### Glowscript/vPython?…

To complete this challenge and find out about all the 3D shapes you can use in Glowscript, you will need to refer to the Glowscript/vPython online documentation.

#### (x,y,z) Coordinates

Note that to complete this challenge you will need a good understanding of how 3D coordinates work:

#### Complete the code

We have started the code for you. Your task is to complete this code to customise this snowman further. (Use Google Chrome to preview this animation)

Right Click on the animation to change the view point (rotate camera angle).

Build a snow globe around your snowman. You will need to use an opacity argument when creating the glass sphere.

[pms-restrict display_to=”not_logged_in” message=” “]

#### Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
[/pms-restrict] [pms-restrict subscription_plans=”14217″ display_to=”not_subscribed” message=” “]

#### Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
[/pms-restrict] [pms-restrict subscription_plans=”14217″ message=” “]

#### Solution...

You are viewing this solution as part of your full membership subscription!

Python Code

#### Python Code

```# 3D Snowman: 3D animation using Glowscript - www.101computing.net/3D-Snowman

#Group all objects into one compound

#Animate/rotate the snowman
theta=0.1
framerate=20

while True:
rate(framerate)
snowman.rotate(angle=theta, axis=vector(0,1,0), origin=vector(0,0,0))
```
[/pms-restrict]

Did you like this challenge?

Click on a star to rate it!

Average rating 3.9 / 5. Vote count: 11

No votes so far! Be the first to rate this post.

As you found this challenge interesting...