User Tools

Site Tools


visual3d:documentation:pipeline:expressions:brackets

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:brackets [2024/06/26 20:05] – removed sgrangervisual3d:documentation:pipeline:expressions:brackets [2024/11/15 20:15] (current) – [Brackets] wikisysop
Line 1: Line 1:
 +====== Brackets ======
 +
 +
 +
 +===== Parentheses =====
 +
 +Parentheses **(** and **)** are used to contain the parameters in a function
 +
 +For Example\\
 +Vector(0,0,1)
 +
 +===== Square_Brackets =====
 +
 +Square Brackets **[** and **]** specify frame numbers and components
 +
 +Square Brackets **[** and **]** are used at the end of a function call or parenthesis ( ) to specify the frames numbers and components
 +
 +Example, add two signals and retrieve the component 1 from frame 5
 +<code>
 +Evaluate_Expression
 +/Expression= (TARGET::ORIGINAL::RFT1 + TARGET::ORIGINAL::RFT2)[5,1]
 +/Result_Name=RFT_ADD_X
 +/Result_Type=DERIVED
 +/Result_Folder=PROCESSED
 +;
 +</code>
 +
 +Example, add two signals and retrieve the component 1 for all frames
 +<code>
 +Evaluate_Expression
 +/Expression= (TARGET::ORIGINAL::RFT1 + TARGET::ORIGINAL::RFT2)[-1,1]
 +/Result_Name=RFT_ADD_X
 +/Result_Type=DERIVED
 +/Result_Folder=PROCESSED
 +;
 +</code>
 +
 +**NOTE** a frame of -1 means all frames\\
 +Extracting one "component" of data from signal
 +
 +The following command will result in the DERIVED signal TEST containing the X component values of the TARGET RFT1.
 +<code>
 +Evaluate_Expression
 +/EXPRESSION=TARGET::ORIGINAL::RFT1::X
 +/RESULT_NAME=TEST
 +/RESULT_TYPE=DERIVED
 +! /RESULT_FOLDER=PROCESSED
 +;
 +</code>
 +
 +== Using Square Brackets and Boolean Operators ==
 +
 +In this example, project a collection of markers onto the floor
 +whenever the z-component of a marker is less than a threshold (e.g. 0.08 in this example)
 +otherwise set the resulting frame to NO_DATA
 +
 +<code>
 +Evaluate_Expression
 +/EXPRESSION=(((CURRENT_SIGNAL[-1,3])<0.08)/((CURRENT_SIGNAL[-1,3])<0.08))*VECTOR(1,1,0)*CURRENT_SIGNAL
 +/SIGNAL_TYPES=TARGET
 +/SIGNAL_FOLDER=ORIGINAL
 +/SIGNAL_NAMES=LFT1+LFT2+LFT3+RFT1+RFT2+RFT3
 +/RESULT_TYPES=TARGET
 +/RESULT_FOLDERS=GROUND
 +! /RESULT_NAME=
 +/APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE
 +;
 +</code>
 +
  
visual3d/documentation/pipeline/expressions/brackets.1719432305.txt.gz · Last modified: 2024/06/26 20:05 by sgranger