In our workshop we learnt how to code to simulate different forces, including velocity and gravity. We learnt how to create a simple ‘bouncing ball’ simulation using PVectors of position, velocity, gravity, force, and centre. Vectors are used to simulate the forces by using direction and magnitude, in a sense getting something from A to B. The image below shows how vectors work in 3D, using x, y and z co-ordinates.
Like we did in our workshop, we simulated real forces like gravity and velocity to make them react like they would do in a real life environment. This is perfect for our project of having to make an interactive graphic as it makes it more real for the users who would be in the environment and therefore heighten the interaction. Below is the code we used to simulate a bouncing ball, this is a good example to use as it uses numerous different forces but it is simple to understand. We learnt new language through doing this example, including .get, .set, .sub, .mult and .add.