POV-Ray : Newsgroups : povray.general : Using a function in a height_field declaration Server Time
15 Jun 2024 08:21:10 EDT (-0400)
  Using a function in a height_field declaration (Message 41 to 50 of 58)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 8 Messages >>>
From: yesbird
Subject: Re: Using a function in a height_field declaration
Date: 15 Feb 2023 13:45:00
Message: <web.63ed280a43a1dd8868fd655b10800fb2@news.povray.org>
> This 'y-movement' that you are seeing-- actually not real movement at all-- is
> the typical 'look' and behavior of a height_field when a particular kind of
> function is used for it...or even a particular kind of image_map function.

After your explanations and a few suggested experiments this strange fenomena
become to me clear, but  believe, you will agree, that from the user's  point of
view the behaviour of this function is unexpected and leads to some confusion.
I do not mean, that implementation is poor, but only that result are
non-intuitive.

Thanks a lot for consultation, at least now I know how to avoid these pitfalls.
The world is not what it seams ...
--
YB


Post a reply to this message

From: Kenneth
Subject: Re: Using a function in a height_field declaration
Date: 15 Feb 2023 15:45:00
Message: <web.63ed429343a1dd889b4924336e066e29@news.povray.org>
"yesbird" <nomail@nomail> wrote:
>
> After your explanations and a few suggested experiments this strange fenomena
> become to me clear, but believe, you will agree, that from the user's
> point of view the behaviour of this function is unexpected and leads to
> some confusion. I do not mean, that implementation is poor, but only that
> result are non-intuitive.
>
> ...at least now I know how to avoid these pitfalls.
> The world is not what it seams ...

Sad but true!

BTW:
A height_field can actually be 'solidified' to look like a regular object, by
making an intersection{...} of it with another slightly smaller object. This
might help to better-visualize its behavior. (The empty space 'under' a
floating HF can be considered part of it-- down to -y infinity.) Try this:

intersection{
box{0.01, 0.99  pigment{green 0.8}}
// OR...
// sphere{0,0.5 translate <0.50,.25,0.5> pigment{green 0.8}}
height_field{
function 500,500 {...your function...}
smooth
pigment{red 0.8}
scale <1,0.5,1>
}
scale 1.0 // final scale of everything
}


Post a reply to this message


Attachments:
Download 'function_hf_with_intersection.jpg' (94 KB)

Preview of image 'function_hf_with_intersection.jpg'
function_hf_with_intersection.jpg


 

From: yesbird
Subject: Re: Using a function in a height_field declaration
Date: 15 Feb 2023 18:00:00
Message: <web.63ed62a543a1dd8868fd655b10800fb2@news.povray.org>
Interesting !

In combination with colormaps very attractive effect achieved. I will put it in
macro, with parameters.

---------------------------------------------------------
#include "playground.inc"
#include "colormaps.inc"

// Axis
axis (1.2,0.8,1.2,0.01)

// Cameras
// camo (5,5,5,0,0,0,45)
camp (2,2,2,0,-0.25,0,45)

//
// Prepare colormaps of desired transparency
//
#declare _f = 0;
#declare _t = 0;
#declare jet    = make_colormap (jet_arr,    _f, _t);
#declare spring = make_colormap (spring_arr, _f, _t);
#declare hot    = make_colormap (hot_arr,    _f, _t);
#declare winter = make_colormap (winter_arr, _f, _t);
#declare hsv    = make_colormap (hsv_arr,    _f, _t);
#declare autumn = make_colormap (autumn_arr, _f, _t);
#declare parula = make_colormap (parula_arr, _f, _t);
#declare summer = make_colormap (summer_arr, _f, _t);
#declare turbo  = make_colormap (turbo_arr,  _f, _t);
#declare cool   = make_colormap (cool_arr,   _f, _t);

//
// Object
//
intersection{
  box{0.01, 0.99

  pigment {  gradient y
               color_map {hsv}
               translate -y*0.1
               scale 0.6 }
  }

  height_field{
    function 500,500 { pattern { bozo scale 0.08 } }

    smooth
    pigment {  gradient y
               color_map {hsv}
               translate -y*0.81
               scale 0.8 }

    scale <1,0.4,1>
    }
  scale 1.0
}
---------------------------------------------------------
YB


Post a reply to this message


Attachments:
Download 'height_field_int_cmap.png' (211 KB)

Preview of image 'height_field_int_cmap.png'
height_field_int_cmap.png


 

