Simon translated Attraction and Repulsion Forces Coding Challenge into Java

DSC_0173

Simon translated part of the Attraction and Repulsion Forces Coding Challenge from JavaScript into Processing (Java). In the first video below he explains the formulas for attraction and repulsion forces:

This is the part that Simon successfully translated into Java:

 

Attraction_Repulsion 12 May 2017

 

Attraction_Repulsion 12 May 2017 2

 

Around minute 30 of the Attraction and Repulsion Forces Coding Challenge video Simon got stuck with his Java code. Although everything seemed right, his particle didn’t trace nice patterns but went off the screen. Simon was very upset about this, it took me a while to console him. This is where Simon got stuck:

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 )

Connecting to %s