POV-Ray : Newsgroups : povray.programming : Bug in Compute_Axis_Rotation_Transform() : Bug in Compute_Axis_Rotation_Transform() Server Time
28 Jul 2024 14:30:39 EDT (-0400)
  Bug in Compute_Axis_Rotation_Transform()  
From: Chris Huff
Date: 30 Jun 2000 18:39:35
Message: <chrishuff-FACEBB.17394030062000@news.povray.org>
I ran into this when writing the particle system patch. The vector V1 is 
modified by the function, which normalizes it for internal use. The 
function starts off like this:


void Compute_Axis_Rotation_Transform (TRANSFORM *transform, VECTOR V1, 
DBL angle)
{
  DBL l, cosx, sinx;

  VLength(l, V1);
  VInverseScaleEq(V1, l);
...


I deleted the VLength and VInverseScaleEq, and rewrote it like this:

void Compute_Axis_Rotation_Transform (TRANSFORM *transform, VECTOR 
AxisVect, DBL angle)
{
  DBL cosx, sinx;
  VECTOR V1;

  VNormalize(V1, Vect);
...

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.