Sign in to queue

The Discussion

  • User profile image

    Is there a trivial way to make the blobs small if they are separate from the blob, but then combine to form one blob equal to the area of the blobs that have reached "near" target?

  • User profile image

    Hmm, this is a great thing to explore and mess around with. Off the top of my head-

    Since the Blobs are centering around the mouse position, I would calculate the distance of each blob [  Math.sqrt( (mouse.x - blob.x)*(mouse.x - blob.x) + (mouse.y - blob.y)*(mouse.y - blob.y) ) ] and use that scale the fillSize ( which is currently hard coded to 160, with the stroke aways being 20 more ).

    So if any given ball is zero pixels away from the Pointer (it's right at the middle), it is at full scale ( 1.0*160.0 ) but as the distance increases, that scale goes down ( with some lower limit as your minimum acceptable value ).

    That's what I would try first, but I'm sure there are other ways of doing it. Let me know if you try it out and what works for you! 

  • User profile image

    Here's a port of the code to C#/WPF.

  • User profile image
    Nicolas Carlo

    Loving your videos. Using them as a refresher. Just a pointer, width and height are system variables in Processing that are set by values passed to size() function. It is better to avoid naming your variables width and height so you leave the system variables alone.

Add Your 2 Cents