POV-Ray : Newsgroups : povray.beta-test.binaries : Function/ pattern issues. New pattern_modifiers keyword. : Function/ pattern issues. New pattern_modifiers keyword. Server Time
28 Apr 2024 19:27:21 EDT (-0400)
  Function/ pattern issues. New pattern_modifiers keyword.  
From: William F Pokorny
Date: 1 Nov 2019 13:21:09
Message: <5dbc6985$1@news.povray.org>
A new 'pattern_modifiers' keyword continuing work started in the threads:

http://news.povray.org/povray.beta-test.binaries/thread/%3C5da21410%40news.povray.org%3E/

and

http://news.povray.org/povray.beta-test.binaries/thread/%3C5dab3f55%241%40news.povray.org%3E/

We have since v3.5 a vturbulence parse time function. We have too the 
existing pattern { } wrapper - though as a function wrapper, especially, 
its usefulness is limited. The former handles only turbulence the latter 
only returns the resulting pattern value at points in space.

What's missing is a way to access the x,y,z vector result of all the 
modifiers a pigment / pattern might employ. So adding: function { 
pattern_modifiers {} }. As something function enabled, it's usable at 
parse and render time.

The general idea is to set up a real - or dummy - pattern/pigment 
defining a collection of modifiers. A collection of warps, turbulence 
and transforms. Then pattern_modifier {} grabs just the result of those 
operations for a given point returning the function/pattern space 
adjusted x,y,z values. The usage is something like:

#declare FnHelix1_5p = function {
     pattern_modifiers { Pigment00 }
}
#declare FnHelix1_5 = function (x,y,z) {
     FnHelix1_5c(FnHelix1_5p(x,y,z).x,
         FnHelix1_5p(x,y,z).y,
         FnHelix1_5p(x,y,z).z)
}

for functions. Use in user space requires 'opposite' internal to POV-Ray 
values be flipped before use.

See attached example scene and image. The image's left side shows 
spheres placed in a vertical column and collected in a union; as well as 
a helix1 based isosurface. On the right both the placement of the 
spheres and the isosurface are perturbed by the pattern modifiers (here 
gentle turbulence and a rotate x*33) both defined with the pigment used 
for both final objects.

Bill P.


Post a reply to this message


Attachments:
Download 'pattern_modifiersstory.pov.txt' (5 KB) Download 'pattern_modifiersstory.png' (69 KB)

Preview of image 'pattern_modifiersstory.png'
pattern_modifiersstory.png


 

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