I am creating a program which maps an Ellipse to a Circle. However, there is a twist, the center of the Circle is offset inside the Ellipse. See this picture: Ellipse and Circle
In this picture the red dot inside the ellipse is the location of the Circle's center in the Ellipse. So, I know the dimensions and centers of both the Circle and the Ellipse and the center point of the Circle inside the Ellipse. Now, how would I go about mapping points inside this Ellipse to a Circle?
Edit:
Sorry for not clarifying my question. Yes, I meant that the red dot in the Ellipse is the Circle's center mapped into the Ellipse.
I took a while to reply but I haven't been slacking off, I already implemented the solution given by you people.
As Aretino mentioned, I used Homography to solve this problem. See: http://www.corrmap.com/features/homography_transformation.php
If only I had checked this page more often, I would have known that Linear Transformation would have been far more simpler. So for everyone with this problem, use Linear Transformation as described by Aretino. I will be using it to make my program simpler.
Thank you all so much for helping me out. Here is the end result of your effort: :)
If point $O$ is to be mapped to the centre of the circle, let $EF$ be the diameter of the ellipse through $O$. Draw tangents $AB$, $CD$ through $F$ and $E$ and draw $GH$ through $O$ parallel to both tangents. Draw then tangents $BC$, $DA$ through $G$ and $H$. There is a homography mapping the ellipse to the circle, point $O$ to the center $O'$ of the circle and trapezoid $ABCD$ to square $A'B'C'D'$.
To find the transformed of a point $P$ inside the ellipse, you can exploit the invariance of cross-ratios in a homography. For instance, draw line $OP$ intersecting two opposite sides of the trapezoid at $R$ and $Q$. From $(A,B;F,Q)=(A',B';F',Q')$ you can find $Q'$ and then from $(R,Q;O,P)=(R',Q';O',P')$ you can find $P'$.
As this is a linear transformation (in homogeneous coordinates) you can also find a transformation matrix from four couples of corresponding points (e.g. points $EFGH$ and $E'F'G'H'$).