POV-Ray : Newsgroups : povray.binaries.images : pattern blend : Re: pattern blend Server Time
3 May 2024 07:21:17 EDT (-0400)
  Re: pattern blend  
From: Stephen
Date: 5 Mar 2018 11:50:25
Message: <5a9d7551$1@news.povray.org>
On 05/03/2018 15:13, Norbert Kern wrote:
> Stephen <mca### [at] aolcom> wrote:
> 
>> Has anyone tried to produce a solarisation effect?
> 
> Hi,
> with a simple approach I got this image - here is the code
> 

Oo! shiny. I like.

You are on a roll, Norbert. :-)


> // render with image resolution and No AA. Method is very memory intensive for
> large image sizes!
> 
> #version 3.7;
> 
> global_settings {
>          assumed_gamma 1
> }
> 
> #include "stdinc.inc"
> 
> camera {
>          orthographic
>          location <0,0,-2>
>          look_at 0
>          right x*image_width
>          up y*image_height
> }
> 
> #declare image_width_Old = image_width;
> #declare image_ratio = image_width/image_height;
> #declare image_height_Old = image_width_Old/image_ratio;
> 
> #declare pig_map =
> function {
>          pigment {
>                  image_map {jpeg "glasses" gamma 2.2}
>                  scale <image_width_Old,image_height_Old,1>
>          }
> }
> 
> #declare nx = 0;
> #while (nx < image_width)
>          #declare ny = 0;
>          #while (ny < image_height)
>                  #declare paint_pig = pig_map (nx+0.5,ny+0.5,0);
>                  box {
>                          0, 1
>                          pigment {color srgb <max (paint_pig.x,
> 1-paint_pig.x),max (paint_pig.y, 1-paint_pig.y),max (paint_pig.z,
> 1-paint_pig.z)>*2-1}
>                          finish {emission 1 diffuse 0}
>                          translate <nx-image_width*0.5,ny-image_height*0.5,0>
>                  }
>                  #declare ny = ny+1;
>          #end
>          #declare nx = nx+1;
>          #debug concat (str (nx/image_width*100, 0, 1)," % processed \n")
> #end
> 
> 
> Norbert
> 
> 


-- 

Regards
     Stephen


Post a reply to this message

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