POV-Ray : Newsgroups : povray.general : request for pigment help : Re: request for pigment help Server Time
30 Jul 2024 16:13:25 EDT (-0400)
  Re: request for pigment help  
From: Bob Hughes
Date: 27 Oct 2008 14:15:31
Message: <49060543$1@news.povray.org>
"Alain" <ele### [at] netscapenet> wrote in message 
news:4905d7b6$1@news.povray.org...
> Instead of using a rotation, why not use phase?
> It becomes:
>
> texture {
>   pigment {
>    radial frequency 30
>    color_map {
>       [0.25  color rgb <1,0,0>]
>       [0.50 color rgb <0,1,0>]
> //      [0.50 color rgbt <0,0,1>]
>       [0.75 color rgbt <0,0,1,1>]
>       [1.00 color rgbt <1,1,1>]
>       [1.00 color rgbt <1,1,1>]

Forgot to mention before about this last color map entry not being needed.

>    } phase clock //added
>    rotate 90*z
>    //rotate x * frame_number commented out
>    warp {
>     toroidal orientation y dist_exp 1 major_radius 1
>    }
>
> That way, it work for any frequency, and for an animation with any number 
> of frames. If you add +kc in the command line options or the ini file, 
> you'll get a smooth continuous rotation.

Good idea, but in this case it might not be able to do what's wanted if a 
frequency number is used.

I found that frequency 8 is what creates one complete color map for this. 
Multiples of 8 make duplicates, so 32 creates 4 instances of color map.
It's a strange thing that might be a bug in how this particular warp gets 
applied to radial pattern, along with the curious shrinking from zero to one 
for the color entries and any duplicates of the whole.

For a better look at it try this:

camera {
 location -3*z
 look_at 0
 angle 50
 translate -x
}

difference {
 torus {
  1,0.5
 }
 plane {
  x,0
  rotate -90*y
 }
 texture {
  pigment {
   radial frequency 8 // 8 creates a complete circuit of radial, use 
multiples for more
   color_map {
    [0 blue 1] // make beginning more visible
    [0.1 rgb 0.1]
    [0.9 rgb 0.9]
    [1 red 1] // make ending more visible
   }
   //triangle_wave // use frequency 4, or half number when not ramp_wave 
form
   //phase clock
   rotate -90*z
   warp {
    toroidal orientation <0,1,0> dist_exp 1 major_radius 1
   }
  }
  finish {
   ambient 1 diffuse 0
  }
 }
}

You will notice how the pigment pattern apparently compresses as it wraps 
around the torus in a CC direction.

Bob H


Post a reply to this message

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