what is the similar triangles argument?

233 Views Asked by At

I’m reading a textbook on 3D graphics math. It’s describing how to model a pinhole camera, using a film plane at z = 1. However, the book then says this:

Given a point p in the scene with eye coordinates [x,y,z,1] it is easy enough to see (say, using a similar triangles argument) that the ray from p to the origin hits the plane at:

x_n = -(x/z)

y_n = -(y/z)

my question is, what do they mean by “using the similar triangles argument?” I’m aware similar triangles are ones with the same shape, but I don’t know what the “argument” they refer to here is, nor how it demonstrates the normals are negative [x or y] over z. I’m not very well versed in math, so apologies if this seems like a silly thing to not know.

Update: people asked for the associated diagram, here it is, or at least the closest one to the text above: enter image description here

1

There are 1 best solutions below

1
On

Perhaps the below annotated image with only the images that matter will help you understand better

This is a view of the triangle formed by point P on yz plane w.r.t pinhole (origin)

I considered a point on the yz plane, x = 0 to make it easier

Let P=[0,y,z] and it's reflection on the z=-1 plane be Q[0,y_n,-1]

You can verify that the triangles on the opposite sides of the y=0 plane in the above picture are similar triangles. So, from the rule of equal ratios of sides,

z/z_n = y/y_n

Since z_n is on z=-1 plane, the distance is always "1" from origin
z/1 = y/y_n

y_n = (y/z)  (Here y_n is the distance of Y from origin. Not the actual coordinate)

The similar triangles rule is used to derive the value of y_n w.r.t y,z which are known coordinates. But the negativity comes from the fact that they are on the opposite sides of the y=0 plane

i.e. coordinate(y_n) = -(y/z)

You can do a similar setup with xz plane to derive x_n = -(x/z)