Last weekend, while I was sick, I made a very small 3D engine, using a very primitive method used by very early 3D engines. This bases around the equations
x = x1/z1
y = y1/z1
where x and y are the 2D points to be displayed and x1, y1, and z1 are the input coordinates for the 3D point. This equation simply scales the x1 and y1 coordinates of the 3D point by the z1 position, in order to create a sense of depth. The "camera" is centered at the origin. Then, one does a series of modifications to make this work with alternate directions, camera positions, and field of view. Up until now Daniel has been looking through different forms of 3D rendering and I can definitely see myself going down the same path.
No comments:
Post a Comment