@@mubarakalkorbi9463 Thanks very much! What’s actually being computed is wr/dr in the code. The reason for doing this is for efficiency. Since all of the forces need to be projected along unit vectors in the x, y, and z directions… if we divide wr/dr we can save ourselves two operations since we will not need to divide dx/dr, dy/dr, and dz/dr to calculate those unit vectors (i.e., we do it once in wr and just multiply by the dx, dy, and dz we already computed to determine whether dr < rc).
Hi Michael! Thank you for the amazing video! I just wanted to point out that in wr = 1.0/dr - 1.0; it should be wr = 1.0- dr;. Keep up the great work!
@@mubarakalkorbi9463 Thanks very much! What’s actually being computed is wr/dr in the code. The reason for doing this is for efficiency. Since all of the forces need to be projected along unit vectors in the x, y, and z directions… if we divide wr/dr we can save ourselves two operations since we will not need to divide dx/dr, dy/dr, and dz/dr to calculate those unit vectors (i.e., we do it once in wr and just multiply by the dx, dy, and dz we already computed to determine whether dr < rc).