From: yesbird
Subject: Re: Using a function in a height_field declaration
Date: 15 Feb 2023 19:10:00
Message: <web.63ed73a243a1dd8868fd655b10800fb2@news.povray.org>
> // OR...
> // sphere{0,0.5 translate <0.50,.25,0.5> pigment{green 0.8}}

This is even more interesting !


Post a reply to this message


Attachments:
Download 'height_field_int_cmap.png' (158 KB)

Preview of image 'height_field_int_cmap.png'
height_field_int_cmap.png


 

From: yesbird
Subject: Re: Using a function in a height_field declaration
Date: 15 Feb 2023 20:40:00
Message: <web.63ed885c43a1dd8868fd655b10800fb2@news.povray.org>
It seams to me this is a theme for animation.


Post a reply to this message


Attachments:
Download 'height_field_int_cmap.png' (136 KB)

Preview of image 'height_field_int_cmap.png'
height_field_int_cmap.png


 

From: yesbird
Subject: Re: Using a function in a height_field declaration
Date: 15 Feb 2023 20:45:00
Message: <web.63ed89f243a1dd8868fd655b10800fb2@news.povray.org>
And finally - pie :)


Post a reply to this message


Attachments:
Download 'height_field_int_cmap.png' (164 KB)

Preview of image 'height_field_int_cmap.png'
height_field_int_cmap.png


 

From: Kenneth
Subject: Re: Using a function in a height_field declaration
Date: 16 Feb 2023 10:40:00
Message: <web.63ee4dc143a1dd889b4924336e066e29@news.povray.org>
"yesbird" <nomail@nomail> wrote:
> And finally - pie :)

Looks delicious! I like the wild colors too.

Speaking of colors:
I want to thank YOU for introducing a new pigment construction to me:
            pigment{red 1.0 green 0.6}

I have never used that(!!). I have used 'transmit' and 'filter' in my scenes for
many years, but I thought that such COLOR keywords were parts of "colors.inc" !

I think that I got something confused in the distant past--

             Red (capital letter; pre-#declared in colors.inc)
             vs.
             red 1.0 (a built-in keyword)

It seems that even an old-timer like me needs to re-read POV-ray's *basic*
documentation, now and then ;-)


Post a reply to this message

From: yesbird
Subject: Re: Using a function in a height_field declaration
Date: 16 Feb 2023 12:00:00
Message: <web.63ee609243a1dd886015e4c910800fb2@news.povray.org>
> I want to thank YOU for introducing a new pigment construction to me:
>             pigment{red 1.0 green 0.6}

Always welcome, I don't remember, where I saw it, but this notation is more
'human-readable', than others, IMHO. Anyway, we are here to exchange knowledge
and ideas. Now I'm working on animation of this 'orange'.

> It seems that even an old-timer like me needs to re-read POV-ray's *basic*
> documentation, now and then ;-)

Yes, we should learn onward :)
--
YB


Post a reply to this message

From: Bald Eagle
Subject: Re: Using a function in a height_field declaration
Date: 16 Feb 2023 13:25:00
Message: <web.63ee742243a1dd881f9dae3025979125@news.povray.org>
"yesbird" <nomail@nomail> wrote:
> > I want to thank YOU for introducing a new pigment construction to me:
> >             pigment{red 1.0 green 0.6}
>
> Always welcome, I don't remember, where I saw it, but this notation is more
> 'human-readable', than others, IMHO. Anyway, we are here to exchange knowledge
> and ideas. Now I'm working on animation of this 'orange'.
>
> > It seems that even an old-timer like me needs to re-read POV-ray's *basic*
> > documentation, now and then ;-)
>
> Yes, we should learn onward :)
> --
> YB

I always use x, y, and z for red, green, and blue.   Especially when coloring
axes.


Post a reply to this message

From: yesbird
Subject: Re: Using a function in a height_field declaration
Date: 17 Feb 2023 11:15:00
Message: <web.63efa6c243a1dd88364f434f10800fb2@news.povray.org>
> Looks delicious! I like the wild colors too.

Thanks to your ideas, I've rendered my first POV animation:

https://www.youtube.com/watch?v=i7kItZ6S6cM

Will be thankful for any critical notes and advises.
--
YB


Post a reply to this message


Attachments:
Download 'fragile.zip' (15 KB)

<<< Previous 10 Messages Goto Latest 10 Messages Next 8 Messages >>>

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