@Cheng I see that you've upgraded your gifs to loop perfectly?

@vanderZwan I recently found out how to use 'mpv' to play a video in loops, so that I can check the animation before uploading. :P

I'll properly solve the loop problem when I have time. I am recently occupied solving a difficult problem with the Dew language itself.

@Cheng I think you can make it a closed form somehow: you need to find the smallest number that is divisible by all periods in your sketch.

So uh, like the opposite of the greatest common divisor... smallest common numerator?

Here, I made a little JavaScript function to demonstrate:
observablehq.com/d/de3b6dc4c5f

@vanderZwan

Thanks for your suggestion and your code! 💖 I actually know how to do it, and was just busy with other things.

> So uh, like the opposite of the greatest common divisor... smallest common numerator?

There's least common multiple (lcm). en.wikipedia.org/wiki/Least_co

For irrational numbers as animation period times, I don't think a solution is guaranteed to exist, e.g. [Pi, 1]. For rational numbers, a solution can be found by factorizing each numerator and denominator of the numbers

@SimonWeiss

It's called Dew, a language designed by myself. :D

You can check out my pinned toot for more information. :)

Sign in to participate in the conversation
vis.social

vis.social is an open social platform for creative people, especially anyone in sciArt, data, visualization, creative coding, and related arts and research. English is the common language of the instance.