Hi folks,
I did a random thing in Elm, where by random thing I mean visual exploration of a bunch of primes when you show them on a spiral.
I picked an involute spiral because it sounded cool (it’s a spiral that has a constant distance between the curves). And I kept the distance between the dots on the spiral constant as well.
The code is not exactly pretty, but it’s short and heavy on math and toFloat
so what can you do. It’s fun to explore this stuff visually though, especially if you keep the number of displayed primes low, so the influence of mouse movement on the pattern is clear. You can find some fairly regular looking patterns, like this:
Actually David, a proper sieve takes a little more than 4 lines.
Anyway, it wasn’t about getting the primes so I didn’t add that. It’s certainly possible to write that, and that would perhaps make it a good code example too, but this was just a little thing I hacked together on a late night :P
In a similar vein, I was just inspired right now by this gif on 9gag: http://9gag.com/gag/aQnRY5W and I was wondering if I could reproduce it. Turns out it was quite easy and took me about 10 minutes. It basically worked on the first try. Now I know how to spirograph!
http://share-elm.com/sprout/55bd03f3e4b06aacf0e8b956
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.