Calculating angle of circle to produce given ellipse

I know I should keeps this short, but I need to explain it a little. So, please have patience with me :)

Given a standard ellipse, and its eccentricity and position on screen, is there some clever way of calculating how much a regular circle needs to be tilted in (angles) in a perspective view to produce said ellipse? Obviously the tilt is related to the position on screen, as the very act of moving a circle around, will change the ellipse. So it's not so much a tilt in world space I need to calculate, as it is the angle between a ray going from the center of the circle to the camera, and the normal of the circle (I'm not sure if the normal of a circle is the right term when speaking of a 2D object, but think of the cap of a cylinder instead, then you know what I mean by the normal from the center of the cap).

I have tried for a long time now, by using a purely trigonomical approach, but even though my results aren't way off, they aren't precise either. And the closer to camera the circle is, the less precise my method is. It's surele because my approach considers the view orthogonal ;)

I have the angular separation of the two maximum distances (on the semi-major axis, or more plainly, the total width of the ellipse), calculated from the cameras field of view, and the screen seperation of said points, and the center position of the ellipse on screen, which my intuition tells me I need, in order to calculate this. I also have the perspective transformation matrix of the camera. I just can't find the right approach. The ellipse are in no way alligned with the view axis, it can be rotated.

This thread, which I posted some weeks ago, gave me a great solution to a related problem, but this was before I had the ellipse. And even though the math I was offered back then in theory would be what I need to solve this with the ellipse, it is WAY too affected by even the smallest inaccuracies of the center direction. It only works on perfect data. This is why I came up with this elliptic approach instead, where the ratio between the semi major/-minor axis should be A LOT less affected by inaccuracies, and the calculated angle should be more precise, even when data is noisy.

Sorry for the long story. Please, if anybody can push me onwards, I would be grateful! And if not, I'm sure it's for a good reason ;)
 PhysOrg.com science news on PhysOrg.com >> Ants and carnivorous plants conspire for mutualistic feeding>> Forecast for Titan: Wild weather could be ahead>> Researchers stitch defects into the world's thinnest semiconductor
 Hi, I find it hard to answer your question as I found the geometry of your problem is not explained clearly. You spoke about "perspective transformation matrix of the camera". Is your problem related in any way to camera calibration with dot array calibration pattern?

 Quote by mnb96 Hi, I find it hard to answer your question as I found the geometry of your problem is not explained clearly. You spoke about "perspective transformation matrix of the camera". Is your problem related in any way to camera calibration with dot array calibration pattern?
It all goes on in a game engine, so the camera has perspective transformation matrix defined. And no, this is not for calibrating, this is just as explained ;)

1) I have an ellipse.
2) This ellipse has a major and minor semi axis. The max points of these two axis are defined. The axis rotation on screen is also defined.
3) The world angle from the camera through each of these points are defined

I need to find a method of calculating the angular tilt of a circle, which would produce such an ellipse on that exact location on screen.

But..Hold on with trying to answer me, I may have found a solution myself. Or at least a work around.

Recognitions:
Gold Member
Drawing a picture should help you. If the plane of the circle makes angle $\theta$ with the screen on which you are projecting, you have a line of length 2r (representing the circle of radius r) forming the hypotenuse of a right triangle with angle $\theta$ and base leg, the projection, of length $2r cos(\theta)$. That is, a circle with radius r, $x^2+ y^2= r^2$, at angle $\theta$ projects to an ellipse with major semi-axis of length r and minor semiaxis of length $r cos(\theta)$. Its equation would be $x^2/r^2+ y^2/(r^2 cos^2(\theta))= 1$.