POV-Ray : Newsgroups : povray.newusers : image_map to tilted and rotated triangle centered and scaled : Re: image_map to tilted and rotated triangle centered and scaled Server Time
2 May 2024 08:18:25 EDT (-0400)
  Re: image_map to tilted and rotated triangle centered and scaled  
From: jr
Date: 31 Mar 2022 08:15:00
Message: <web.62459aa1ccfe2900fc0c8de6cde94f1@news.povray.org>
hi,

"Molly-J" <nomail@nomail> wrote:
> ...
> Is there a povray function that returns polar coordinates of a surface's normal?
>
> eg. create a polygon my_polygon at xyz xyz xyz and then ask--
>
> let lat/lon = normal(my_polygon)

afaik, no.  (in fact, searching "polar" in the wiki only finds (fish-eye) camera
related mention)  however, if you have the maths, you can (and usually would, in
POV-Ray) write a macro[1], using 'trace()'[2] to find the surface normal, then
convert and return the (lat,lon).  Bald Eagle wrote some polar coord conversion
code[3], maybe it'll be of use to you.

[1]
<https://wiki.povray.org/content/Reference:User_Defined_Macros#The_macro_Directive>
[2] <https://wiki.povray.org/content/Reference:Vector_Expressions#Functions>
[3] <http://news.povray.org/web.58dc085aae95604bc437ac910%40news.povray.org>


regards, jr.


Post a reply to this message

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