Example
Divide x and y by z to show exact foreshortening.
highlighted = computed this step
Step 1 — z equals 1
Compute the highlighted value.
point, factor, projection((4, 2, 1), 1, (4, 2))
Step 2 — z equals 2
Compute the highlighted value.
point, factor, projection((4, 2, 2), 1/2, (2, 1))
Step 3 — z equals 4
Compute the highlighted value.
point, factor, projection((4, 2, 4), 1/4, (1, 1/2))
Step 4 — Scale factors
Compute the highlighted value.
scale factors(1, 1/2, 1/4)
perspective-divide
Perspective projection makes farther points smaller by dividing their x and y coordinates by z.