|
|
Am 29.11.2016 um 23:12 schrieb Mike Horvath:
> 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.
>>
>
> Also, don't I need to divide by 180 first before multiplying by the
> constant?
>
> atan2d(sqrt(x*x+z*z),y)/180*100
Well, that's equivalent to
atan2(...)/pi*100
so it's just a matter of choosing a fitting CONST for your purposes ;)
But yes, the way you're doing it is probably right for your application.
I later noticed that you may need to add another constant though,
depending on the nominal value range.
Post a reply to this message
|
|