POV-Ray : Newsgroups : povray.bugreports : Bug in Compute_Axis_Rotation_Transform() Server Time
14 May 2024 04:08:39 EDT (-0400)
  Bug in Compute_Axis_Rotation_Transform() (Message 1 to 1 of 1)  
From: Chris Huff
Subject: Bug in Compute_Axis_Rotation_Transform()
Date: 30 Jun 2000 23:16:43
Message: <395d629b$1@news.povray.org>
I ran into this when writing the particle system patch. The vector 
parameter 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);
....


The fix:
I replaced the VLength and VInverseScaleEq with VNormalize, and added a 
local vector for the normalized version.

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

  VNormalize(V1, AxisVect);
....

-- 
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.