What does a heart's sine function look like?

In high school, you probably learned that trigonometric functions – like sine, cosine and tangent –can be derived, geometrically, from a circle (hence why trig functions are also known as "circular" functions). But what happens if you use a square to derive these functions, instead? Or a triangle? Or a heart?

The animation featured here (originally posted at mathani.tumblr.com, but based on this post by math visualization guru Lucas) gives us the answer.

Writes Lucas on his captivating math-visualization tumblr, 1ucasvb:

In this animation, we see what the “polygonal sine” looks like for [the square, the hexagon, the triangle and the heart. The polygon is such that the inscribed circle has radius 1.

We’ll keep using the angle from the x-axis as the function’s input, instead of the distance along the shape’s boundary. (These are only the same value in the case of a unit circle!) This is why the square does not trace a straight diagonal line, as you might expect, but a segment of the tangent function. In other words, the speed of the dot around the polygon is not constant anymore, but the angle the dot makes changes at a constant rate.

More details on this subject, and derivations of the functions, visit 1ucasvb.

[mathani + 1ucasvb via fuckyeahmath.tumblr.com]