Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Students in your class are continuing to model the motion of Triton (one of Nept

ID: 1884695 • Letter: S

Question

Students in your class are continuing to model the motion of Triton (one of Neptune's 13 moons) around Neptune, but now using VPython. The code your class has received contains the following snippet of VPython code from visual import Neptune sphere (pos-vector (100, 200, 300), radius-1, color-color . blue) Triton sphere (pos-vector (10,20,30), radius-2, color-color.white) a) From this snippet, which of the following lines of code might your group write to describe the separation vector pointing from Neptune to Triton in rve c=Neptune.pos-Triton.pos rvec-Triton.pos-Neptune.pos Incorrect. Tries 1/1 Previous Tries b) Several groups have written a different lines of code to calculate the magnitude of the separation vector; some are correct and some are incorrect. From your understanding of the line(s) of code below, which of them correctly represent the magnitude of the separation vector between Neptune and Triton? Select all that are True rmag-mag (Neptune.pos-Triton.pos) rmag-mag (Triton.pos-Neptune.pos) rmag-sqrt ((Neptune.pos.x-Triton.pos.x) 2+ (Neptune.pos.y-Triton.pos.y) * *2+ (Neptune.pos.z-Triton.pos.z)**2) O rmag=mag (Neptune, pos)-mag (Triton.pos) rmag sqrt ((Triton. pos.x-Neptune.pos.x) **2+ (Triton.pos.y-Neptune.pos.y) **2+ (Triton.pos.z-Neptune.pos.z) **2) rmag-mag (Triton.pos) -mag (Neptune.pos) Submit Answer Incorrect. Tries 1/3 Previous Tries

Explanation / Answer

(a). rvec = Triton.pos - Neptune.pos. To find the separation vectors pointing from A to B, we subtract A from B.

(b). Option c,d and e are TRUE. Once you have the seperation vector you can directly calculate the magnitude. rmag = mag( Triton.pos - Neptune.pos). You can also calculate the magnitude by breaking it down in x,y and z components.

(c). Unit vector is vector divided by the magnitude of the vector. In this case option b and d where the direction is correct (Triton.pos - Neptune.pos) will be correct because the magnitude of A-B is equal to B-A. Only the direction is different.

4. While modelling anything it is always better to use variables so that you can vary the vectors and you would not have to change the whole equations everytime you want to test with new values of the vectors.The program looks neat as well.