Here is a simple way of projecting 3d coordinates into 2d.
Say (x, y, z) is 3d we want to project into (x', y') which is 2d and F
is the optical focus. Here it is:
if z > F then begin
x' = x * F / (z - F);
y' = y * F / (z - F);
draw(x', y');
end;
It is all based on the equation
1 / Focus = (1 / Original) + (1 / Image)
"Unified Psycho Physics" by DedaNoe
www.geocities.com/DedaNoe
.
|