简体   繁体   中英

How to locate a point in z axis given surface location x,y and z and the distance from the first point?

I have location of a point P1 in x, y and z form. I want to find another point which is directly below this point (in z axis) at a distance d. This means that x & y co ordinates of P2 will be the same as that of P1. How to find the coordinates of P2 (z value)?

Maybe the most correct way would be to define a vector for the original point and one for the difference to the other point. Let a, b, c, represent the x, y, z coordinates for the known point and d is the distance of point 2 below point 1, then something like

v1 = {a, b, c}
diff = {0, 0, d}

and then subtract the two

v2 = v1 - diff

However, to merely get the coordinates of course all you really need to do is to define

v2 = {a, b, c-d}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM