Question: programming language is python, jupyter notebook. I already have functions called; forceMagnitude(mi, mj, sep);;two masses, seperation. gives me force magnitude magnitude(vec); Gives me the magnitued

 programming language is python, jupyter notebook. I already have functions called;

forceMagnitude(mi, mj, sep);;two masses, seperation. gives me force magnitude magnitude(vec); Gives me

programming language is python, jupyter notebook. I already have functions called;

forceMagnitude(mi, mj, sep);;two masses, seperation. gives me force magnitude
magnitude(vec); Gives me the magnitued of a vector
unitDirectionVector(pos_a, pos_b);Gives me a unit vector in the given direction
forceVector(mi, mj, pos_i, pos_j);
 Computes the gravitational force vector exerted on particle i by particle j

calculateForceVectors(masses, positions); Calculates the force vectors with any amount of masses and positions.

Test this function to make sure you understand what it is doing. 13 l (20%) Write a function called calcul ateTrajectories whose purpose is to evolve particle initial positions and initial velocities in time. It should start from initial positions and velocities, 2 take a step forward in time, calculate new positions and velocities, store these new values in arrays, and then repeat that process over and over again. Inside this loop, your function should call the updateParticles function whenever you want to advance the positions and velocities by a time step. ing descrihes one nossible way that your calculateTrajectories function could Test this function to make sure you understand what it is doing. 13 l (20%) Write a function called calcul ateTrajectories whose purpose is to evolve particle initial positions and initial velocities in time. It should start from initial positions and velocities, 2 take a step forward in time, calculate new positions and velocities, store these new values in arrays, and then repeat that process over and over again. Inside this loop, your function should call the updateParticles function whenever you want to advance the positions and velocities by a time step. ing descrihes one nossible way that your calculateTrajectories function could

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!