RedPendulum an object that oscillates
Inherits from: RedObject
note that size is used as radius for this object.
instance methods:
addForceAngular2D(force)
push the pendulum with a scalar force.
pendulumOffset2D
return the current location (RedVector2D) of the pendulum relative to the whole object.
pendulumLoc2D
return the actual location (RedVector2D) of the pendulum.
addForceAngular1D(force)
pendulumOffset1D
pendulumLoc1D
addForceAngular3D(force)
pendulumOffset3D
pendulumLoc3D
instance variables:
<>theta
scalar in radians.
<>angularVel
scalar angular velocity.
a= RedWorld.new
b= RedPendulum(a).theta_(pi/2)
a.objects
b.dump
//see examples folder