I found this One-point perspective formula, but I would like to know what the formulas are for two-point perspective and three-point perspective.
Here is a Desmos graph to further explain my question: https://www.desmos.com/calculator/ixbkrg092x. This post, https://computergraphics.stackexchange.com/questions/8255/finding-the-projection-matrix-for-one-point-perspective, helped me to derive a function, p(x, y, z), that I integrated into my Desmos graph. The variable d is the distance from the viewer's dominant eye to the 3D origin, (0, 0, 0). The variable q is the angle at which the back of the cube is facing. The variable y1 is the y-coordinate of the horizon on the plane of Desmos. The point (x1, y1) is the vanishing point corresponding to the z-axis. The point (x2, y1) is the vanishing point corresponding to the x-axis. Notice how when q approaches π/2 or 3π/2, the cube becomes distorted and appears longer. When it equals π/2 or 3π/2, however, the point (x1, y1) returns undefined. My goal is to incorporate two-point perspective, (and maybe even three-point perspective after I master two-point perspective) in hope of fixing the distortion problem, and making the animation of the rotating cube more realistic and more accurate to the real world.
Am I correct that including two-point perspective will fix the problem? If yes, what is the formula for two-point perspective, as well as for three-point perspective?
I have searched all over the internet and have found nothing.
Thank you in advance.

![How to apply the equationsHow to apply the equations?
][2]](../../images/ca48929b19260bf2223bd89529d714aa.webp)