Answer the question
In order to leave comments, you need to log in
How to find out the coordinates of points (vertices)?
Hello, tell me how to find the coordinates of two points of an object?
You need to find the points marked in orange, i.e. the center of the "top" (front) of the object and the center of its "bottom" (back).
Known about the object:
Answer the question
In order to leave comments, you need to log in
Take the angle a positive, clockwise. That is, instead of the angle shown in the figure of -45 degrees, take 360-45. If it is known in advance that the angle is set within (-360; 360) , then you can simply take the angle 360+a . Although in fact only the lower limit is important, and it is possible to write a reduction of the value to this limit.
The front coordinate relative to the center is: (cos a * h/2; sin a * h/2) . To convert to absolute coordinates, do not forget to add the center coordinates to the relative ones.
The task coordinate can be calculated either similarly, taking the angle 180+a, or by taking the coordinates inverse to the coordinates of the translation. In absolute coordinates, respectively, it is enough to subtract the front coordinates from the center coordinates, since the front and back are symmetrical about the center.
Since you need to work with a line passing through the center along the object, the width and coordinates of the corners are not needed in the solution. h/2 is the distance from the center to one of the desired points.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question