|
|
Xplo Eristotle wrote:
>
> If this were 2D it would be easy for me, but it isn't 2D and this is
> making me use up my scratch paper to no purpose...
>
> If you have a line (line segment? maybe) with a known length, starting
> at a known set of coordinates, which is then rotated around those
> coordinates by arbitrary amounts around the x and z axes, how do you
> calculate the coordinates of the other end of the line?
Warning: Untested code below
The original "line":
cylinder { pA, pB, CylRad }
// Assuming that you wish the x-axis rotation
// to take place before the z-axis rotation:
#declare pNewB = pA + vrotate(pB - pA, <AngleX, 0 AngleZ>);
The rotated "line":
cylinder { pA, pNewB, CylRad }
Tor Olav
Post a reply to this message
|
|