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 18:20] wikisysopvisual3d:documentation:pipeline:expressions:intersection_functions [2025/01/27 20:25] (current) wikisysop
Line 147: Line 147:
   * The resulting bounding box is aligned with the Laboratory Coordinate System. The bounding box signal is a 24 column signal containing the X,Y,Z position of 8 vertices.   * The resulting bounding box is aligned with the Laboratory Coordinate System. The bounding box signal is a 24 column signal containing the X,Y,Z position of 8 vertices.
  
-Example: Create 4 targets representing the vertices of the box, and create a bounding box around these targets that will be tracked across an event sequence.+Example: Create 4 arbitrary targets, and create a bounding box around these targets that will be tracked across an event sequence.
  
 <code> <code>
Line 203: Line 203:
  
 ==== Base_Of_Support ==== ==== Base_Of_Support ====
-{{ visual3D:documentation:pipeline:expressions:BaseOfSupportDgrm.png?300}} +{{ visual3D:documentation:pipeline:expressions:BOSDiagram.png?300}} 
-**Bounding_Box**(Signal,Vector)+**Base_Of_Support**(Signal,Plane) 
 + 
 +  * Construct a 2D base of support projected onto a plane from a Bounding Box. 
 +  * The signal input is the [[https://en.wikipedia.org/wiki/Minimum_bounding_box|bounding box]] of the point set, a 24 column signal containing the X,Y,Z position of 8 vertices. 
 +  * The [[visual3d:documentation:pipeline:expressions:least_squares_fitting_of_data#best_fit_plane|Plane]] parameter is the plane to project the Box onto. 
 +  * The resulting base of support is a 2D projection of the signal onto the plane. The base of support is a 12 column signal containing the X,Y,Z position of 4 vertices (C1-C4 in the image to the right). 
 + 
 +Example: Create a bounding box around 4 targets between events START and END, and project that box onto the ground using the Base_Of_Support command.  
 +<code> 
 +! Create a bounding box using 4 targets V1,V2,V3,V4 to be tracked between events START and END 
 +Evaluate_Expression 
 +/EXPRESSION=BOUNDING_BOX(CURRENT_SIGNAL,1) 
 +/SIGNAL_TYPES=EVENT_LABEL+EVENT_LABEL+TARGET+TARGET+TARGET+TARGET 
 +/SIGNAL_FOLDER=ORIGINAL 
 +/SIGNAL_NAMES=START+END+V1+V2+V3+V4 
 +! /RESULT_TYPES=DERIVED 
 +/RESULT_FOLDERS=BOUNDING_BOX 
 +/RESULT_NAME=BOX 
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE 
 +
 + 
 +! Project the bounding box onto the X-Y plane of the laboratory 
 +Evaluate_Expression 
 +/EXPRESSION=BASE_OF_SUPPORT(CURRENT_SIGNAL,VECTOR(0,0,1,0)) 
 +/SIGNAL_TYPES=DERIVED 
 +/SIGNAL_FOLDER=BOUNDING_BOX 
 +/SIGNAL_NAMES=BOX 
 +! /SIGNAL_COMPONENTS= 
 +! /RESULT_TYPES=DERIVED 
 +/RESULT_FOLDERS=BASE_OF_SUPPORT 
 +/RESULT_NAME=BOS 
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE 
 +
 + 
 +! Create targets of the resulting Base of Support signal for visualization  
 +Create_Targets_For_Base_Of_Support 
 +/SIGNAL_NAMES=BOS 
 +/SIGNAL_DESCRIPTION=BOS 
 +/EXPRESSION=DERIVED::BASE_OF_SUPPORT::BOS 
 +/NUM_TARGETS=8 
 +
 +</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 ==== 
  
-  * Construct a 2D plane projected from a Bounding Box signal. 
-  * The signal input is the [[https://en.wikipedia.org/wiki/Minimum_bounding_box|bounding box]] of the point set, a 24 column vector containing the X,Y,Z position of 8 vertices. 
-  * The Vector parameter is the direction of projection in the lab coordinate system 
-     * 0 = static across event_sequence 
-     * 1 = computed frame by frame across event_sequence 
-  * The resulting bounding box is aligned with the Laboratory Coordinate System. 
visual3d/documentation/pipeline/expressions/intersection_functions.1737742819.txt.gz · Last modified: 2025/01/24 18:20 by wikisysop