Skip to content

iambrian/Project2-Toolbox-Functions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wing Structure

Consists of three joints (shoulder, elbow, wrist). The shoulder joint is stationary within the body but the wrist and elbow are located at a fixed distance (in the x and z direction) from the body. Feathers are placed on a spline with control points at each joint or simply linearly interpolated between pairs of joints (use toggleSpline). Each region of feathers is created by offsetting from this interpolated line.

Wing Animation

My goal was to emulate a motion like this:

Flapping Motion

Given that the shoulder joint (green) is stationary, the relative y position of the elbow (red) and wrist (blue) looks something like this:

Joint Displacements

This pair of functions has a couple of key characteristics:

The falling edge on each oscillation should take longer than the rising edge. This makes the wing motion more realistic as the upstroke is about twice as fast as the downstroke[1]. This asymmetric sine wave is achieved using some variation of this function: sin(x + a * sin(x))[2].

The elbow displacement function must reach its high and low peaks slightly before the wrist does. It's important that this is a translation of the function or else the periods will go out of sync.

Lastly, the amplitude of the elbow displacement is less than that of the wrist.

Demo

Demo: https://iambrian.github.io/Project2-Toolbox-Functions/

Demo

References

Bird wing motion: http://www.brendanbody.co.uk/flight_tutorial/

Baseline sine function: https://www.quora.com/How-can-I-draw-this-irregular-Sine-function-in-MATLAB-Should-I-add-multiple-the-Sine-function-to-another-term

Graphing: http://www.iquilezles.org/apps/graphtoy/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.5%
  • HTML 1.5%