User Tools

Site Tools


visual3d:documentation:pipeline:expressions:intersection_functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
visual3d:documentation:pipeline:expressions:intersection_functions [2025/01/24 19:10] wikisysopvisual3d:documentation:pipeline:expressions:intersection_functions [2025/01/27 20:25] (current) wikisysop
Line 246: Line 246:
 ; ;
 </code> </code>
 +
 +Example: Projecting a bounding box onto a sloped plane.
 +
 +<code>
 +
 +!Creating 4 vectors defining a corners of plane (such as a sloped floor)
 +Metric_Explicit
 +/RESULT_METRIC_FOLDER=FLOOR
 +/RESULT_METRIC_NAME=F1
 +/METRIC_VALUE=VECTOR(0,0,0)
 +;
 +
 +Metric_Explicit
 +/RESULT_METRIC_FOLDER=FLOOR
 +/RESULT_METRIC_NAME=F2
 +/METRIC_VALUE=VECTOR(0.2,0,0)
 +;
 +
 +Metric_Explicit
 +/RESULT_METRIC_FOLDER=FLOOR
 +/RESULT_METRIC_NAME=F3
 +/METRIC_VALUE=VECTOR(0,0.2,0.03)
 +;
 +
 +Metric_Explicit
 +/RESULT_METRIC_FOLDER=FLOOR
 +/RESULT_METRIC_NAME=F4
 +/METRIC_VALUE=VECTOR(0.2,0.2,0.03)
 +;
 +
 +! Creating a best fit plane using the 4 vectors defined previously
 +Evaluate_Expression
 +/EXPRESSION=BEST_FIT_PLANE(CURRENT_SIGNAL)
 +/SIGNAL_TYPES=METRIC
 +/SIGNAL_FOLDER=FLOOR
 + /SIGNAL_NAMES=F1+F2+F3+F4
 +! /SIGNAL_COMPONENTS=
 + /RESULT_TYPES=METRIC
 +/RESULT_FOLDERS=FLOOR
 +/RESULT_NAME=PLANE
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
 +;
 +
 +! Projecting a bounding box onto the plane to create a base of support
 +Evaluate_Expression
 +/EXPRESSION=BASE_OF_SUPPORT(CURRENT_SIGNAL,METRIC::FLOOR::PLANE)
 +/SIGNAL_TYPES=DERIVED
 +/SIGNAL_FOLDER=BOUNDING_BOX
 +/SIGNAL_NAMES=BOX
 +! /SIGNAL_COMPONENTS=
 +! /RESULT_TYPES=DERIVED
 +/RESULT_FOLDERS=BASE_OF_SUPPORT
 +/RESULT_NAME=BOS2
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
 +;
 +
 +! Highlighting the base of support with targets
 +Create_Targets_For_Base_Of_Support
 +/SIGNAL_NAMES=BOS
 +/SIGNAL_DESCRIPTION=BOS
 +/EXPRESSION=DERIVED::BASE_OF_SUPPORT::BOS2
 +/NUM_TARGETS=8
 +;
 +</code>
 +
 +==== Extrapolated_COG ====
 +**EXTRAPOLATED_COG**(Signal,Signal,Model Metric)
 +
 +  * Computes the extrapolated COG or the [[https://www.sciencedirect.com/science/article/abs/pii/S0021929004001642?via%3Dihub|'extrapolated center of mass position']] using the following equation:
 +  * xCoM = CoM + vCoM/sqrt(g/l)
 +  * Expression requires three inputs:
 +    * The first signal input is considered as the CoM position,
 +    * second input is considered the velocity of the CoM,
 +    * and the third input is the leg length of the model.
 +
 +Example: Deriving the extrapolated CoM
 +<code>
 +Evaluate_Expression
 +/EXPRESSION=EXTRAPOLATED_COG(CURRENT_SIGNAL,MODEL::METRIC::LEG_LENGTH)
 +/SIGNAL_TYPES=LINK_MODEL_BASED+LINK_MODEL_BASED
 +/SIGNAL_FOLDER=ORIGINAL+ORIGINAL
 +/SIGNAL_NAMES=COG+COG_VELOCITY
 +! /RESULT_TYPES=DERIVED
 +/RESULT_FOLDERS=BASE_OF_SUPPORT
 +/RESULT_NAME=XCOG
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
 +;
 +</code>
 +==== Margin_Of_Stability ====
 +
 +
visual3d/documentation/pipeline/expressions/intersection_functions.1737745814.txt.gz · Last modified: 2025/01/24 19:10 by wikisysop