|
|
In article <3d321330@news.povray.org>,
"Tim McMurdo" <tmc### [at] prodigynet> wrote:
> If I understand the function correctly, the line
>
> rotate VAngleD(<-X4-4000,Y4,Z4>, <-15000,75,2435>)
>
> should orient point from vector <-X4-4000,Y4,Z4> to vector <-15000,75,2435>.
>
> The documentation is sparse. Could someone let me know if I am using the
> vector function correctly. If not, I would appreciate some sample code
> showing how it is used.
You misunderstood it, or you misunderstood angles. The VAngleD() macro
returns the angle in degrees between two vectors. In your code, the
angle gets expanded to a vector (< angle, angle, angle>) which doesn't
come close to doing the job. You need to rotate around the correct axis,
which would be perpendicular to the two vectors. The VRotation() macros
might also help here.
It looks like you are trying to do things the hard way though...looks
like you are doing rotation calculations using sin() and cos() functions
instead of vrotate(), and for your orientation problem, I think the
Reorient_Trans() macro in transforms.inc might be better for what you
want.
--
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/
Post a reply to this message
|
|