Press escape to exit fullscreen

{{sketch.instructions}}

CC {{sketch.licenseObject.short}}

Archived Sketch

This sketch is created with an older version of Processing,
and doesn't work on browsers anymore.

View Source Code

Capture Screenshot

2 particle system - introduction to Boid

{{$t('general.by')}}
This is my first step towards a Boid code. I wrote this code to learn PVector, vector manipulation and OOP (Class). This sketch creates a system with two elements (balls) that try to catch up to the mouse pointer. These elements bounce off the walls and have different accelerations. Red ball's acceleration is twice that of the blue ball. Both have a maximum speed limitation. Both balls start at random locations. The user can assign the acceleration and color of the balls while creating the Object. Next step would be to make these elements interact with each other while chasing the target wh
We recovered an unsaved version of this sketch. Please review your changes below.

As a Plus+ Member feature, this source code is hidden by the owner.

  • {{co.title}}
    {{$t('sketch.mode-pjs')}} {{$t('general.learnMore')}}
    Select mode or a template
    {{liveCodeLink}}
    • {{l.url.substr(l.url.lastIndexOf('/') + 1)}}
    {{$t('sketch.layoutDescription')}}

    {{k.category}}
    {{k.label}}
    {{k.description}}

    {{$t('sketch.seeMoreShortcuts')}}

    Versions are only kept for 7 days.
    Join Plus+ to keep versions indefinitely!

    {{$t('general.joinPlus')}}


    {{$t('sketch.versionsSummarized')}}