discretize posture - ksoltan/RoboFish GitHub Wiki
discretize_posture
Generates the best approximation of how to positing a set of straight, discrete joints to mimic a posture based on the given error function.
Parameters:
joint_lengths - Array of respective lengths of each joint
t - Time value at which to evaluate posture function
error_func - Error function to determine error between posture
function and discrete joint arrangement.
posture_func - Swimming model function
Returns:
Array of points representing start and end points of the joints to
best approximate the function at the given time.
Start point for first (head) joint is (0, 0). Joints oriented in +x
direction.