pymel.util.arrays.cotan

cotan(a, b, c=None)

cotan(u, v) –> float :

Returns the cotangent of the u, v angle, u and v should be 3 dimensional Vectors representing 3D vectors.

>>> u = VectorN(1.0, 0.0, 0.0)
>>> v = VectorN(0.707, 0.0, -0.707)
>>> cotan(u, v)
1.0
>>> cotan(u, [0.707, 0.0, -0.707])   
1.0

Alternatively can use the form cotan(a, b, c), where a, b, c are 4 dimensional Vectors representing 3D points, it is then equivalent to cotan(b-a, c-a).

>>> o = VectorN(0.0, 1.0, 0.0, 1.0)        
>>> p = VectorN(1.0, 1.0, 0.0, 1.0)
>>> q = VectorN(0.707, 1.0, -0.707, 1.0)
>>> cotan(o, p, q)
1.0

Related : see VectorN.cotan method.

Previous topic

pymel.util.arrays.cosh

Next topic

pymel.util.arrays.cross

Core

Core Modules

Other Modules

This Page