POV-Ray : Newsgroups : povray.general : Heightfields from textures? : Re: Heightfields from textures? Server Time
3 Aug 2024 06:16:47 EDT (-0400)
  Re: Heightfields from textures?  
From: "Jérôme M. Berger"
Date: 7 May 2004 13:48:10
Message: <409bcbda@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

	You can do it like this, I think (untested):

#declare SIZE = 2.0;
#if (HF)
~  height_field{function 300,300{P(x*SIZE,0,y*SIZE)}
~    translate <-0.5,0,-0.5>
~    scale <4,0.75,4>*SIZE
~    pigment{G}
~  }
#else
~  isosurface {
~    function { y - P(x,0,1-z)}
~    open
~    max_gradient 7
~    contained_by{box{<0,0,0>,<1,1,1>*SIZE}}
~    translate <-0.5,0,-0.5>
~    scale <4,0.75,4>
~    pigment {G}
~  }
#end

- --
******************************
*      Jerome M. Berger      *
* mailto:jbe### [at] ifrancecom *
*  http://jeberger.free.fr/  *
******************************
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAm8vZqIYJdJhyixIRApdtAKChblNUkCop2iq9Qi5M+NCIu8v7xwCeJvcQ
jIyiFOOsnufFiAnRHkSU2oE=
=Witz
-----END PGP SIGNATURE-----


Post a reply to this message

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