POV-Ray : Newsgroups : povray.advanced-users : Spherical isosurface : Re: Spherical isosurface Server Time
2 May 2024 18:24:17 EDT (-0400)
  Re: Spherical isosurface  
From: clipka
Date: 29 Nov 2016 19:01:44
Message: <583e16e8$1@news.povray.org>
Am 29.11.2016 um 23:07 schrieb Mike Horvath:
> On 11/29/2016 5:04 PM, Mike Horvath wrote:
>> On 11/29/2016 3:26 PM, clipka wrote:
>>> Luminance gets a bit more complicated: You have to use an atan-based
>>> formula to get an angle, but you must plug in the y coordinate and the
>>> distance between the y axis; the latter is equal to sqrt(x*x+z*z), so
>>> this gives you:
>>>
>>>     #declare fL = function(x,y,z) { atan2(sqrt(x*x+z*z),y)*CONST }
>>>
>>> Choose CONST values as needed; atan2()*CONST may happen to be replacable
>>> by atan2d() again.
>>>
>>
>> Wikipedia says it should be more like
>>
>>     #declare fL = function(x,y,z) { atan2(sqrt(x*x+y*y+z*z),y)*CONST }
>>
>> Do you agree?
>>
>> Mike
> 
> Wait! I scanned your response too quickly. Wikipedia gives this:
> 
>     acos(y/r)
> 
> which is totally different from what you suggest. Are they equivalent?

I think so. Wikipedia is right, and I'm confident my formula is also
correct. I haven't verified the equivalence algebraically though.


Post a reply to this message

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