ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
1.0
ESP8266ILI9341DisplayProject
|
Cordic Routines Handle angle outside of the first quadrant Added standalone test to verify CORDIC against math library Add Documentation and references. More...
#include "cordic2c_inc.h"
Go to the source code of this file.
Data Structures | |
struct | point |
Point definition. More... | |
Functions | |
MEMSPACE double | deg2rad (double deg) |
Convert Degrees to Rads. More... | |
double | angle_quad (double quads, int *quad) |
Compute quadrant of angle and the quadrant modulus Note: Integer part is quadrant. More... | |
void | Circular (Cordic_T x, Cordic_T y, Cordic_T z) |
Main Cordic routine - used for basic trig and vector rotations. More... | |
MEMSPACE void | cordic_quad (double angle, double *s, double *c) |
Compute Sin and Cos from angle in quads using Cordic. More... | |
MEMSPACE void | cordic_deg (double deg, double *s, double *c) |
Compute Sin and Cos from angle in degrees using Cordic. More... | |
MEMSPACE void | cordic_rad (double rad, double *s, double *c) |
Compute Sin and Cos from angle in Rads using Cordic. More... | |
MEMSPACE void | scale_point (point *P, double scale) |
Scale x,y,z by scale factor. More... | |
MEMSPACE void | shift_point (point *P, point *shift) |
Shift x,y,z by shift. More... | |
MEMSPACE void | rotate (point *P, point *V) |
Rotate point P by View point. More... | |
MEMSPACE void | PerspectiveProjection (point *P, double scale, int x, int y) |
Cordic Routines Handle angle outside of the first quadrant Added standalone test to verify CORDIC against math library Add Documentation and references.
This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file cordic.h.
double angle_quad | ( | double | quads, |
int * | quad | ||
) |
Compute quadrant of angle and the quadrant modulus Note: Integer part is quadrant.
[in] | quads | 1.0 = 90 degrees |
[out] | quad | quadrant 0 = 0 .. 89.9999, 1 = 90 ... 179.999 ..., etc |
Definition at line 71 of file cordic.c.
Referenced by cordic_quad().
Main Cordic routine - used for basic trig and vector rotations.
[in,out] | x | Cordik_K, out: Cos of z |
[in,out] | y | 0, out: Sin of z |
[in,out] | z | fixed point version of angle |
Definition at line 103 of file cordic.c.
Referenced by cordic_quad(), and main().
MEMSPACE void cordic_deg | ( | double | deg, |
double * | s, | ||
double * | c | ||
) |
Compute Sin and Cos from angle in degrees using Cordic.
[in] | deg | angle in degrees |
[in,out] | *s | sin |
[in,out] | *c | cos |
Definition at line 215 of file cordic.c.
Referenced by PerspectiveProjection(), and rotate().
MEMSPACE void cordic_quad | ( | double | angle, |
double * | s, | ||
double * | c | ||
) |
Compute Sin and Cos from angle in quads using Cordic.
[in] | angle | angle in quads ( 1 quad = 90 degrees) |
[out] | *s | sin |
[out] | *c | cos |
Definition at line 144 of file cordic.c.
Referenced by cordic_deg(), and cordic_rad().
MEMSPACE void cordic_rad | ( | double | rad, |
double * | s, | ||
double * | c | ||
) |
Compute Sin and Cos from angle in Rads using Cordic.
[in] | rad | angle in radians |
[out] | *s | sin |
[out] | *c | cos |
MEMSPACE double deg2rad | ( | double | deg | ) |
Definition at line 310 of file cordic.c.
Referenced by wire_draw().
Rotate point P by View point.
[in] | *P | x,y,z point |
[in] | *V | View point |
Definition at line 265 of file cordic.c.
Referenced by wire_draw().