Notion - Update docs

This commit is contained in:
shiffman 2024-02-24 17:47:32 +00:00 committed by GitHub
parent 00657df23a
commit 27acd2f60d
3 changed files with 1 additions and 3 deletions

View file

@ -901,13 +901,13 @@ function draw() {
</div>
<p>You might have noticed that in Example 3.10s spring code, I never once used sine or cosine. Before you write off all this trigonometry stuff as a tangent, however, allow me to show an example of how it all fits together. Imagine a bob hanging from an anchor connected by a spring with a fully rigid connection that can be neither compressed nor extended. This idealized scenario describes a pendulum and provides an excellent opportunity to practice combining all that youve learned about forces and trigonometry.</p>
<p>A <strong>pendulum</strong> is a bob suspended by an arm from a pivot (previously called the <em>anchor</em> in the spring). When the pendulum is at rest, it hangs straight down, as in Figure 3.18. If you lift up the pendulum at an angle from its resting state and then release it, however, it starts to swing back and forth, tracing the shape of an arc. A real-world pendulum would live in a 3D space, but Im going to look at a simpler scenario: a pendulum in the 2D space of a p5.js canvas. Figure 3.19 shows the pendulum in a nonresting position and adds the forces at play: gravity and tension.</p>
<p>When the pendulum swings, its arm and bob are essentially rotating around the fixed point of the pivot. If no arm connected the bob and the pivot, the bob would simply fall to the ground under the influence of gravity. Obviously, that isnt what happens. Instead, the fixed length of the arm creates the second force—tension. However, Im not going to work with this scenario according to these forces, at least not in the way I approached the spring scenario.</p>
<div class="half-width-right">
<figure>
<img src="images/03_oscillation/03_oscillation_16.png" alt="Figure 3.19: A pendulum showing \theta as the angle relative to its resting position">
<figcaption>Figure 3.19: A pendulum showing <span data-type="equation">\theta</span> as the angle relative to its resting position</figcaption>
</figure>
</div>
<p>When the pendulum swings, its arm and bob are essentially rotating around the fixed point of the pivot. If no arm connected the bob and the pivot, the bob would simply fall to the ground under the influence of gravity. Obviously, that isnt what happens. Instead, the fixed length of the arm creates the second force—tension. However, Im not going to work with this scenario according to these forces, at least not in the way I approached the spring scenario.</p>
<p>Instead of using <em>linear</em> acceleration and velocity, Im going to describe the motion of the pendulum in terms of <em>angular</em> acceleration and <em>angular </em>velocity, which refer to the change of the arms angle <span data-type="equation">\theta</span> relative to the pendulums resting position. I should first warn you, especially if youre a seasoned physicist, that Im going to conveniently ignore several important concepts here: conservation of energy, momentum, centripetal force, and more. This isnt intended to be a comprehensive description of pendulum physics. My goal is to offer you an opportunity to practice your new skills in trigonometry and further explore the relationship between forces and angles through a concrete example.</p>
<p>To calculate the pendulums angular acceleration, Im going to use Newtons second law of motion but with a little trigonometric twist. Take a look at Figure 3.19 and tilt your head so that the pendulums arm becomes the vertical axis. The force of gravity suddenly points askew, a little to the left—its at an angle with respect to your tilted head. If this is starting to hurt your neck, dont worry. Ill redraw the tilted figure and relabel the forces <span data-type="equation">F_g</span> for gravity and <span data-type="equation">T</span> for tension (Figure 3.20, left).</p>
<figure>

View file

@ -943,11 +943,9 @@ function setup() {
function draw() {
background(255);
//{!2} Apply a force to all particles.
<strong>let gravity = createVector(0, 0.1);
emitter.applyForce(gravity);</strong>
emitter.addParticle();
emitter.run();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 KiB

After

Width:  |  Height:  |  Size: 414 KiB