https://github.com/fukuchi/walkingmotion
A pseudo 2D walking motion generator.
https://github.com/fukuchi/walkingmotion
Last synced: about 1 year ago
JSON representation
A pseudo 2D walking motion generator.
- Host: GitHub
- URL: https://github.com/fukuchi/walkingmotion
- Owner: fukuchi
- License: cc0-1.0
- Created: 2015-09-24T02:31:17.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-07-11T02:47:50.000Z (almost 7 years ago)
- Last Synced: 2025-03-24T14:46:31.871Z (about 1 year ago)
- Language: Processing
- Homepage:
- Size: 11.7 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://fukuchi.org/works/shortshort/WalkingMotion/).
## Synopsis
An instance of the `Walker` 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 walker, 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.
`Runner` 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.