Coordinates of a point related to two other points
I would like to know if someone knows a way of getting the coordinates of a point that belongs to a line perpendicular to another one that connects two points. The last two points are known, and one of them is in the first line. Example:
[IMG]http://img19.**************/img19/2782/axis.jpg[/IMG] Let's say that we are in the point A aiming at B. I want to have C knowing: that the line AC is perpendicular to AB. the length of AC. the coordinates of A the coordinates of B I partially found a solution with some mathematical equations but, I have problems when the divisors get close to 0. Ignore the Z-axis and be aware that the coordinates of each point differ from the other's, both in X-axis and Y-axis. |
Re: Coordinates of a point related to two other points
After you get C, you can use get_distance(_f) with the A and C coordinates.
PHP Code:
|
Re: Coordinates of a point related to two other points
@Dores
The length AC is one of the knowns. ;) @joaquimandrade Something like this should do: Code:
|
Re: Coordinates of a point related to two other points
Quote:
|
Re: Coordinates of a point related to two other points
Quote:
|
Re: Coordinates of a point related to two other points
Quote:
|
| All times are GMT -4. The time now is 08:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.