Skip to main content

fabrik3d_solve_primitive

Functions

fabrik3d_solve_primitive(size, positions, lengths, origin_x, origin_y, origin_z, target_x, target_y, target_z, [max_iterations], [distance_tolerance])

Implementation of FABRIK algorithm, "Forward And Backward Reaching Inverse Kinematics" This implementation deals with single chain at a time, without support for multiple effectors see "FABRIK: a fast, iterative solver for inverse kinematics"

reach_out(size, positions, lengths, origin_x, origin_y, origin_z, target_x, target_y, target_z)
is_reachable(size, lengths, origin_x, origin_y, origin_z, target_x, target_y, target_z)
compute_direction(result, result_offset, positions, offsetA, offsetB)

Produced vector normalize(B-A)

solve_forward(size, positions, lengths, origin_x, origin_y, origin_z)
solve_backward(size, positions, lengths, target_x, target_y, target_z)

fabrik3d_solve_primitive(size, positions, lengths, origin_x, origin_y, origin_z, target_x, target_y, target_z, [max_iterations], [distance_tolerance])

Implementation of FABRIK algorithm, "Forward And Backward Reaching Inverse Kinematics" This implementation deals with single chain at a time, without support for multiple effectors see "FABRIK: a fast, iterative solver for inverse kinematics"

Kind: global function

ParamTypeDescription
sizenumbernumber of points in the chain
positionsFloat32Array | Array.<number>
lengthsFloat32Array | Array.<number>
origin_xnumber
origin_ynumber
origin_znumber
target_xnumber
target_ynumber
target_znumber
[max_iterations]numberMore steps will lead to higher accuracy, but at the cost of computation. Generally solution will be reached in just a few iteration so this is just a ceiling
[distance_tolerance]numberMinimum squared distance to be achieved to the target, used to terminate earlier before maximum number of iterations is reached

reach_out(size, positions, lengths, origin_x, origin_y, origin_z, target_x, target_y, target_z)

Kind: global function

ParamTypeDescription
sizenumbernumber of points in the chain
positionsFloat32Array | Array.<number>
lengthsFloat32Array | Array.<number>
origin_xnumber
origin_ynumber
origin_znumber
target_xnumber
target_ynumber
target_znumber

is_reachable(size, lengths, origin_x, origin_y, origin_z, target_x, target_y, target_z)

Kind: global function

ParamType
sizenumber
lengthsArray.<number>
origin_xnumber
origin_ynumber
origin_znumber
target_xnumber
target_ynumber
target_znumber

compute_direction(result, result_offset, positions, offsetA, offsetB)

Produced vector normalize(B-A)

Kind: global function

Param
result
result_offset
positions
offsetA
offsetB

solve_forward(size, positions, lengths, origin_x, origin_y, origin_z)

Kind: global function

ParamType
sizenumber
positionsFloat32Array
lengthsFloat32Array | Array.<number>
origin_xnumber
origin_ynumber
origin_znumber

solve_backward(size, positions, lengths, target_x, target_y, target_z)

Kind: global function

ParamType
sizenumber
positionsFloat32Array
lengthsFloat32Array | Array.<number>
target_xnumber
target_ynumber
target_znumber