42906053623 http://1ucasvb.tumblr.com/post/42906053623/in-a-previous-post-i-showed-how-to-geometrically 981 In a previous post, I showed how to geometrically...

In a previous post, I showed how to geometrically construct a sine-like function for a regular polygon.

I also pointed out how the shape of the function’s graph depends on the orientation of the polygon, since it isn’t perfectly symmetric like the circle.

This animation illustrates how the polygonal sine (dark curve) and polygonal cosines (clear curve) change as the generating polygon rotates.

Derivation

First of all, it is important to point out these functions are not based on the perimeter of the shape, like it is for the unit circle. We’re still sticking to the interior angle here. If we used the perimeter as a substitute for the angle we would just get a deformed linear spline of the sine function, which is rather useless and boring.

In order to find these functions for an arbitrary polygon, we first need to write the polygon in polar form. That is, we want the radius for a given angle. In a circle, this is a constant value.

A general “Polar Polygon” function is:

PPn(x) = sec((2/n)·arcsin(sin((n/2)·x)))

Where n is the number of sides of the polygon. If n is not an integer, the curve is not closed.

Armed with this function, we can quickly find the polygonal sine and polygonal cosine:

Psinn(x) =  PPn(x)·sin(x)Pcosn(x) =  PPn(x)·cos(x)

As n grows, the functions approximate the circular ones, as expected. To rotate the polygon, just add an angle offset to the x in PPn.

This technique is general for any polar curve. Here’s a heart’s sine function, for instance

So, what is it good for?

I’ve used this several times when I wanted some smooth interpolation between a circle and a polygon, in such a way that the endpoints of the interpolation are a perfect circle and a perfect, pointy polygon. It’s useful in parametric surfaces, such as in this old avatar of mine:



Now you can also listen to what these waves sound like

In a previous post, I showed how to geometrically construct a sine-like function for a regular polygon.

I also pointed out how the shape of the function’s graph depends on the orientation of the polygon, since it isn’t perfectly symmetric like the circle.

This animation illustrates how the polygonal sine (dark curve) and polygonal cosines (clear curve) change as the generating polygon rotates.

Derivation

First of all, it is important to point out these functions are not based on the perimeter of the shape, like it is for the unit circle. We’re still sticking to the interior angle here. If we used the perimeter as a substitute for the angle we would just get a deformed linear spline of the sine function, which is rather useless and boring.

In order to find these functions for an arbitrary polygon, we first need to write the polygon in polar form. That is, we want the radius for a given angle. In a circle, this is a constant value.

A general “Polar Polygon” function is:

PPn(x) = sec((2/n)·arcsin(sin((n/2)·x)))

Where n is the number of sides of the polygon. If n is not an integer, the curve is not closed.

Armed with this function, we can quickly find the polygonal sine and polygonal cosine:

Psinn(x) = PPn(x)·sin(x)
Pcosn(x) = PPn(x)·cos(x)

As n grows, the functions approximate the circular ones, as expected. To rotate the polygon, just add an angle offset to the x in PPn.

This technique is general for any polar curve. Here’s a heart’s sine function, for instance

So, what is it good for?

I’ve used this several times when I wanted some smooth interpolation between a circle and a polygon, in such a way that the endpoints of the interpolation are a perfect circle and a perfect, pointy polygon. It’s useful in parametric surfaces, such as in this old avatar of mine:

Now you can also listen to what these waves sound like

 
  1. schtupyou reblogged this from 1ucasvb and added:
    what
  2. clevelander8 reblogged this from freemasonryesoterica
  3. tincalcetin reblogged this from 1ucasvb
  4. dowkons reblogged this from 1ucasvb
  5. morkaischosen reblogged this from tokoeka
  6. thegentlemananachronism reblogged this from tokoeka
  7. tokoeka reblogged this from 1ucasvb
  8. clonesbian-way-of-life reblogged this from 1ucasvb
  9. chaoticgoodperegrintook reblogged this from spookymadscientist
  10. iodine2 reblogged this from spookymadscientist
  11. spookymadscientist reblogged this from madscientistworld
  12. nobodywantstobeinschoolforever reblogged this from 1ucasvb
  13. thestruggleforexistence reblogged this from engrprof
  14. cru2o reblogged this from madscientistworld
  15. madscientistworld reblogged this from engrprof
  16. biomechanicaltomato reblogged this from engrprof
  17. engrprof reblogged this from 1ucasvb
  18. hoekvision reblogged this from the-science-of-time
  19. northernodds reblogged this from this-is-somestuff
  20. pillowofconcrete reblogged this from the-science-of-time
  21. science-funducation reblogged this from the-science-of-time
  22. the-science-of-time reblogged this from this-is-somestuff
  23. this-is-somestuff reblogged this from drueisms
  24. cui-bono274 reblogged this from spookymisterpilgrim
  25. spookymisterpilgrim reblogged this from my-carbon-footprint-is-over9000
  26. my-carbon-footprint-is-over9000 reblogged this from drueisms
  27. aquietcorneroftheuniverse reblogged this from drueisms