finding out wheter point is inside ellipse

I'm working on a way to determine if given point is "inside" given ellipse, the problem is I've already forgotten all the related mathematics and don't have time to relearn it and find a way to do it.

The problem:

There is a rectangular plane of given width of $a$ and height of $b$, there is an ellipse with center $C[c_1,c_2]$ (which is located in one of the corners) and point $X[x_1,x_2]$ in one of the corners. The $a$ and $b$ are also lengths of major and minor axis of the ellipse.

I need to figure out a simple way to programmatically check whether the point is in or out of the ellipse. This is going to be done for a lot of points (for example a plane of 6000 x 5000 or 20000 x 40000) and i need to check whether all of the points are inside the ellipse or not and give them corresponding value (array of Boolean values, false = outside, true = inside ).

I need to do the same for triangle.

The way I think now I could just check the triangle given by the three corners of the plane that the ellipse does not use as it's center to cut the number of points to half (the other half is inside the ellipse for sure).

What I need is an easy (fast) way to check whether the point is inside the ellipse or not.

P.S.: I'm not that proficient in English when it comes to mathematics, so if you can think about right tags I would appreciate a comment.

Let $F_1$ and $F_2$ be the foci of the ellipse, and $2a$ be the length of the major axis. If $PF_1+PF_2 > 2a$, then $P$ is outside the ellipse; if $PF_1+PF_2=2a$, then $P$ is on the boundary of the ellipse; otherwise, $P$ is inside the ellipse.
• The foci are on the major axis, they are symmetric with respect to the center $O$ of the ellipse and $OF_1=\sqrt{a^2-b^2}$ holds, where $a$ and $b$ are half of the lengths of the axis. – Jack D'Aurizio Sep 7 '14 at 22:57