Tuesday, October 4, 2016

brain and propeller fractals using Desmos

I have been playing around with Desmos - it's very nice. The support for parametric formulas means we can play around curves defined by equations like these:


The plus/minus sign in the expression for y means that you are going to have to make a choice in your formula for whether you want to have a plus or a minus sign for a particular term. We might choose to leave out all negatives and only pluses. This gives us "the brain fractal," Desmos version is shared here:


If we choose to alternate plus and minus signs, we end up with something that looks like a propeller, Desmos version shared here:



Modifying the formula slightly you can explore other members of the curve family, like this one:

or this one:

Update
After I posted these, the folks at +Desmos posted an enhanced animated version of the plot, here. In their version, the curve is traced by a moving point that follows the path of the curve.

This was achieved in three steps, using techniques you might want to try out on other graphs.

1. A slider whose end points matched the range of the input variable t was added. This was given the fun name d_raw, but it could have been called anything.


2. A restriction is placed on the original graph, to make the input variable less than the new slider value (the restriction is added in the curly/set brackets in the function definition).


With these two additions, the curve appears as the slider moves - but to get an more dynamic animation, we can add a point that seems to be drawing the curve as the slider moves.

3. A moving point on the curve is added by  copying the function definition and replacing the t variable with the slider name (and removing the restriction). When this is done, Desmos interprets the contents of the round brackets as a point, rather than a parametric curve.



I applied the same enhancements to the "brain curve" here.




No comments:

Post a Comment