POV-Ray : Newsgroups : povray.binaries.images : INVITATION: Join the Mississippi Paddle-Wheel Steamer! : Re: INVITATION: Join the Mississippi Paddle-Wheel Steamer! Server Time
2 Jun 2024 02:43:13 EDT (-0400)
  Re: INVITATION: Join the Mississippi Paddle-Wheel Steamer!  
From: Bald Eagle
Date: 7 Apr 2018 20:35:01
Message: <web.5ac962e92c27e3405cafe28e0@news.povray.org>
trace(OBJECT_IDENTIFIER, A, B, [VECTOR_IDENTIFIER]). trace helps you finding the
exact location of a ray intersecting with an object's surface. It traces a ray
beginning at the point A in the direction specified by the vector B. If the ray
hits the specified object, this function returns the coordinate where the ray
intersected the object. If not, it returns <0,0,0>. If a fourth parameter in the
form of a vector identifier is provided, the normal of the object at the
intersection point (not including any normal perturbations due to textures) is
stored into that vector. If no intersection was found, the normal vector is
reset to <0,0,0>.

Add vector identifier to your trace () and you'll get the normal vector back.
Then you can calculate the angle between that and any axis, or the point that
you're tracing from.


Post a reply to this message

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