Skip to content

Commit 50ae6fb

Browse files
committed
fix formatting in pendulum example for clarity and consistency
1 parent 2fa909b commit 50ae6fb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

paper/paper.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The following example demonstrates how to model a simple pendulum using *c4dynam
5959
The state of the pendulum consists of two variables:
6060
$X = [θ, q]$, where $θ$ is the angular displacement (rod angle), and $q$ is the angular rate.
6161

62-
Initial conditions: $X0 = [50, 0]$ (degrees, degrees per second, respectively).
62+
Initial conditions: $X_0 = [50, 0]$ (degrees, degrees per second, respectively).
6363

6464
![Simplified pendulum configuration.](rod_and_bob.png){#fig-pendulum}
6565

@@ -70,11 +70,11 @@ $$ \dot{\theta} = q $$
7070
$$ \dot{q} = \frac{g}{L}\sin\theta $$
7171

7272
[Figure 1](#fig-pendulum) shows a schematic of the simple pendulum, and the system parameters are listed below:
73-
- Rod length: $L = 1[m]$ (rigid, massless)
74-
- Gravity: $g = 9.8[m/s²]$
73+
- Rod length: $L = 1 [m]$ (rigid, massless)
74+
- Gravity: $g = 9.8 [m/s²]$
7575
- Integration function: `solve_ivp` (SciPy)
76-
- Time step: $0.01[s]$
77-
- Simulation duration: $5[s]$
76+
- Time step: $0.01 [s]$
77+
- Simulation duration: $5 [s]$
7878

7979
The expected result is an oscillatory motion of the angle $θ(t)$ in [Figure 2](#fig-theta), representing the pendulum swinging back and forth.
8080

@@ -106,7 +106,7 @@ pend.plot('theta', scale = c4d.r2d, darkmode = False)
106106
plt.show()
107107
```
108108

109-
![Pendulum angle θ(t) over time.](pendulum.png){#fig-theta}
109+
![Pendulum angle $\theta(t)$ over time.](pendulum.png){#fig-theta}
110110

111111

112112
Through this example, we see how *c4dynamics* lets users describe a system’s physics directly, run the simulation, and visualize results — all within a consistent, state-based framework. The same workflow applies seamlessly to more advanced dynamic models.

0 commit comments

Comments
 (0)