POV-Ray : Newsgroups : povray.binaries.images : media plus spline density equals art? : Re: media plus spline density equals art? Server Time
16 Apr 2024 01:29:13 EDT (-0400)
  Re: media plus spline density equals art?  
From: William F Pokorny
Date: 24 Feb 2022 08:36:57
Message: <621789f9$1@news.povray.org>
On 2/23/22 18:03, Kenneth wrote:
> This is one of those coding situations where the art-like results outweigh the
> need to know what's actually going on 'under the hood'. It's more fun to simply
> play around with various values and colors, then let POV-ray figure it out ;-)

I'm a fan of geometric images and quite like yours. I too just try 
things to see what happens :-).

---
That said, forgive me for using your scene as a lesson in how the 
POV-Ray pattern mechanisms work. Magic is fine until it acts against 
what you want to do.

What you are seeing is the default wave modification code acting on the 
function values - before being using in a default map.

In the attached MediaPlusSplineLessons.jpg image:

The top row uses POV-Ray's default 0-1 pattern value clamping and wave 
modification (ramp_wave et al) strategy. This why you see what you see.

The middle row is the povr branch's new function_interval (-1 to 1) 
pattern value clamping and wave modification (ramp_wave et al) strategy.

The bottom row makes use of povr's raw_wave which just passes the 
density { function{} } value around the pattern and wave modification 
code and into the map code.

All three are using default density_map / color_maps of:

density_map {
     [0 rgb 0]
     [1 rgb 1]
}

In the middle and bottom rows using function_interval and raw_interval 
this default map itself causes some clamping to 0 and 1. This the third 
yellow value where shown. In all cases with yellow text the right most 
value is the density{} 'color' value passed back to media{} where the 
default map is used.

---
Column 1 is your original function {spline{}}.
Column 2 modified the spline to return +-values centered around 0.0.
Column 3 uses a function always returning +0.5.
Column 4 uses a function always returning -1.5.
Column 5 uses a function always returning +1.5.

---

For column two if I use:

         raw_wave
         density_map {
             [-13 rgb <+0.1,+0.1,+1.0>]
             [+13 rgb <+0.1,+1.0,+0.1>]
         }
         }

I get the attached MediaPlusSpineLessonAltMap.png image.

Bill P.


Post a reply to this message


Attachments:
Download 'mediaplusspinelessonaltmap.png' (59 KB) Download 'mediaplussplinelessons.jpg' (87 KB)

Preview of image 'mediaplusspinelessonaltmap.png'
mediaplusspinelessonaltmap.png

Preview of image 'mediaplussplinelessons.jpg'
mediaplussplinelessons.jpg


 

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