visual3d:documentation:pipeline:expressions:overview
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| visual3d:documentation:pipeline:expressions:overview [2024/06/19 13:59] – created sgranger | visual3d:documentation:pipeline:expressions:overview [2024/07/12 13:29] (current) – removed sgranger | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Many (but not all) edit boxes and pipeline command parameters allow the use of expressions instead of numerical values. Visual3D uses a common expression parser, so the following syntax is common across all command parameters that allow expressions. | ||
| - | |||
| - | ===== Evaluate_Expression Command ===== | ||
| - | |||
| - | The Evaluate_Expression command allows the users to include expressions for defining the processing of the signals. | ||
| - | |||
| - | Evaluate_Expression | ||
| - | / | ||
| - | !/ | ||
| - | !/ | ||
| - | !/ | ||
| - | / | ||
| - | / | ||
| - | / | ||
| - | !/ | ||
| - | **;** | ||
| - | ==== Expression_Items ==== | ||
| - | |||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | ==== Visual3D Reserved Characters ==== | ||
| - | |||
| - | There are five characters that cause the equation parser considerable trouble. We have introduced reserved pipeline commands that can be used in the place of these characters. | ||
| - | |||
| - | |Reserved_Characters | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |||
| - | ==== Visual3D Reserved Names ==== | ||
| - | |||
| - | |Reserved_Names | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |||
| - | ==== Numbers ==== | ||
| - | |||
| - | |Mathematical Constants | ||
| - | |pi() |3.14159265358979323846 | ||
| - | |gravity_vector() | ||
| - | |[[Visual3D: | ||
| - | |||
| - | ==== Mathematical Operators ==== | ||
| - | |||
| - | **Note: Visual3D parses the mathematical operators before it parses the signal names. If you have a signal name that contains a mathematical operator (e.g. R-Foot1), Visual3D will probably not be able to parse the equation expression properly.** | ||
| - | **Also Note the potential conflict between some of the operators and the reserved characters. If the string is obviously an expression, there is no conflict.** | ||
| - | |Mathematical Operators | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |||
| - | === The ugly truth of the logical and === | ||
| - | |||
| - | & is used by Visual3D for concatenating strings | ||
| - | it works quite well, but there is one circumstance where this choice of delimiter is a nuisance. | ||
| - | and that is when you want & to actually be a logical and and the parser throws it away | ||
| - | in this case you can use the reserved string AMP | ||
| - | it was only really ugly before version 2024_04 because it didn't work before then | ||
| - | Example given a file that has TAGS labelled TEST1 and TEST2 | ||
| - | To select files containing the tags TEST1 and TEST2 | ||
| - | Select_Active_File | ||
| - | / | ||
| - | / | ||
| - | ! / | ||
| - | **;** | ||
| - | ! But what if you want to generalize and use another pipeline parameter for TEST2 | ||
| - | Set_Pipeline_Parameter | ||
| - | / | ||
| - | / | ||
| - | **;** | ||
| - | Select_Active_File | ||
| - | / | ||
| - | / | ||
| - | ! / | ||
| - | **;** | ||
| - | ==== Brackets ==== | ||
| - | |||
| - | |Brackets | ||
| - | |[[Visual3D: | ||
| - | |[[Visual3D: | ||
| - | |||
| - | ===== Functions ===== | ||
| - | |||
| - | Visual3D has pre-defined functions imbedded in the pipeline to help you out. | ||
| - | These functions are commonly used or have been added based on customer use. | ||
| - | ==== Metric Functions ==== | ||
| - | |||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | ==== Signal Functions ==== | ||
| - | |||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | ==== String Data ==== | ||
| - | |||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | ==== Least Squares Fitting of Data ==== | ||
| - | |||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | ==== Intersection Functions ==== | ||
| - | |||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | ==== Assigned Force Functions ==== | ||
| - | |||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | ==== Trigonometric Functions ==== | ||
| - | |||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | ==== Array and Matrix Functions ==== | ||
| - | |||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | [[Visual3D: | ||
| - | ==== Common Math Expressions ==== | ||
| - | |||
| - | **int(a**) - truncate each component to the nearest integer | ||
| - | **round(a)** - round each component to the nearest integer | ||
| - | **fmod(y, | ||
| - | => y and x must be one dimensional signals; returns a one dimensional signal | ||
| - | **abs(a)** - absolute value | ||
| - | **sign(a)**= sign of the signal ((a< | ||
| - | **sqrt(a)** - square root | ||
| - | **exp(a)** - exponent | ||
| - | **log(a)** - natural log | ||
| - | **log10(a)** - log base 10 | ||
| - | **length(x)** -- creates the length (magnitude) of a vector | ||
| - | **distance(a, | ||
| - | Example | ||
| - | Evaluate_Expression | ||
| - | / | ||
| - | / | ||
| - | ! / | ||
| - | ! / | ||
| - | **;** | ||
| - | \\ | ||
| - | |||
| - | |||
| - | **dot (a, b)** -- creates the dot product of a and b | ||
| - | **cross (a, b)** -- creates the cross product of a and b | ||
| - | **NOTE: Often you will want to do dot (a, b)/ length (b), or cross (a, b) / length (b)** | ||
| - | ===== Expression Examples ===== | ||
| - | |||
| - | Examples of using Evaluate_Expressions can be found here: **[[Visual3D: | ||
| - | |||
| - | |||
visual3d/documentation/pipeline/expressions/overview.1718805569.txt.gz · Last modified: by sgranger
