POV-Ray : Newsgroups : povray.general : Mirroring a pigment? : Re: Mirroring a pigment? Server Time
7 Aug 2024 21:22:46 EDT (-0400)
  Re: Mirroring a pigment?  
From: John VanSickle
Date: 24 May 2001 13:03:02
Message: <3B0D3FF1.A0441D65@erols.com>
Peter Popov wrote:
> 
> On Wed, 23 May 2001 23:38:36 -0700, Bob Franke
> <bob### [at] hotmailcom> wrote:
> 

> >the same pigment, such as  Blue_Sky,  on one hemisphere and use the
> >mirror of that texture on the other hemisphere.  I have tried

> >Thanks in advance for any help,
> 
> Scale it -1 along the axis you want to mirror it about.
> 
> Mirror x: scale <-1,1,1>
> Mirror y: scale <1,-1,1>
> Mirror z: scale <1,1,-1>

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.

Regards,
John
-- 
ICQ: 46085459


Post a reply to this message

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