|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
I have a point placed on sphere {0 100} - in <0,0,-100>
How to rotate it by: rotate <RX,RY,0> so that point will be placed in
coordinates <X,Y,Z> ? Point <X,Y,Z> is also on sphere {0 100}
--
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> How to rotate it by: rotate <RX,RY,0> so that point will be placed in
> coordinates <X,Y,Z> ? Point <X,Y,Z> is also on sphere {0 100}
Use Reorient_Trans along with vtransform in transforms.inc.
#include "transforms.inc"
#declare reorient = Reorient_Trans(-z, <X,Y,Z>)
#declare point = vtransform(<0,0,-100>, reorient);
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rafal 'Raf256' Maj wrote:
> Hi,
> I have a point placed on sphere {0 100} - in <0,0,-100>
>
> How to rotate it by: rotate <RX,RY,0> so that point will be placed in
> coordinates <X,Y,Z> ? Point <X,Y,Z> is also on sphere {0 100}
>
>
One easy possibility is to create the object around origo (<0,0,0>),
then rotate (and possibly scale) it, then translate it to the final
destination.
--
-Aero
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Slime wrote:
>>How to rotate it by: rotate <RX,RY,0> so that point will be placed in
>>coordinates <X,Y,Z> ? Point <X,Y,Z> is also on sphere {0 100}
>
>
>
> Use Reorient_Trans along with vtransform in transforms.inc.
>
> #include "transforms.inc"
>
> #declare reorient = Reorient_Trans(-z, <X,Y,Z>)
> #declare point = vtransform(<0,0,-100>, reorient);
>
> - Slime
> [ http://www.slimeland.com/ ]
>
>
Cool I never thought of that. Beautiful.
Instead I rewrote the Reorient_Trans macro to use
vector functions. But your way is better.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|