Understanding Differences: Math Vectors vs. Arrow Objects in VPython - Prof. Jack S. Turne, Quizzes of Physics

A reflection on the differences between mathematical vectors and vpython arrow objects, explaining their attributes and how to define, calculate, and display them in vpython. It includes multiple-choice questions, explanations, and code examples.

Typology: Quizzes

2011/2012

Uploaded on 04/06/2012

jannemaami
jannemaami 🇺🇸

3

(1)

4 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
lane (jbl769) Reflection 1 turner (56910) 1
This print-out should have 11 questions.
Multiple-choice questions may continue on
the next column or page find all choices
before answering.
001 (part 1 of 9) 10.0 points
What is the difference between a mathe-
matical vector and a VPython Arrow object?
1. A mathematical vector can have its tail
located at any point. An arrow object must
choose a particular point for the tail in order
to display the vector. correct
2. A mathematical vector always has its tail
at the origin. An arrow object can have its
tail anywhere.
3. The arrow object, when displayed, has a
different length but the same direction as the
mathematical vector.
4. The arrow object, when displayed, has a
different length and a different direction than
the mathematical vector.
5. The arrow object, when displayed, has a
different direction but the same length as the
mathematical vector.
Explanation:
002 (part 2 of 9) 10.0 points
For a VPython Arrow object, what is the
difference between the attributes ’pos’ and
’axis’ ?
1. pos is the unit vector with the same di-
rection as the mathematical vector to be dis-
played; axis is the same as the mathematical
vector to be displayed.
2. pos tells VPython where to locate the
tip of the vector; axis is the same as the
mathematical vector to be displayed.
3. pos is the same as the mathematical vec-
tor to be displayed; axis tells VPython where
to locate the tail of the vector.
4. pos is the same as the mathematical vec-
tor to be displayed; axis is the unit vector
with the same direction as the mathematical
vector to be displayed.
5. pos tells VPython where to locate the tail
of the vector; axis is the same as the mathe-
matical vector to be displayed. correct
6. pos is the same as the mathematical vec-
tor to be displayed; axis tells VPython where
to locate the tip of the vector.
Explanation:
003 (part 3 of 9) 10.0 points
Let’s say we want to turn the above diagram
into a VPython scene. You should type in the
correct lines of code for each question as you
go so that you end up with a working program.
Remember to begin every VPython program
with the following two lines:
from future import division
from visual import
First, we will need to define our vectors
A and B. Which two lines of Vpython code
accomplish this?
1.
A= vector(3,0,0)
B= vector(5,2,0)
correct
pf3
pf4

Partial preview of the text

Download Understanding Differences: Math Vectors vs. Arrow Objects in VPython - Prof. Jack S. Turne and more Quizzes Physics in PDF only on Docsity!

This print-out should have 11 questions. Multiple-choice questions may continue on the next column or page – find all choices before answering.

001 (part 1 of 9) 10.0 points What is the difference between a mathe- matical vector and a VPython Arrow object?

  1. A mathematical vector can have its tail located at any point. An arrow object must choose a particular point for the tail in order to display the vector. correct
  2. A mathematical vector always has its tail at the origin. An arrow object can have its tail anywhere.
  3. The arrow object, when displayed, has a different length but the same direction as the mathematical vector.
  4. The arrow object, when displayed, has a different length and a different direction than the mathematical vector.
  5. The arrow object, when displayed, has a different direction but the same length as the mathematical vector.

Explanation:

002 (part 2 of 9) 10.0 points For a VPython Arrow object, what is the difference between the attributes ’pos’ and ’axis’?

  1. pos is the unit vector with the same di- rection as the mathematical vector to be dis- played; axis is the same as the mathematical vector to be displayed.
  2. pos tells VPython where to locate the tip of the vector; axis is the same as the mathematical vector to be displayed.
  3. pos is the same as the mathematical vec- tor to be displayed; axis tells VPython where to locate the tail of the vector.
  4. pos is the same as the mathematical vec- tor to be displayed; axis is the unit vector with the same direction as the mathematical vector to be displayed.
  5. pos tells VPython where to locate the tail of the vector; axis is the same as the mathe- matical vector to be displayed. correct
  6. pos is the same as the mathematical vec- tor to be displayed; axis tells VPython where to locate the tip of the vector. Explanation:

003 (part 3 of 9) 10.0 points

Let’s say we want to turn the above diagram into a VPython scene. You should type in the correct lines of code for each question as you go so that you end up with a working program. Remember to begin every VPython program with the following two lines:

from future import division from visual import ∗

First, we will need to define our vectors A and B. Which two lines of Vpython code accomplish this?

A= vector(3, 0 , 0) B= vector(5, 2 , 0)

correct

A=< 3 , 0 , 0 >

B=< 5 , 2 , 0 >

A= vec(3, 0 , 0) B= vec(5, 2 , 0)

A.vector= (3, 0 , 0) B.vector= (5, 2 , 0)

A.vector=< 3 , 0 , 0 > B.vector=< 5 , 2 , 0 >

A.vector= vector(3, 0 , 0) B.vector= vector(5, 2 , 0)

Explanation:

004 (part 4 of 9) 10.0 points Which line of code correctly calculates the vector C?

  1. C = B - A correct
  2. C = A - B
  3. C = vector(A) - vector(B)
  4. C = < A > − < B >
  5. C = vector(A) + vector(B)

6. C = < B > − < A >

Explanation:

005 (part 5 of 9) 10.0 points Verify that C comes out as expected. Which of the following lines of code will output C to the shell?

  1. print < C >
  2. println(C)
  3. cout << C
  4. print C correct
  5. print C.vector

Explanation:

006 (part 6 of 9) 10.0 points Now that our vector objects are defined, let us display them. Which of the following lines of code correctly displays vector A in the VPython scene, as shown in the figure above?

  1. AArr = arrow(pos=vector(0,0,0), axis=A, color=color.red) correct
  2. AArr = A
  3. AArr = arrow(pos=A, axis=vector(A), color=color.red)
  4. AArr = arrow(pos=A, axis=A, color=color.red)
  5. AArr = arrow(< 0 , 0 , 0 >, axis=vector(A), color=color.red)
  6. AArr = arrow(vector(0,0,0), axis=A, color=color.red)

Explanation:

007 (part 7 of 9) 10.0 points Which of the following lines of code correctly

7. B, F

8. A, B, D, H

9. B, C, F, G

10. A, E, H

Explanation:

011 (part 2 of 2) 10.0 points Inside the repetitive loop, assuming that we use the final velocity in each time interval as the approximation to the average velocity in that time interval, what should be the correct sequence of the following calculations? (A) Update the (vector) momentum of each object. (B) Calculate the (vector) forces acting on the objects. (C) Update the (vector) position of each ob- ject.

  1. A, C, B
  2. B, A, C correct
  3. C, B, A
  4. B, C, A
  5. A, B, C
  6. C, A, B

Explanation: