```python
import sympy as sm
import sympy.physics.mechanics as me
sm.init_printing()
```

In the video I incorrectly typed `q1, q2, q3, q4 = sm.symbols('q1:5')`. It is corrected below:


```python
q1, q2, q3, q4, q5 = sm.symbols('q1:6')
l1, l2, l3, l4 = sm.symbols('l1:5')
```


```python
N, A, B, C = sm.symbols('N, A, B, C', cls=me.ReferenceFrame)
```


```python
A.orient_body_fixed(N, (q1, q2, 0), 'ZXZ')
A.dcm(N)
```


```python
B.orient_axis(A, q3, A.x)
```

In the video I incorrectly typed `C.orient_body_fixed(B, (q3, q4, 0), 'XZX')`. It is corrected below:


```python
C.orient_body_fixed(B, (q4, q5, 0), 'XZX')
```


```python
r_P1_P2 = l1*A.z
r_P1_P2
```


```python
r_P2_P3 = l2*B.z
r_P2_P3
```


```python
r_P3_P4 = l3*C.z - l4*C.y
r_P3_P4
```


```python
r_P1_P4 = r_P1_P2 + r_P2_P3 + r_P3_P4
r_P1_P4
```


```python
r_P1_P4.express(N)
```


```python
r_P1_P4.express(N).simplify()
```


```python
r_P1_P4.express(B)
```


```python
r_P1_P4.free_symbols(B)
```


```python
r_P1_P4.free_symbols(N)
```


```python

```

71dfa8ed9297a742b2160d917ad6f0e8ba3bfb87
ipynb
Jupyter Notebook
content/notebooks/vectors.ipynb
moorepants/me41055
5c941d28f6f61fa1a02fbda4772d88010014eec0
CC-BY-4.0
content/notebooks/vectors.ipynb
moorepants/me41055
5c941d28f6f61fa1a02fbda4772d88010014eec0
CC-BY-4.0
2022-01-07T18:05:36.000Z
2022-03-22T15:15:01.000Z
content/notebooks/vectors.ipynb
moorepants/me41055
5c941d28f6f61fa1a02fbda4772d88010014eec0
CC-BY-4.0
2022-01-24T17:18:40.000Z
2022-01-24T17:18:40.000Z
Qwen/Qwen-72B
1. YES
2. YES