|
 |
On 11/8/23 10:27, kurtz le pirate wrote:
> The ideal solution (for me) would be :
> pigment {
> onion
> color_map { ... }
> myWaveTypeFn // for the wave
> }
>
> myWaveTypeFn same as standard cubic_wave, poly_wave, ...
I confess I'm, unsure what you are trying to do.
The code below works today, FWIW.
Aside: One of the changes yuqk made was so that poly_wave always chains
after the other wave modifiers. Meaning you can use, for example,
'triangle_wave poly_wave 2' and the code runs both modifiers with
poly_wave always being executed last.
Bill P.
// Sample scene. 'povray onion.pov +w800 +h800 +p +mv3.8'
global_settings { assumed_gamma 1.0 }
#declare VarOrthoMult =
3.0/max(image_width/image_height,image_height/image_width);
#declare Camera01z = camera {
orthographic
location <0,0,-2>
direction z
right VarOrthoMult*x*max(1,image_width/image_height)
up VarOrthoMult*y*max(1,image_height/image_width)
}
#declare FnOnion = function { pattern { onion triangle_wave } }
#declare Fn = function {
FnOnion(x,y,z) * 6.0 // = 'frequency 6'
}
plane { -z 0
pigment {
function { Fn(x,y,z) }
poly_wave 2
// I'm using the default color map, but you can chain
// the functions as deep as you want and each chain
// could be a color channel in a user_defined pigment.
}
finish { emission 1 }
}
camera { Camera01z }
// If you want to see linear values in the preview display
// over gamma corrected ones, add display_gamma=1.0 to the
// command line.
Post a reply to this message
|
 |