cylindrical2cartesian s

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

Inlets

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

frac32buffer radius

frac32buffer z position (height)

Outlets

frac32buffer x coordinate output

frac32buffer y coordinate output

frac32buffer z coordinate output

Audio 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