A pseudo 2D walking motion generator.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
RunningMan.pde
WalkingMan.pde
WalkingMotion.pde

README.md

WalkingMotion

WalkingMotion is a class library that generates 2D pseudo human walking motion by a combination of a couple of trigonometric functions.

Demo

See the demo page.

Synopsis

An instance of the WalkingMan class has the following PVector variables:

  • head
  • shoulder
  • waist
  • arms[][]
  • legs[][]

head, shoulder and waist are obvious. arms[0][0] provides the position of the joint of his right arm, and arms[0][1] provides the position of his right hand. legs[1][0] provides the joint of his left leg, and so on.

In order to update the posture of the walking man, call update(float phase). Walking motion is a periodic function for phase 0.0-1.0.

X coordinate is relative to the trunk of the body, and Y coordinates is relative to the grounding point of the contacting feet and thus all Y coordinates are negative or zero.

RunningMan class provdies a running motion. See comments in WalkingMotion.pde for advanced usage.

LICENSE

WalkingMotion is released under the terms of Creative Commons Zero (CC0 1.0). You can copy, modify, distribute and perform the work, even for commercial purpose, all without asking permission. See the LICENSE file for the details.