Trigonometric Functions in Pseudo Code
I'm searching for Trigonometric Functions in Pseudo Code. I'm Not good at mathematics, so I can't do much with the formulas in the Wikipedia. Mainly I'm searching for Sine, Cosine, Tangent and the inverse functions (sin⁻¹, cos⁻¹, tan⁻¹) of them. There are also other Trigonometric Functions. But for me the above are the most important. If it is possible, I would be happy if in the pseudo code only variables, for, if, and operators (+, -, *, /, %, sqrt()) are used, because I do not have a library with advanced mathematics functions.
Trigonometry functions are Transcendental. You cannot find an exact expression of them in term of polynomial algebra. You can approximate them though. The usual approach is to use periodicity and symmetry to reduce an angle α into and equivalent angle α′ such that sin(α) = sin(α′) but α′ ≪ α. Simply put you reduce any angle into and angle in the first quadrant or similar, this is easier than it looks. Once you have a small angle, you can use Taylor Series Expansion to compute the function up to a fixed error magnitude. Here is a tutorial page. Another approach is to use a lookup table. This is especially useful when you can keep track of the required precision of the process and is very fast. However it takes more memory and may give rise to a step-looking function. Here an introductory page. Another approach is to use CORDIC Algorithm, this is specially suited for hardware that lacks multiplication support (like some MIPS and ARM chips). From Wikipedia: CORDIC is generally faster than other approaches when a hardware multiplier is not available (e.g., a microcontroller) [...] On the other hand, when a hardware multiplier is available (e.g., in a DSP microprocessor), table-lookup methods and power series are generally faster than CORDIC.
How can I calculate the angle
Finding Shortest Distance Between Two Parallel Lines, With Arbitrary Point [closed]
how to convert depth in Z-cordinate
How can I simplify this expression with trigonometric in Maple?
Require trigonometry assistance with ship/wave movement
Trigonometry - Find where two curves intersect
How to calculate point 'along' unit circle radian [closed]
Issues with bullet entry points for “shoulder mounted” guns
Using the coordinates of two of a triangle's vertices to calculate the coordinates of the third
How to do the trig function Arc Cos (ACOS() in Excel) in MS-Access?
How to get the direction (angle) of rectangle after rotating it from a pivot point
How to calculate points of Chord
Is trigonometry computationally expensive?
draw lines protruding from a circle [closed]
Flipping an angle using radians
Trigonometrical ratios for angles higher than 360