Physics

1

We learnt about forces in programming this time by using vectors instead of x and y coordinate. For this assignment, I played with particles and attractors based on what we got in the class. Here is what I got with 6 attractors and 1,000 particles.

test-page-001

screen-shot-2017-02-06-at-9-25-04-pm

screen-shot-2017-02-06-at-9-21-54-pm

source code

I also like the image below, what I came up with randomly

test2-page-001-1

Source code

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s