Tuesday, July 5, 2016

Using Trigonometry to Express the Equations of Piecewise Spirals

Circle Spirals (spirals made of semicircles):

Equations: sin(π sqrt((x + k sgn(y)/2)² + y²)) = 0
k = 1, 2, 3, ..., 8

Equations: cos(π sqrt((x + k sgn(y)/2)² + y²)) = 0
k = 1, 2, 3, ..., 8


Square Spirals (spirals made of half-squares):

Equations: sin(π(abs(x + k sgn(y)/2) + abs(y))) = 0
k = 1, 2, 3, 4

Equations: cos(π(abs(x + k sgn(y)/2) + abs(y))) = 0
k = 1, 2, 3, 4


Regular Polygon Spirals (spirals made of regular semi-polygons):

Equations: sin(π p(x + k sgn(y)/2, y)) = 0
k = 1, 2, 3, ..., 8
p(x,y) = sqrt(x² + y²) sec(π/n) cos(mod(arctan(y/x),2π/n) - π/n)
n = 6


Equations:cos(π p(x + k sgn(y)/2, y)) = 0
k = 1, 2, 3, ..., 8
p(x,y) = sqrt(x² + y²) sec(π/n) cos(mod(arctan(y/x),2π/n) - π/n)
n = 6


( Mathematical softwares used: Graph, gnuplot )