Furthermore, with a modulo function we can break the graph into several discrete parts. In the equation below, the graph will have a "arms" for any integer a > 2.
(The coefficient 6 is only there in front to enlarge the graph.) Here is an example where a = 6:
Combine the modulo function with the secant function to "straighten" out the graph, and we get a disjoint line segments:
Finally, by shifting θ back by π/a units, we make the graph continuous. We use a = 6 once again to get a hexagon.
Here is link to the file if you'd like to experiment with other values of a.
https://www.desmos.com/calculator/fwkuzx2fhn
Incidentally, some non-integer values of a yield coherent shapes too. For example, when a is a fraction with an odd numerator and denominator 2, the graph is a star with as many points as the value of the numerator. E.g., we get the standard 5-pointed star with a = 5/2:
* * *
Finally (and this one was absurdly challenging), I decided to graph a Swiss cross in polar. I should note that at this time I noticed that Desmos would accept τ as equivalent to 2π. How subversive! So from here on, I'm using τ in my equations.
So for the cross's 16 sides, we need 16 line segments... and they have to slope upwards not just individually, but in groups of four. Here's what I'm talking about, graphed on a standard Cartesian plane so it's clearer to understand what's going on:
Here's the secant of the above, back in polar.
The absolute value isn't strictly necessary (you get the same graph without it), but it forces our function to finish drawing in each quadrant before moving on to the next. Or, to say it another way, only with the absolute value will we be able to draw the finished cross without picking up our pencil from the paper.
The obvious problem is that from here we need to expand the north/south/east/west edges, i.e. everything in domain 3τ/16 < θ < τ/16 (mod τ/4), if you'll pardon the odd notation. Meanwhile, we have to contract four interior corners, i.e. domain τ/16 < θ < 3τ/16 (mod τ/4). So we'll multiply by the following
which looks like this:
The product of the two functions is a perfect Swiss cross.
If you're curious, here's what it looks like as function of x and y instead:
One more thing... in the course of making the cross, I accidentally figured out how to make a nice Bolnisi cross. I won't walk through the procedure for that one, but here's the equation and a graph.
Here's the link to this set of graphs: https://www.desmos.com/calculator/hufxpvk43q
One feature I added is a slider for b, a phantom variable that just lets you see the graph draw itself as θ goes from 0 to τ (like on a graphing calculator).
No comments:
Post a Comment