POV-Ray : Newsgroups : povray.general : Mirroring a pigment? : Re: Mirroring a pigment? Server Time
7 Aug 2024 21:21:30 EDT (-0400)
  Re: Mirroring a pigment?  
From: John VanSickle
Date: 24 May 2001 13:56:57
Message: <3B0D4C95.E4867033@erols.com>
Christoph Hormann wrote:
> 
> 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 >

Note to self:  Edit better when using cut-and-paste...

> Anyway i would not be able to write this down straight away like you,

Only took me about five minutes to work out the matrix.

> would rather use the 'rotate, scale, rotate back' method.

Yeah, that would work, too.

-- 
ICQ: 46085459


Post a reply to this message

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