Info

This question is closed. Reopen it to edit or answer.

How to make graph recognize if he clicked on point is inside, outside or on the border of the shape

1 view (last 30 days)
I have to complete a given code that, when you click on the graph, it will say the point is either inside the ellipse, outside the ellipse or on the ellipse. We also have to translate it into 'Ellipse Space' (make it look like a circle). I did that fine, but I'm stuck on the rest. The Ellipse has an x radius of 3 and a y radius of 6. We were given the code for the makeup of the Ellipse, and the following;
test_variable = ... if test_variable < 0.99 title('point is inside the ellipse') elseif test_variable > 1.01 title('point is outside the ellipse') else title('point is on the ellipse') end
We have to determine the test variable and whatnot. I assume it's the equation, but nothing I've done works. Help would be great!!

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!