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.
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.