POV-Ray : Newsgroups : povray.pov4.discussion.general : A yuqk fork seedfi example. Server Time
27 Dec 2024 03:52:35 EST (-0500)
  A yuqk fork seedfi example. (Message 1 to 2 of 2)  
From: William F Pokorny
Subject: A yuqk fork seedfi example.
Date: 30 Oct 2023 15:02:35
Message: <653ffdcb@news.povray.org>
With the yuqk fork release posted today I started to include some simple 
example scenes for particular features. Attached an image from the 
seedfi_00.pov example.

It's an image that just showed up as I played and I thought it cool. The 
relevant bit of code is below.

...
#declare CarmineRed = srgb <1,0,0.21961>;
#declare Black = srgb <0,0,0>;
#declare ChalkGreen = srgb <0.11765,0.68627,0.07843>;
#declare ColorMap = color_map {
     [ -1 CarmineRed ]
     [  0 Black ]
     [  1 ChalkGreen ]
}

// The focus is just below. It shows the use of the seedfi
// pattern and that it needs to use function_interval due the
// -1..1 values it generates. There is too a chaining of two
// _wave general value pattern modifiers which can create effects
// not otherwise easily achieved.
#declare Fn = function {
     pattern {
         seedfi function_interval sine_wave
         warp {
             turbulence <0,0,1.667>
             octaves 5
             omega 0.67
             lambda 5.3
             it_scale 1/7
         }
     }
}
#declare Pigment00 = pigment {
     function { Fn(x,y,z) }
     function_interval
     frequency 33 triangle_wave
     color_map { ColorMap }
     translate <0,0,-0.5> scale 1/3
}
...

Bill P.


Post a reply to this message


Attachments:
Download 'seedfi_00.jpg' (270 KB)

Preview of image 'seedfi_00.jpg'
seedfi_00.jpg


 

From: William F Pokorny
Subject: Re: A yuqk fork seedfi example.
Date: 30 Oct 2023 15:45:45
Message: <654007e9$1@news.povray.org>
On 10/30/23 15:02, William F Pokorny wrote:
> 

And this image demonstrates the just added 'blend_mode 5' to go with 
'blend_mode 4'. The new to yuqk fork modes 4 and 5 don't operated on the 
color channel values, but rather the two internal weight values of the 
interpolation between the end points of each blend range. In other words 
the gamma adjustment is getting applied to the weighting factors. Mode 4 
accentuates the end parts of the blend while 5 the middle part.

(a)

> #declare ColorMap = color_map {
>      [ -1 CarmineRed ]
>      [  0 Black ]
>      [  1 ChalkGreen ]
> }
> 

For the attached image, the map above was changed to:

#declare ColorMap = color_map {
     blend_mode 5  blend_gamma 0.667
     [ -1 CarmineRed ]
     [  0 Black ]
     [  1 ChalkGreen ]
}

Bill P.


Post a reply to this message


Attachments:
Download 'seedfi_00a.jpg' (204 KB)

Preview of image 'seedfi_00a.jpg'
seedfi_00a.jpg


 

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