Double Pendulum Graphical Models
The rcp.QtDoublePendulum module contains several classes which use PyQt5 to
render GUI cartoon representations of a double-pendulum system.
rcp.QtDoublePendulum
-
class rcp.QtDoublePendulum.QtDoublePendulum(*args: Any, **kwargs: Any)[source]
Bases: QWidget
Custom widget representing a double pendulum.
-
update_positions(positions)[source]
Update the joint angles for the double pendulum cartoon. Angles are in radians, with zero defined pointing straight down, and CCW positive rotations.
- Parameters:
positions – an array or ndarray with at least two elements [q0 q1]
-
class rcp.QtDoublePendulum.QtDoublePendulumItem(*args: Any, **kwargs: Any)[source]
Bases: QGraphicsItem
Custom QGraphicsItem representing a double-pendulum in a QGraphicsScene.
-
update_positions(positions)[source]
Update the joint angles for the double pendulum cartoon. Angles are in radians, with zero defined pointing straight down, and CCW positive rotations.
- Parameters:
positions – an array or ndarray with at least two elements [q0 q1]