POV-Ray : Newsgroups : povray.general : heightfield height Server Time
29 Nov 2024 03:37:25 EST (-0500)
  heightfield height (Message 1 to 3 of 3)  
From: trulayne
Subject: heightfield height
Date: 19 Apr 2006 16:30:27
Message: <44469de3$1@news.povray.org>
I am in the process of building a landscape.  I am using a USGS Dem image 
for my heightfield. I there an easier way to determine the "y" value knowing 
the "x" and "z" other than trial and error? Some objects are fencelines 
built from spline curves. With the number of points needed for these curves, 
the job becomes time intensive doing it by trial and error.
Thanks in advance, Dennis


Post a reply to this message

From: Chris B
Subject: Re: heightfield height
Date: 19 Apr 2006 17:31:07
Message: <4446ac1b$1@news.povray.org>
"trulayne" <tru### [at] newrrcom> wrote in message 
news:44469de3$1@news.povray.org...
>I am in the process of building a landscape.  I am using a USGS Dem image 
>for my heightfield. I there an easier way to determine the "y" value 
>knowing the "x" and "z" other than trial and error? Some objects are 
>fencelines built from spline curves. With the number of points needed for 
>these curves, the job becomes time intensive doing it by trial and error.
> Thanks in advance, Dennis

Hi Dennis,

You can use the 'trace' vector function to find a point on a surface. In 
this case you would use it to shoot a ray straight downwards to intercept 
the surface and return the coordinates of the point on the surface.

Alternatively I think you should be able to use the 'eval_pigment' 
predefined function on the image to pick up the color and work out the 
elevation from that.

Regards,
Chris B.


Post a reply to this message

From: trulayne
Subject: Re: heightfield height
Date: 19 Apr 2006 22:44:40
Message: <4446f598$1@news.povray.org>
Chris B, thank you very much. It is just what I needed. I can now generate 
my spline curve in seconds into a text file and ready for use instead of 
hours of boring trial and error.  :o)
Dennis

"Chris B" <c_b### [at] btconnectcomnospam> wrote in message 
news:4446ac1b$1@news.povray.org...
>
> "trulayne" <tru### [at] newrrcom> wrote in message 
> news:44469de3$1@news.povray.org...
>>I am in the process of building a landscape.  I am using a USGS Dem image 
>>for my heightfield. I there an easier way to determine the "y" value 
>>knowing the "x" and "z" other than trial and error? Some objects are 
>>fencelines built from spline curves. With the number of points needed for 
>>these curves, the job becomes time intensive doing it by trial and error.
>> Thanks in advance, Dennis
>
> Hi Dennis,
>
> You can use the 'trace' vector function to find a point on a surface. In 
> this case you would use it to shoot a ray straight downwards to intercept 
> the surface and return the coordinates of the point on the surface.
>
> Alternatively I think you should be able to use the 'eval_pigment' 
> predefined function on the image to pick up the color and work out the 
> elevation from that.
>
> Regards,
> Chris B.
>


Post a reply to this message

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