1

I'm reading this topic Analytic Treatment of the Perspective View of a Circle in this article. I don't understand the subject, so I decided to analyze it piece by piece.

  1. $z-z_0 = m(y-y_0)$ What is the equation used for?
  2. And why do they put it inside the sphere equation?

$(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 = r^2$

-->

$(x - x_0)^2 + (1 + m^2)(y - y_0)^2 = r^2$

Edit:Finally got it, thanks to your contributions. I just couldn't figure out how the 2 equations at the end were derived, I would appreciate it if you could explain.

$y-y_0=\frac{z_0-vy_0}{v-m}$

$x-x_0=uy-x_0=\frac{u(z_0-my_0)-vx_0+mx_0}{v-m}$

1 Answers1

2

$z-z_0=m(y-y_0)$ and $x$ arbitrary describes a plane with normal direction $(0,1,m)$. Projection of the sphere in this normal direction onto the $xy$-plane will leave an elliptical shadow that is described by the ellipse equation $$(x-x_0)^2+(1+m^2)(y-y_0)^2=r^2.$$


As to the wider context of the question: The equations given describe a scene in 3D space, specifically a circle defined as intersection of a sphere and a plane.

A camera is situated with its lense or hole (for a pinhole camera) at $(0,0,0)$. The physically correct image plane would be behind the lense, but mathematically it makes no difference (except a point-reflection) to use a plane at the same distance in-front of the lense.

The forward direction of the camera is here the y-direction, the image plane is positioned orthogonal to that at $y=1$. The optical ray for a point in the image plane is thus $(x,y,z)=(su,s,sv)=(yu,y,yv)$.

Together this results in an over-determined system connecting points in the image plane to the object in the scene \begin{align} x&=uy\\ z&=vy\\ z-z_0&=m(y-y_0)\\ r^2&=(x-x_0)^2+(y-y_0)^2+(z-z_0)^2 \end{align} Use these equations to eliminate $x,y,z$ starting with $x,z$ \begin{align} vy_0-z_0&=(m-v)(y-y_0)\\ r^2&=(u(y-y_0)+(uy_0-x_0))^2+(y-y_0)^2+(v(y-y_0)+(vy_0-z_0))^2 \end{align} and then $y$, to get \begin{align} r^2(m-v)^2&=(u(vy_0-z_0)+(m-v)(uy_0-x_0))^2+(vy_0-z_0)^2+m^2(vy_0-z_0)^2 \\ &=((vx_0-uz_0)+m(uy_0-x_0))^2+(1+m^2)(vy_0-z_0)^2 \end{align} for the equation of the projection in the image plane. Now one would need to expand and sort the terms to get the normal form for the resulting quadric.

Lutz Lehmann
  • 126,666
  • Thank you very much sir. If you have time, sir. If you understand how this $y-y_0=\frac{z_0-vy_0}{v-m}$ and $x-x_0=uy-x_0=\frac{u(z_0-my_0)-vx_0+mx_0}{v-m}$ equation is derived, I would appreciate it if you could explain. – kirismasdada Jan 22 '23 at 17:47
  • What equations did he use to get them sir? – kirismasdada Jan 22 '23 at 17:56
  • 1
    You are doing ray-tracing to the plane $y=1$ with coordinates $(x,z)=(u,v)$ there, meaning the rays have a parametrization $(uy,y,vy)$. The object to trace is the circle resulting from the intersection of the sphere with the mentioned plane. What remains is intelligent elimination of the variables $x,y,z$ so that one equation in $u,v)$ remains. – Lutz Lehmann Jan 22 '23 at 17:56
  • I'm taking your precious time sir but I understand that $v=\frac{z}{y}$, $vy=z$ and (3.) $z - z_0 = m (y - y_0)$ --> $vy-z_0=m(y-y_0)$ --> this is obtained from here. $y=\frac{z_0-vy_0}{v-m}$ I think the steps are like this, but when i think about this equation ($y-y_0=\frac{z_0-vy_0}{v-m}$) i can't see how he got it, I am high school student. I guess the best thing would be to learn analytical geometry otherwise it feels like witchcraft – kirismasdada Jan 22 '23 at 18:30
  • 1
    You could go $v(y-y_0)+vy_0-z_0=m(y-y_0)$ and go from here never dissolving the differences. – Lutz Lehmann Jan 22 '23 at 18:39
  • Thank you very much sir. Finally, I understand. – kirismasdada Jan 22 '23 at 19:31
  • Sir, I learned the equation parts very well thanks to you, thank you very much. Now I want to understand the logic better and there are a few points I want to ask. What I understand from these equations is that the $z-z_0=m(y-y_0)$ equation helps the sphere define a plane passing through the z-axis? thus creating a circle. Then using the projection equations ($u=\frac{x}{y}$, $v=\frac{z}{y}$) and the line equation ($z-z_0=m(y-y_0)$ is used as the line equation this time.) it gets a new look and this creates an ellipse. Please correct me if I misunderstood. – kirismasdada Jan 26 '23 at 13:15
  • 1
    Earlier I thought that the $z-z_0 = m(y-y_0)$ equation creates a drawing plane (like this photo-example) Now I think the transformation is done just to get the circle. $z-z_0 = m(y-y_0)$ --> $(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 = r^2$ --> $(x-x_0)^2+(1+m^2)(y-y_0)^2=r^2.$ . – kirismasdada Jan 26 '23 at 13:18
  • If there is any mistake in my understanding, if you correct me, you will make me very happy, sir. – kirismasdada Jan 26 '23 at 13:21
  • 1
    Yes, the equations with the zeroed coordinates as midpoint serve to define the geometric object. The other equations define the optical ray. It is not explicit in the image fragments that you produced, but it can be easily inferred that u,v are the photo image coordinates and that the image is constructed in the y==1 plane. – Lutz Lehmann Jan 26 '23 at 13:25
  • I haven't quite figured out what it is to make the midpoint zero, but I'm of the opinion that $y=1$ is the distance between the eye and the drawing plane. – kirismasdada Jan 28 '23 at 21:54
  • Finally sir, If you don't mind, I want to ask a question, what is the meaning of last part $z_0-my_0$ in the article? and why $z_0-my_0>0$ ? – kirismasdada Feb 14 '23 at 16:11
  • I thank you very much for your understanding and patience. – kirismasdada Feb 14 '23 at 16:14
  • I do not see at the moment what this additional condition does for the image. It describes the location of the origin and $x$ axis on one side of of the plane. – Lutz Lehmann Feb 14 '23 at 17:13
  • I tried to understand the equations visually, but there really is a prerequisite to understanding the problem. – kirismasdada Feb 28 '23 at 10:09
  • It is said to have this plane equation, but I do not understand how derived. $z-z_0=m(y-y_0)$, $(0,1,m)$ normal direction. – kirismasdada Mar 03 '23 at 10:14
  • The final equation for the projected circle can be simplified by cancelling $(z_0-my_0)^2$. That of course is only possible if this factor is not zero. Geometrically this means that the eye-point, the origin, is not in the plane of the circle. Having $z_0-my_0>0$ just means that you look down on the circle, not up to it (but you can always turn the image around to get this effect). – Lutz Lehmann Mar 03 '23 at 10:30
  • Thank you sir, it became clearer when I checked the concepts that I did not understand. – kirismasdada Mar 04 '23 at 12:43