POV-Ray : Newsgroups : povray.general : is PHASE working backwards? : Re: is PHASE working backwards? Server Time
24 Apr 2024 14:03:25 EDT (-0400)
  Re: is PHASE working backwards?  
From: Bald Eagle
Date: 12 Feb 2018 21:45:01
Message: <web.5a82501c51e282ac5cafe28e0@news.povray.org>
I think that I'd expect the shift to occur in the opposite direction as well.

It seems to be rotating the pattern in the counterclockwise direction.
It would handy to know that phase is in radians instead of degrees as well.

Try this code - it makes 36 cylinders with pattern rotations of 5 degrees each
step, left to right, top to bottom.

//------------
#version 3.71;

global_settings {assumed_gamma 1.0}

#declare W = image_width;
#declare H = image_height;

#declare Zoom = 1;
camera {
  orthographic
  location <W/2, -H/2, -10>    // position & direction of view
  look_at  <W/2, -H/2,   0>
  right 1*x*image_width/Zoom            // horizontal size of view
  up 1*y*image_height/Zoom               // vertical size of view
}



#for (Y, 0, 5)
 #for (X, 0, 5)
  cylinder { <0, -1, 0>, <0, 0, 0>, min (W/14, H/14)
   texture {
    pigment {
     radial
     frequency 1
     phase radians(Y*5+X)
     color_map {
      [0.5 srgb <248, 196, 121>/255]
      [0.5 rgb 1]
     }
    }
    finish {ambient 0 emission 1 diffuse 0}
   }
   rotate -x*90
   translate <(W/12+X*W/6), -(Y*H/6+H/12), 0>
  }
 #end
#end


Post a reply to this message

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