Hi,
There're 3 ways to define a 3d point relative coordinates
1- @x,y,z
2- @distance<[angle about X axis],z (cylindric)
3- @distance<[angle about X axis]<[angle about XY plane] (spheric)
Assuming=:
- org is the orign point (@)
- pt the point to calculate
- p0 the projection of pt on the plane parallel to XY plane which contains org
x, y, z are coordinates
a1 is an angle about XY axis (radians)
a2 is an angle about XY plane (radians)
@x,y,z
Code:
(setq pt (mapcar '+ org (list x y z)))
@d<a1,z
Code:
(setq p0 (polar org a1 d)
pt (list (car p0) (cadr p0) (+ (caddr p0) z))
)
@d<a1<a2
Code:
(setq p0 (polar org a1 (* d (cos a2)))
pt (list (car p0) (cadr p0) (+ (caddr p0) (* d (sin a2))))
)