POV-Ray : Newsgroups : povray.binaries.images : Added trace() to Clutter macro : Re: Added trace() to Clutter macro Server Time
18 Aug 2024 02:14:37 EDT (-0400)
  Re: Added trace() to Clutter macro  
From: JRG
Date: 7 Jul 2001 08:33:04
Message: <3b470180$1@news.povray.org>
If you want to know the y coordinate of a point (i.e. its height):

#local _alt=vdot(y,trace( land, temp_pos+10000*y,-y));  // check the
altitude

or, even easier:

#local _alt=(trace( land, temp_pos+10000*y,-y)).y;  // check the altitude

(I didn't check if the last notation works, but it should).

Where land is the landscape object,
temp_pos is the coordinate (of XZ plane) you want to check (you are supposed
to not use landscapes higher than 10000 units...).

For normal calculation things are slightly more complicate (even if it's
just another line of trig formulae).

Jrg.


Post a reply to this message

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