In this blog post we will use Glowscript to create a 3D animation representing the various Lego bricks.
Our aim is to recreate bricks by joining several cubes and cylinders (studs) together. We will then create a compound object to join these 3D shapes together in a single object (brick). Finally using an infinite while loop we will animate/rotate the brick around itself.
Here is our 3D animation: (Use Google Chrome to preview this animation)
Find out more…
To learn more about all the instructions you can use in GlowScript/VPython, use this on-line documentation.
Your task:
Create and animate different types of Lego bricks.