POV-Ray : Newsgroups : povray.general : Improving POV-Ray. : Re: Improving POV-Ray. Server Time
12 Aug 2024 19:30:36 EDT (-0400)
  Re: Improving POV-Ray.  
From: Margus Ramst
Date: 19 Feb 1999 16:43:40
Message: <36cddb0c.0@news.povray.org>
Robert J Becraft wrote in message <36C### [at] aolcom>...
>
>I would like to see something that allowed me to define a heightfield as a
>CSG, then using that as a target, create a function that given an X,Z
>coordinate in the heightfield would return the Y value for that point.
>This out of all the modifications that could be made to POV would be the
>greatest improvement in my mind.
>
>Imagine,all those people who have contributed grass renders... you take
your
>grass stalks and place them approriately on a gently rolling heightfield.
>Every one of them is placed at the right height irregardless of the point
on
>the heightfield it is generated.
>

Unless you are opposed to using an unofficial compile of POV, I suggest you
get the Superpatch. It has a trace() function that does what you want.
Example:
trace(MyHeightField,StartPoint,Dir,Normal);

This traces a ray from StartPoint in direction Dir and if MyHeightField is
hit, returns the intersection point. It also stores the surface normal of
that point in a pre-declared identifier "Normal", if it's provided.
I have found this function incredibly useful; my "shaggy" images were made
using it.

Margus


Post a reply to this message

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