News for hackers. Stuff that matters.
Re:Drawing Spirograph curves in Python by erikschoster on Friday August 31, 2018 @09:37AM (#17885449)
These are really fun shapes to play with -- here's another little python script to draw animated hypotrochoid frames that can be stitched together with ffmpeg: https://github.com/hecanjog/hypotrochoid.py/blob/master/hypo...

I stole the relevant bit from here: https://stackoverflow.com/questions/22894942/plotting-hypotr...

Here's one video example: https://vimeo.com/99493389

Re:Drawing Spirograph curves in Python by sytelus on Friday August 31, 2018 @09:15AM (#17885276)
When moving circle is inside, its called Hypotrochoid https://en.wikipedia.org/wiki/Hypotrochoid

When moving circle is outside, its called Epitrochoid https://en.wikipedia.org/wiki/Epitrochoid

The difference between two is sign for radius for moving circle.

Overall this is just ploting parametric equations in 2D in Python using complex number trick.

Re:Drawing Spirograph curves in Python by vram22 on Friday August 31, 2018 @11:49AM (#17886525)
>When moving circle is outside, its called Epitrochoid >https://en.wikipedia.org/wiki/Epitrochoid

The combustion chamber of the Wankel engine is an epitrochoid. (From the above Wikipedia link.)

I had read up about Wankel (and also the more conventional internal combustion) engines as a kid. Thought the Wankel engine idea was cool. It has both pros and cons.

https://en.wikipedia.org/wiki/Wankel_engine

Re:Drawing Spirograph curves in Python by ValleyOfTheMtns on Friday August 31, 2018 @11:33AM (#17886366)
Still seems like a kind of magic to non-magic folk like me i.e. a muggle.
Re:Drawing Spirograph curves in Python by netcraft on Friday August 31, 2018 @09:04AM (#17885189)
Its mentioned at the bottom of the article, but thought its worth calling out here too: https://nathanfriend.io/inspirograph/
Re:Drawing Spirograph curves in Python by cheesysam on Friday August 31, 2018 @09:17AM (#17885296)
It's not a spirograph curve unless the cog teeth have slipped and your pen has scrawled across the page taking up a bit of paper with it and you have to start again.
Re:Drawing Spirograph curves in Python by eggy on Friday August 31, 2018 @12:15PM (#17886739)
Agreed. As much as I like coding and generative art too, there's nothing like the effort of keeping the smaller gear inside the larger one and going fast. Much harder on the outside! I just picked up a $8 Spirograph in tin case for my three year old.
Re:Drawing Spirograph curves in Python by moolcool on Friday August 31, 2018 @08:43AM (#17885050)
Did you know there's a direct correlation between the decline of Spirograph and the rise in gang activity? Think about it!
Re:Drawing Spirograph curves in Python by hour_glass on Friday August 31, 2018 @09:01AM (#17885166)
I'm going to mail one to the oval office. I think spirographs could save us from nuclear war.
Re:Drawing Spirograph curves in Python by abecedarius on Friday August 31, 2018 @12:08PM (#17886678)
There's been progress since the 80s when I typed in Basic code for this from a magazine -- it was quite a bit harder to follow.