From c9b0274822c865135ba4c27184c6d01466db0718 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@uliege.be> Date: Sun, 1 Sep 2024 12:28:08 +0200 Subject: [PATCH] fix white space --- PendulumPython/pend.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PendulumPython/pend.py b/PendulumPython/pend.py index b9d0d43..a51e28e 100644 --- a/PendulumPython/pend.py +++ b/PendulumPython/pend.py @@ -57,7 +57,7 @@ time = c.defineNumber('Dyna/time [s]', value=0.0) dt = c.defineNumber('Dyna/time step [s]', value=0.001) tmax = c.defineNumber('Dyna/max time [s]', value=20) refresh = c.defineNumber('Dyna/refresh interval [s]', value=0.1) -theta0 = c.defineNumber('Init/initial theta angle [deg]', value=10, +theta0 = c.defineNumber('Init/initial theta angle [deg]', value=10, attributes={'Highlight':'Pink'}) phi0 = c.defineNumber('Init/initial phi angle [deg]', value=180, attributes={'Highlight':'Pink'}) @@ -71,7 +71,7 @@ if c.action == 'check' : exit(0) # In 'compute' mode, the code enters a loop and performs the actual computation. - + l1 = l; l2 = l; m1 = m; @@ -93,13 +93,13 @@ while (time < tmax): + m2*l2*(phi_dot**2.0)*sdelta - (m1+m2)*g*math.sin(theta) ) theta_dot_dot /= ( (m1+m2)*l1 - m2*l1*(cdelta)**2.0 ) - + phi_dot_dot = ( -m2*l2*(phi_dot**2.0)*sdelta*cdelta + (m1+m2)*(g*math.sin(theta)*cdelta - l1*(theta_dot**2.0)*sdelta - g*math.sin(phi)) ) phi_dot_dot /= ( (m1+m2)*l2 - m2*l2*(cdelta)**2.0 ) - + theta_dot = theta_dot + theta_dot_dot*dt phi_dot = phi_dot + phi_dot_dot*dt -- GitLab