[PD] arccos / inverse cos in pd ?

Mathieu Bouchard matju at sympatico.ca
Wed Dec 10 22:49:42 CET 2003

On Wed, 10 Dec 2003, Jerome Etienne wrote:

> im looking for a way to compute a arccos in pd ? i fail to find an
> object directly computing it, did i miss it ? is there a way to
> compute it in a more indirect way (e.g. with a "limited developpment"
> really free translation of the french "developpement limite") ?

sin(t)^2 + cos(t)^2 = 1
sin(arccos(x)) = sqrt(1-x^2)
tan(arccos(x)) = sin(arccos(x))/cos(arccos(x)) = sqrt(1-x^2)/x
arccos(x) = arctan(tan(arccos(x))) = arctan(sqrt(1-x^2)/x)

and pd has [atan].

Using this trigonometric identity is easier and faster than computing
partial taylor series.

Mathieu Bouchard                       http://artengine.ca/matju

More information about the Pd-list mailing list