'Exploding' or 'dissolving' an ellipse?

I am new to p5.js (and to Javascript to be honest) and I was wondering if I can (with the help of other libraries if need be) have an ellipse object either explode, go up in smoke, implode, or visually disappear-in-place in some other interesting/funny way. How would people go about it? Doable at all?

1 Like

Very do-able. But for most of those effects you’re going to need a particle system of some kind. That is, some code that can keep track of the tiny bits of the effect.

Do you know how classes work? It’s MUCH easier to write these kind of effects if you do.

1 Like

possible starting points

1 Like

I’d like the idea of arcs (see arc() command) that fly apart.

But again, best when you use a class ArcMy or whatever

Hello,

Check out:

The Simulate section may have some examples of interest.

It certainly got me interested!

:)

This (10 years old!) Processing sketch by @amnon (a former “regular”, active on the first P5 forums) could be a good starter:

The library used here (toxiclibs) has been ported to Javascript so you can import it in your p5.js sketch.

The full original code is available on this blog post.

1 Like