![]() |
Drawing a simple cube in 3D world, turned out to be not so an easy task as drawing 2D figures. It requires calculation of coordinates of the projected images first, then the lighting must be taken into consideration, making it more realistic.
There are ready-made libraries for the task around, but this time, I have written the whole procedure from scratch. Here is the result, a rotating cube whose surface is lit by homogeneous light comes from the side of the viewer.
It was a fun job, and bring this results into other projects is a task that is not yet to be ready to offer here. For the time being, I decided to put it on the web just to see it go round.