My #DecemberAdventure Log

20 - Dec

Ported the code to my Rpi 5. no need for optimizations. Using allegro primitives. it took me around 15 minutes, allegro for line routine and double buffer.

Cube code

21 - Dec

Why stopping at a cube?

Added code to render the Utah teapot model.

Teapot code

22 - 23 Dec

working on several strategies to interpolate the model, First tried linear interpolation in the triangle. however this is not generating the right subdivision.

Bezier interpolation Bezier interpolation

24 - 25 Dec

Still working on crazier and crazier approaches. Tried to use parallelograms, but there is no easy way to delimit them:

Parallelogram interpolation

they tend to get out of the triangle, giving unexpected results

Parallelogram interpolation Parallelogram interpolation

26 - 28 Dec

Tried to get perspective projection instead of isometric, but not too much success, decided to stay with isometric.

Isometric projection

29 - 31 Dec

Working with Bezier curves. Although I did not get too much working code. Learned a lot. After dealing with a lot of problems with the triangulated model, decided to use the original 4x4 Bezier patch data:

Bezier curve interpolation

And now I have a nice interpolation https://github.com/marianodominguez/3d_graphics_prog/blob/main/teapot/src/teapot_01.c

Bezier curve interpolation Bezier curve interpolation