F
F
Flaker2014-11-27 23:57:47
Mathematics
Flaker, 2014-11-27 23:57:47

How to determine if a point belongs to a rhombus?

Everything is known about a rhombus (Points, diagonals) A
point is given by X, Y
coordinates .

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
SHVV, 2014-11-28
@SHVV

Actually, if you have dagonals dx, dy, and they are parallel to the axes, and the center is rx, ry, the point is x, y, then the check comes down to the following:
|(x - rx) / dx| + |(y - ry) / dy| <= 2.
Everything.

A
Armenian Radio, 2014-11-28
@gbg

It is necessary to check four times that the point lies on one side of the line containing the side of the rhombus:
The sign Q determines on which side of the line AB the point T lies.
It remains to check this for all sides of the rhombus AB, BC, CD, DA , if the sign is everywhere the same - a point in a rhombus.

E
EndUser, 2014-11-28
@EndUser

"Contour Integral".
In general, sum the angles AXB, BXC, CXD, DXA.
If the sum is ±360°, then the point is inside the polygon.
If the sum is ±180°, then the point is on an edge.
Otherwise, the point is outside.
It seems so.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question