You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/tutorial-static_equilibrium.md
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,8 +97,7 @@ d3.quiver(x, y, z, u, v, w, color="r", label="forceA")
97
97
u, v, w = forceB
98
98
d3.quiver(x, y, z, u, v, w, color="b", label="forceB")
99
99
100
-
plt.legend()
101
-
plt.show()
100
+
d3.legend()
102
101
```
103
102
104
103
There are two forces emanating from a single point. In order to simplify this problem, you can add them together to find the sum of forces. Note that both `forceA` and `forceB` are three-dimensional vectors, represented by NumPy as arrays with three components. Because NumPy is meant to simplify and optimize operations between vectors, you can easily compute the sum of these two vectors as follows:
@@ -129,8 +128,7 @@ d3.quiver(x, y, z, u, v, w, color="b", label="forceB")
129
128
u, v, w = forceC
130
129
d3.quiver(x, y, z, u, v, w, color="g", label="forceC")
131
130
132
-
plt.legend()
133
-
plt.show()
131
+
d3.legend()
134
132
```
135
133
136
134
However, the goal is equilibrium.
@@ -172,8 +170,6 @@ x, y, z = np.array([0, 0, 0])
172
170
173
171
u, v, w = forceA + forceB + R # add them all together for sum of forces
174
172
d3.quiver(x, y, z, u, v, w)
175
-
176
-
plt.show()
177
173
```
178
174
179
175
The empty graph signifies that there are no outlying forces. This denotes a system in equilibrium.
0 commit comments