1. The problem statement, all variables and given/known data This is for a lab, which I'm working on at home. There are two parts: using Mathematica to simulate a magnetic pendulum with 3 magnets by plotting the path of the bob and then extend my code to determine where the bob endpoint for all starting positions and draw the fractal basin boundaries. 2. Relevant equations x''[t] == -R x'[t] + (( X - x[t])/(Sqrt[(X - x[t])^2 + (Y - y[t])^2 + d^2])^3 + ( X - x[t])/(Sqrt[(X - x[t])^2 + (Y - y[t])^2 + d^2])^3 + ( X - x[t])/(Sqrt[(X - x[t])^2 + (Y - y[t])^2 + d^2])^3) - c x[t] and likewise for y''[t] (copy-pasted from Mathematica) where R is the damping constant of the air, and c is the "spring" constant of the pendulum, since we approximate this using Hooke's Law. X, Y are the x and y positions of the magnets. 3. The attempt at a solution The first part, simulating the pendulum's path was very easy. The equation(s) above was basically given to me; I just had to fine-tune the constants R and c. My problem is now getting the fractal basin boundary. I'm trying to get a Do loop to output a Table of data points that includes the initial and final positions, and from there plot these points in different colours based on where the final position is. I know there must be some way to do this, but I have no idea how. For reference, I've attached my .nb's. pendulum fbb.nb is what I've got so far for the second part, but it doesn't really do anything right now. Any help I could get with this would be awesome!