|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I have a similar problem.
I want to have an object with its tail at <0,0,0> and its nose at a
given <x,y,z>. I want to create it colinear with the X axis and simply
rotate it to be colinear with the <x,y,z> vector.
I've stumped myself on the math for this. How do I do this?
I tried with no success
rotate <0,atan2(z,x)/2/pi*360,atan2(y,x)/2/pi*360>
Thanks for any help.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Sun, 08 Nov 1998 19:47:54 -0500, Greg M. Johnson <@aol.com> wrote:
>I have a similar problem.
>
>I want to have an object with its tail at <0,0,0> and its nose at a
>given <x,y,z>. I want to create it colinear with the X axis and simply
>rotate it to be colinear with the <x,y,z> vector.
>
>I've stumped myself on the math for this. How do I do this?
Go to http://twysted.net/macroscope and look at John VanSickle's
Reorient macro. It does exactly what you need.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks.
I just moved and my hard disk is full to the brim. Wife says no new PC
until we finish unpacking, ie., 2001. Thus, I'm putting off going to POV
3.1 for a while. I understand a bit of matrix algebra, but not the
following line from the recommended macro. Is there a 3.02 way to do
this?
matrix < vX1.x, vY.x,vZ1.x, vX1.y,vY.y,vZ1.y, vX1.z,vY.z, vZ1.z, 0,0,0 >
matrix < vX2.x,vX2.y,vX2.z, vY.x,vY.y, vY.z, vZ2.x,vZ2.y,vZ2.z, 0,0,0 >
Particularly, what does vX1.x mean? The period confuses me. I
understand the vcross and vnormalize functions.
Thanks again.
Ron Parker wrote:
>
> On Sun, 08 Nov 1998 19:47:54 -0500, Greg M. Johnson <@aol.com> wrote:
> >I have a similar problem.
> >
> >I want to have an object with its tail at <0,0,0> and its nose at a
> >given <x,y,z>. I want to create it colinear with the X axis and simply
> >rotate it to be colinear with the <x,y,z> vector.
> >
> >I've stumped myself on the math for this. How do I do this?
>
> Go to http://twysted.net/macroscope and look at John VanSickle's
> Reorient macro. It does exactly what you need.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Mon, 09 Nov 1998 11:07:31 -0500, Greg M. Johnson <> wrote:
>Thanks.
>I just moved and my hard disk is full to the brim. Wife says no new PC
>until we finish unpacking, ie., 2001. Thus, I'm putting off going to POV
>3.1 for a while. I understand a bit of matrix algebra, but not the
>following line from the recommended macro. Is there a 3.02 way to do
>this?
>
>matrix < vX1.x, vY.x,vZ1.x, vX1.y,vY.y,vZ1.y, vX1.z,vY.z, vZ1.z, 0,0,0 >
>matrix < vX2.x,vX2.y,vX2.z, vY.x,vY.y, vY.z, vZ2.x,vZ2.y,vZ2.z, 0,0,0 >
>
>Particularly, what does vX1.x mean? The period confuses me. I
>understand the vcross and vnormalize functions.
>Thanks again.
It means "the x component of vX1". Both of those lines should be legal
POV 3.02 syntax. But you don't need a new PC, just a new hard drive. :)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks, but that web server for twyst's macro station now appears to be
down. Could you post that tiny little macro here?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Mon, 09 Nov 1998 22:56:09 -0500, Greg M. Johnson <@aol.com> wrote:
>Thanks, but that web server for twyst's macro station now appears to be
>down. Could you post that tiny little macro here?
I can't get there either; Twyst has a broken CGI script. Here's an
adaptation of the code, as seen in my rounded cylinder macro. I've
changed all the 3.1-specific stuff to 3.02 stuff, so you can just
put this in an .inc file. #declare Orientation to be your desired
vector, include this, then use transform{trans} where you'd usually
use rotate. This assumes you used x as the original axis.
#declare vX2=vnormalize(Orientation);
#declare vY=vnormalize(vcross(x,vX2));
#declare vZ1=vnormalize(vcross(x,vY));
#declare vZ2=vnormalize(vcross(vX2,vY));
#declare trans=transform {
matrix < 1, vY.x,vZ1.x, 0,vY.y,vZ1.y, 0,vY.z, vZ1.z, 0,0,0 >
matrix < vX2.x,vX2.y,vX2.z, vY.x,vY.y, vY.z, vZ2.x,vZ2.y,vZ2.z, 0,0,0 >
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|