cylindrical2cartesian k

Converts a set of cylindrical coordinates into cartesian.
Author: Sputnki
License: BSD
Github: sptnk/math/cylindrical2cartesian k.axo

Inlets

frac32 angle (0 = 0degrees; 64 = 360 degrees)

frac32 radius

frac32 z position (height)

Outlets

frac32 x coordinate output

frac32 y coordinate output

frac32 z coordinate output

Control Rate
int32_t rx;
int32_t ry;

SINE2TINTERP((inlet_phase << 5) + (1 << 30), rx);
SINE2TINTERP(inlet_phase << 5, ry);

outlet_x = ___SMMUL(rx >> 1, inlet_radius << 2);
outlet_y = ___SMMUL(ry >> 1, inlet_radius << 2);
outlet_z = inlet_z;

Privacy

© 2024 Zrna Research