POV-Ray : Newsgroups : povray.general : Using a function in a height_field declaration : Re: Using a function in a height_field declaration Server Time
30 Apr 2024 11:34:18 EDT (-0400)
  Re: Using a function in a height_field declaration  
From: Kenneth
Date: 14 Feb 2023 07:25:00
Message: <web.63eb79dd43a1dd889b4924336e066e29@news.povray.org>
"yesbird" <nomail@nomail> wrote:
> > Another quick example.
> >
>
> Do not see anything, except "Black Square" by kazimir Malevich:
>

Although you #declared your height_field as HF00, you forgot to actually use it
in the scene. A simple mistake. ;-)

......
#declare HF00 = height_field {
     function 800, 800 { Fn02(x,y,z) }
     smooth
     pigment { color Orange }
     translate <-0.5,0,-0.5>
     scale <2,0.05,2>
}

object{HF00} // or simply  HF00, which also works...sometimes...depending on
// other code that comes before its use. Stick to object{HF00} for now.

----------
By the way: Somewhere in the documentation, it states that when using a function
for a height_field, and creating that function from a pigment/pattern like
granite, the function 'sees' (or uses) only a 2-dimensional 'slice' of the 3-D
pattern-- and in the x/y plane, not the x/z plane as you might imagine.
Otherwise,
           function { pattern { granite scale 0.5 } }

IS fully 3-dimensional.

(I HOPE I have this information correct.)


Post a reply to this message

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