POV-Ray : Newsgroups : povray.advanced-users : Shear_Trans usage? : Re: Shear_Trans usage? Server Time
30 Jun 2024 02:56:01 EDT (-0400)
  Re: Shear_Trans usage?  
From: StephenS
Date: 18 Jan 2010 20:20:01
Message: <web.4b550848adbc88f57d31a1620@news.povray.org>
Jim Charter <jrc### [at] msncom> wrote:
> Can anyone show me proper usage of the Shear_Trans macro.
>
> This is a modification I made to the "Basic Scene" supplied on the
> insert menu.  Can't get it to parse.
>
> #local A=<1,2,3>;
> #local B=<1,2,3>;
> #local C=<1,2,3>;
> sphere {
>    0.0, 1
>    Shear_Trans(A,B,C)
>    texture {
>      pigment {
>        radial
>        frequency 8
>        color_map {
>          [0.00 color rgb <1.0,0.4,0.2> ]
>          [0.33 color rgb <0.2,0.4,1.0> ]
>          [0.66 color rgb <0.4,1.0,0.2> ]
>          [1.00 color rgb <1.0,0.4,0.2> ]
>        }
>      }
>      finish{
>        specular 0.6
>      }
>    }
> }

Try:

#include "transforms.inc"
camera {translate<0,0,-5>}
#local A=<1,2,3>;
#local B=<1,1,3>;
#local C=<1,2,1>;
sphere {
   0.0, 1
   Shear_Trans(A,B,C)
   texture {
     pigment {
       radial
       frequency 8
       color_map {
         [0.00 color rgb <1.0,0.4,0.2> ]
         [0.33 color rgb <0.2,0.4,1.0> ]
         [0.66 color rgb <0.4,1.0,0.2> ]
         [1.00 color rgb <1.0,0.4,0.2> ]
       }
     }
     finish{
       specular 0.6
     }
   }
}

Stephen S


Post a reply to this message

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