rsagl- The RogueStar Animation and Graphics Library




leg :: (CoordinateSystemClass s, StateOf m ~ s) => LegStyle -> Vector3D -> Point3D -> RSdouble -> Point3D -> FRP e m Joint () -> Leg e mSource

Constructs a leg, based on several parameters. See the descriptions of foot and joint for more information on how some of these parameters are interpreted.

  • style - See LegStyle. * bend - The bend vector of the articulated joint * base - the base or shoulder or fixed point of the joint * len - the total length of the articulation * end - the natural resting point of the foot the foot will rarely actually be here, but will try to return to this point as it walks. * animation - an animation to display the joint

data LegStyle Source



data Leg e m Source

A description of a leg.


jointAnimation :: (CoordinateSystemClass s, StateOf m ~ s) => FRP e m () () -> FRP e m () () -> FRP e m Joint ()Source

Animates the upper and lower limbs of a joint into a single animation, using the affine transformations joitn_arm_upper and joint_arm_lower.

legs :: [Leg e m] -> FRP e m () ()Source

Combines a group of legs into a group that will try to keep at least half of the legs on the ground at all times.

approach :: (AbstractVector v, AbstractSubtract p v, AbstractMagnitude v) => p -> RSdouble -> Rate RSdouble -> Time -> p -> Rate vSource

An acceleration function that that tries to approach a goal point. It begins slowing down when it comes within the goal radius, and otherwise travels at a fixed speed toward the goal. The goal radius and speed are defined in terms of the magnitude method of the vector type.

This function is just a pure differential equation, see approachFrom and approachA.

Parameters are: * A goal point. * A goal radius. * An approach speed.

approachFrom :: (AbstractVector v, AbstractAdd p v, AbstractSubtract p v, AbstractMagnitude v) => RSdouble -> Rate RSdouble -> p -> FRP e m p pSource

Approach a moving goal point from the specified starting point. See the description of approach.

approachA :: (AbstractVector v, AbstractAdd p v, AbstractSubtract p v, AbstractMagnitude v, FRPModel m) => RSdouble -> Rate RSdouble -> FRP e m p pSource

Approach a moving goal point, starting at the initial position of the goal point. The particle won't move until the goal point moves.