A little headsup for people doing blink-scripts.
The implementation of Acos in the Blink Script node have a bug, so if you
go below acos(-0.5) blink will return as drastically incorrect value.
I reported this bug a few weeks ago but have yet to receive a bug id.

I the meantime i have found this algorithm that does a fairly good job for
my needs.

float acosFast(float(x)) {

float a=1.43+0.59*x ;

a=(a+(2+2*x)/a)/2;

float b=1.65-1.41*x ;

b=(b+(2-2*x)/b)/2;

float c=0.88-0.77*x ;

c=(c+(2-a)/c)/2;

return (8*(c+(2-a)/c)-(b+(2-2*x)/b))/6;

}



-Mads Hagbarth Lund

TD, Postyr, Denmark.
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to