The aim of this challenge is to draw a cube in 3D and to make it rotate on the screen.
Drawing 3D shapes on a screen (2D) requires some mathematical formulas to convert 3D (x,y,z) coordinates into 2D coordinates (x,y). This conversion, also known as “oblique projection” is based on the following formulas:

This is a great application of trigonometry, especially of the SOCATOA formulas!

![]()
![]()
(Read more about trigonometric formulas.)
A 3D rotation against an axis (X, Y or Z axis) also requires some complex mathematical formulas. To apply a 3D rotation we can use the rotation matrix as follows:

Our Solution:
To decide the angle and axis of rotation we use the position of the mouse pointer.
The X coordinate of the mouse pointer becomes the angle of rotation against the Y axis.
The Y coordinate of the mouse pointer becomes the angle of rotation against the X axis.
In this example we did not implement a rotation against the Z axis.
Your Task
Add more edges to the code given above to create a full house including a roof, a front door and a window.
Solution...
The solution for this challenge is available to full members!Find out how to become a member:
➤ Members' Area





The aim of this blog post is to create a countdown timer that will display the numbers on screen using a 7-segment display. A lot of electronic devices use this approach to display numbers on a LED or LCD screen. (Watch, alarm clock, calculator etc.)



















Check the following code used to simulate a lamp going on and off to reproduce an SOS call in Morse code: … — …
“The Twelve Days of Christmas” is an English Christmas carol that enumerates in the manner of a cumulative song a series of increasingly grand gifts given on each of the twelve days of Christmas.

