This project relates to 3D graphics. ? I need the mathematical formula for the 3D plot of a circle. ? The circle can be centred at any point, on any plane; ? and the camera can be at any point in any orientation. ? ?
I need the formula in terms that I understand, using my presentation of the problem, so I'll give you my 3D projection of (x,y,z) formula and I'll expect the answer in terms of these variable names.
Here I'm using capitals for 3D vectors and lowercase for scalars. ? In our interaction, I don't want to use any fancy non-keyboard symbols.
K = circle centre
g = circle radius
N = face normal for the plane the circle is on
P = unknown point which is on the circle
The equations of the circle are:
(P - K) . (P - K) = g^2
(P - K) x N = 0
I'm using this formula for the 3D plot of a point:
C = camera position
D = camera forward direction
U = camera up direction
R = camera right direction
P = arbitrary point
(centre_x, centre_y) = point in the centre of the image, in pixels
scale_x, scale_y = scalars to transform the?
(x,y) = projection of the point into the image, in pixels
Let W = P - C
d = Wx*Dx + Wy*Dy + Wz*Dz
u = Wx*Ux + Wy*Uy + Wz*Uz
r = Wx*Rx + Wy*Ry + Wz*Rz
x = r*scale_x/d + centre_x
y = u*scale_y/d + centre_y
My apologies if my symbology is non-standard.
What I want is an equation with 2 unknowns: ? 'x' and 'y', defining the curve that the circle (above) makes when projected onto a 2D surface using the given formula (below).