3D Lego Bricks

lego-bricks

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)


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

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.

Share Button
Posted in Computer Science, Python - Beginner, Python Challenges Tagged with: , , ,

Our Latest Book

Follow this blog