# Coordinates given, find whether a point is inside or outside

• glid02
In summary, the conversation discusses how to derive an equation to determine if a point is inside or outside a shape with only the coordinates of the vertices given. It is suggested to use a distance formula and divide the shape into smaller pieces for accurate calculations. Another approach is to scan the shape into a matrix and analyze the point's location in relation to the filled and empty spaces.
glid02
I'm supposed to derive an equation that will find whether or not a point is inside or outside a shape with only the coordinates of the vertices given.

The shape is expected to be something like this:

______
|...|..._____
|...|______|...|
|......|_____
|........|
|........|
|...___________...|
|...|....|...|
|______|.....|_____|

with the coordinates of the corners given. The shape isn't exactly that but it's basically a collection of boxes.

I really have no idea where to start, if anyone could give me a starting point I'd appreciate it.

Thanks.

Write one variable as a function of the other. So y = x^2, or whatever.

KoGs is right, you do need a function. I would recommend starting with a distance formula, and creating a convention (+ inside object, - outside object). The real problem is that you'll need to subdivide your object into smaller, reasonable pieces. Create perimeter bounds for each of these shapes, and then do the necessary distance calculations. At the end, you will have to compare to make sure you don't have any overlap in your data set -> Sum Individual Data Sets - Union of Data Sets
Another way to tackle this is scan whole object into a matrix, fill the shape, tag inside to be 1's, and then outside to be 0's (null/void). Then apply a particle analysis to see if your point lands on empty or full space in your matrix.

## 1. What do coordinates represent in this scenario?

Coordinates represent the location of a point in a two-dimensional plane, with the first number representing the x-axis and the second number representing the y-axis.

## 2. How do you determine if a point is inside a given shape?

To determine if a point is inside a given shape, you can use a mathematical formula or algorithm specific to the shape to compare the coordinates of the point to the coordinates of the shape's vertices or edges.

## 3. What is the difference between "inside" and "outside" of a shape?

Inside of a shape refers to any point that falls within the boundaries of the shape, including on the edges or vertices. Outside of a shape refers to any point that falls outside of the shape's boundaries.

## 4. Are there any specific coordinates that are always considered inside or outside of a shape?

No, the coordinates that are considered inside or outside of a shape will vary depending on the shape and its boundaries. It is important to use the appropriate formula or algorithm for the specific shape in order to accurately determine if a point is inside or outside.

## 5. Can a point be both inside and outside of a shape?

No, a point can only be either inside or outside of a shape at a given time. However, the point may move from being inside to outside or vice versa if the shape's boundaries change.

• Calculus and Beyond Homework Help
Replies
1
Views
901
• Calculus and Beyond Homework Help
Replies
9
Views
1K
• Special and General Relativity
Replies
63
Views
3K
• Mechanical Engineering
Replies
5
Views
216
• Precalculus Mathematics Homework Help
Replies
8
Views
2K
• Electromagnetism
Replies
8
Views
1K
• Calculus and Beyond Homework Help
Replies
1
Views
1K
• Special and General Relativity
Replies
11
Views
518
• Special and General Relativity
Replies
8
Views
1K
• Calculus and Beyond Homework Help
Replies
8
Views
530