




[02 Nov 2012] | Trigonometry in Computer Graphics |

During implementation of geometrical methods or development of shaders it's often required to make best possible optimizations to reduce number of calls of costly trigonometrical functions. Following article contains formulas that can be used during optimizations.
Angles
Radian is the unit of angular measure for 2D angles. One radian corresponds to arc of a circle with length that is equal radius of the circle.

Trigonometrical functions
From right triangle:


Reflected angle

Angle and shift of 90 degrees

Other basic relations

Angle sum and difference

Double-angle

Laws of cosines and sines
From arbitrary triangle:



Sun and Black Cat- Igor Dykhta (
