Scene setup demo 1

In this demo we replace the hardcoded cube from the previous demo with a cube defined as a set of vertices and triangles, as described in the Representing a Cube section.

This lets us draw any object made of triangles by using the appropriate lists of vertices and triangles, but leaving the rendering code unmodified.

Computer Graphics From Scratch · Dedication | Acknowledgements | Table of Contents | Introduction | Introductory Concepts
Part I: Raytracing · Basic Raytracing | Light | Shadows and Reflections | Extending the Raytracer
Part II: Rasterization · Lines | Filled Triangles | Shaded Triangles | Perspective Projection | Describing and Rendering a Scene | Clipping | Hidden Surface Removal | Shading | Textures | Extending the Rasterizer
Appendixes · Linear Algebra | Afterword