Tag: Coordinates

Archery Scoring Algorithm

In this challenge we will write a Python program to randomly shoot an arrow on a target. We will then use Pythagoras’ Theorem to calculate the distance between the arrow impact and the centre of the target. This distance will

3D 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

3D Solar System

In this blog post we will use Glowscript to create a 3D animation representing the revolution of the Earth around the Sun, and of the Moon around the Earth. Earth Revolution First, let’s calculate the angle of rotation needed to

3D Molecules

In this blog post we will use Glowscript to create a 3D animation representing the molecule H2O. Our aim is to recreate the molecule by joining three spheres together (one sphere for each atom). We will then create a compound

Merry Christmas

For this challenge we are going to create Christmas Cards using Python turtle. We will use the random library to create unique cards. Starry Night Our first card consists of creating a starry night scene. This card is using: A

Vector Based Graphics

Computers can use two types of graphics: Bitmaps: A bitmap (or raster graphic) is a digital image composed of a matrix of dots. When viewed at 100%, each dot corresponds to an individual pixel on a display. In a standard

Beach Huts Challenge

Look at the code below to draw lines of beach huts. Your task is to tweak the code used to draw the third line of beach huts. On this line we want the computer to choose random colours from the

My Charts

For this challenge we are going to use Python turtle to create some charts: Column charts, line charts and radar charts. First we need a data set. We will use the following data that shows the market share of the

Minecraft Trampoline

In this post we will use Python 2 and Minecraft to create a virtual trampoline for Minecraft. We will first build the trampoline using Minecraft blocks (in Python). Then we will write a routine to make the main player bounce

Avatar Generator

In this challenge we will use Python Turtle to create avatars. (An avatar is an icon representing a particular person in a computer game, Internet forum, etc.) Try the code below. This code is using a few computing concepts such