0

What is the formula to perspective projection?

Is:

(p * cameraFocal) / pz

or: p * (cameraFocal / pz)

amd
  • 53,693
  • Some context would help, is this an optics question? Some example matrices would be helpful. I don't know what any of those symbols mean, particularly p and pz. There's also a physics stack exchange, maybe that would be more helpful? – Cuhrazatee Jun 29 '18 at 17:43
  • Is the context of computer graphics.

    P is x or y position, pz is z position.

    In my rendering wireframe software this formula seems to have fixed a bug that happened when the object was far away, the correctly formula in this case is first.

    – Jonathan Costa Jun 29 '18 at 17:52
  • Convert to simple homogeneous coordinates first: $x' = xd / (x+d), y' = yd / (y+d), z' = 0$ where $d>0$. And $w' = z/d+w$ –  Jun 29 '18 at 18:07
  • ............... w? – Jonathan Costa Jun 29 '18 at 18:51
  • If all of those values are scalars (numbers), then the two expressions that you have are completely equivalent. – amd Jun 29 '18 at 21:17

0 Answers0