Problem 558. Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners
Points = [x, y];
Triangle = [x1, y1; x2, y2; x3, y3]
Return true or false for each point tested.
For example,
input: Points = [0, 0.5]; Triangle = [0, 0; 1, 0; 1, 1]
output: y = 0;
Solution Stats
Problem Comments
-
11 Comments
Show
8 older comments
Nguyen Trong Hiep
on 1 Apr 2022
Still can't imagine how to solve this one
Hamza Harbi
on 5 Feb 2023
This was an interesting one
Griffin
on 18 Jul 2023
This was honestly pretty fun!
Solution Comments
Show commentsGroup

Basics - Triangles
- 9 Problems
- 1274 Finishers
- Calculate the area of a triangle between three points
- Side of an equilateral triangle
- Is this triangle right-angled?
- Find my daddy long leg (No 's')
- Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
- Is the Point in a Triangle?
- Height of a right-angled triangle
- Find the sides of an isosceles triangle when given its area and height from its base to apex
- Can we make a triangle?
Problem Recent Solvers1605
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!