POV-Ray : Newsgroups : povray.general : Mirroring a pigment? : Re: Mirroring a pigment? Server Time
7 Aug 2024 21:17:41 EDT (-0400)
  Re: Mirroring a pigment?  
From: Christoph Hormann
Date: 24 May 2001 13:49:42
Message: <3B0D49E7.A58E6795@gmx.de>
John VanSickle wrote:
> 
> And if that axis is not parallel to any of the coordinate axes:
> 
> #local vA=vnormalize(Axis_of_Mirroring);
> matrix <1-2*vA.x*vA.x, -2*vA.x*vA.y, -2*vA.x*vA.z,
> matrix <-2*vA.x*vA.y, 1-2*vA.y*vA.y, -2*vA.y*vA.z,
> matrix <-2*vA.x*vA.z, -2*vA.y*vA.z, 1-2*vA.z*vA.z,
>         0, 0, 0 >
> 
> This is untested, but I'm confident it works.
> 

Surely not the way it is, better use (untested too BTW):

#local vA=vnormalize(Axis_of_Mirroring);
matrix <1-2*vA.x*vA.x,  -2*vA.x*vA.y,  -2*vA.x*vA.z,
         -2*vA.x*vA.y, 1-2*vA.y*vA.y,  -2*vA.y*vA.z,
         -2*vA.x*vA.z,  -2*vA.y*vA.z, 1-2*vA.z*vA.z,
                    0,             0,             0 >

Anyway i would not be able to write this down straigt away like you, would
rather use the 'rotate, scale, rotate back' method.  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

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