Robotic Mechanics and Modeling/Kinematics/Additional Examples for Vectors

Example 1 (Spring 20 - Team 4)
Example: A particle has position vector $$\langle3,4,5\rangle\, \mathsf{m} $$. What is its distance from the origin$$\,\bigl(0,0,0\bigr)$$?

If that distance is instead changed to $$12\,\mathsf{m}$$, what is its new position vector? The initial distance of the particle is outputted as $$7.07\,\mathsf{m}$$. The new vector is $$\langle5.09, 6.79, 8.49\rangle$$, and the last line of code checks the new magnitude, which shows that the magnitude (or distance from the origin) is $$12\,\mathsf{m}$$ as intended.

An Example of Representing the Cross Product of Two Vectors
An example of how to find the cross product of a vector $$\mathbf{AO}$$ and vector $$\mathbf{BO}$$ in IPython.


 * 1) Example: A triangle has 3 points. Point O at the origin (0,0), point A (3,3) and point B (5,0). Using vectors AO and BO, calculate the area of the triangle. The area of a triangle can be calculated using the following equation: 1/2 * $$\mathbf{AO}$$ x $$\mathbf{BO}$$

The area of the triangle is 7.5 m^2

Examples for various Vector operations
Python can handle many Vector Operations. This code presents examples of basic arithmetic, such as addition, subtraction, multiplication, and division. All of which are standard procedures. The more detailed syntax arises when a dot product is desired. For the code to understand the dot product of Q dot V the code must be written as "q.dot(v) ". This snippet of code also highlights the simplicity in assigning a variable equal to a scalar value and then implementation of that variable to multiply it by the vector.