User Tools

Site Tools


visual3d:documentation:pipeline:expressions:expression_numbers

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:expression_numbers [2024/06/19 12:49] sgrangervisual3d:documentation:pipeline:expressions:expression_numbers [2024/09/05 18:32] (current) – [Random] wikisysop
Line 1: Line 1:
-{{{{{{{{===== random =====+====== Expression Numbers ====== 
 + 
 +==== Random ====
  
 rand(lo_value,hi_value,signal) - random number in the range (lo_value,hi_value) rand(lo_value,hi_value,signal) - random number in the range (lo_value,hi_value)
  
-example : rand() will generate a random number in the range 0 to 1 +<code> 
-[[visual3d:documentation:pipeline:pipeline_commands:set_pipeline_parameter_from_expression|set_pipeline_parameter_from_expression]] +Example : rand() will generate a random number in the range 0 to 1 
-/parameter_name=test1 + 
-/expression=rand() +Set_Pipeline_Parameter_From_Expression 
-/as_integer=false +/PARAMETER_NAME=TEST1 
-**;** +/EXPRESSION=RAND() 
-::test1 = 0.220525 +/AS_INTEGER=FALSE 
-example : rand(lo_value,hi_value) will generate a random number in the range lo_value to hi_value +
-[[visual3d:documentation:pipeline:pipeline_commands:set_pipeline_parameter_from_expression|set_pipeline_parameter_from_expression]] + 
-/parameter_name=test2 + TEST1 = 0.220525 
-/expression=rand(2,3) + 
-/as_integer=false +Example : rand(lo_value,hi_value) will generate a random number in the range lo_value to hi_value 
-**;** + 
-::test2 = 2.232995 +Set_Pipeline_Parameter_From_Expression 
-example : rand(lo_value,hi_value,signal) will generate a random number in the range lo_value to hi_value with the same number of components and frames as **signal**+/PARAMETER_NAME=TEST2 
-[[visual3d:documentation:pipeline:pipeline_commands:set_pipeline_parameter_from_expression|set_pipeline_parameter_from_expression]] +/EXPRESSION=RAND(2,3) 
-/parameter_name=test3 +/AS_INTEGER=FALSE 
-/expression=rand(2,3,frame_numbers::original::frames+
-/as_integer=false + 
-**;** + TEST2 = 2.232995 
-::test3 = 2.808424+2.582592+2.346721+2.697052+2.662510+2.861250+2.843808+...(to number of frames) + 
-example : rand(lo_value,hi_value,signal). if signal is a number, that number of values are returned. +Example : rand(lo_value,hi_value,signal) will generate a random number in the range lo_value to hi_value with the same number of components and frames as signal. 
-[[visual3d:documentation:pipeline:pipeline_commands:set_pipeline_parameter_from_expression|set_pipeline_parameter_from_expression]] + 
-/parameter_name=test4 +Set_Pipeline_Parameter_From_Expression 
-/expression=rand(2,3,3) +/PARAMETER_NAME=TEST3 
-/as_integer=false +/EXPRESSION=RAND(2,3,FRAME_NUMBERS::ORIGINAL::FRAMES
-**;** +/AS_INTEGER=FALSE 
-::test4 = 2.446495 + 2.718410 + 2.201863 +; 
-example create target with random values between 0 and 1 + 
-[[visual3d:documentation:pipeline:signal_commands:create_target|create_target]] +::TEST3 = 2.808424+2.582592+2.346721+2.697052+2.662510+2.861250+2.843808+...(to number of frames) 
-/signal_names=test5 + 
-! /signal_description+Example : rand(lo_value,hi_value,signal). If signal is a number, that number of values are returned. 
-/expression=rand(0,1,target::original::lft1+ 
-! /include_calfile=false +Set_Pipeline_Parameter_From_Expression 
-**;** +/PARAMETER_NAME=TEST4 
-view the resulting signal in the 3d viewer by turning on the target trail +/EXPRESSION=RAND(2,3,3) 
-random_target.jpg +/AS_INTEGER=FALSE 
-example: create a target with random values between 0 and 1. +; 
-[[visual3d:documentation:pipeline:signal_commands:create_target|create_target]] + 
-/signal_names=test6 +::TEST4 = 2.446495 + 2.718410 + 2.201863 
-! /signal_description+ 
-/expression=vector(rand(0,1,frame_numbers::original::frames),rand(0,1,frame_numbers::original::frames),rand(0,1,frame_numbers::original::frames)) +Example Create TARGET with random values between 0 and 1 
-! /include_calfile=false + 
-**;** +Create_Target 
-note that all components contain different values+/SIGNAL_NAMES=TEST5 
 +! /SIGNAL_DESCRIPTION
 +/EXPRESSION=RAND(0,1,TARGET::ORIGINAL::LFT1
 +! /INCLUDE_CALFILE=FALSE 
 +
 + 
 +View the resulting signal in the 3D viewer by turning on the target trail 
 +</code> 
 + 
 +{{:random_target.jpg}} 
 + 
 +<code>Example: create a TARGET with random values between 0 and 1. 
 + 
 +Create_Target 
 +/SIGNAL_NAMES=TEST6 
 +! /SIGNAL_DESCRIPTION
 +/EXPRESSION=VECTOR(RAND(0,1,FRAME_NUMBERS::ORIGINAL::FRAMES),RAND(0,1,FRAME_NUMBERS::ORIGINAL::FRAMES),RAND(0,1,FRAME_NUMBERS::ORIGINAL::FRAMES)) 
 +! /INCLUDE_CALFILE=FALSE 
 +
 + 
 +Note that all components contain different values\\ 
 +</code> 
 + 
 +{{:Random7.jpg}} 
 + 
 +{{:random7view.jpg}} 
 + 
 +<code> 
 +Example : Create a TARGET where each frame is on a random location on the surface of a sphere of radius 1 
 + 
 +Evaluate_Expression 
 +/EXPRESSION=RAND(-PI(),PI(),FRAME_NUMBERS::ORIGINAL::FRAMES) 
 +/RESULT_TYPES=DERIVED 
 +/RESULT_FOLDERS=RADIUS 
 +/RESULT_NAME=VERTICAL 
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE 
 +
 + 
 +Evaluate_Expression 
 +/EXPRESSION=RAND(0,2*PI(),FRAME_NUMBERS::ORIGINAL::FRAMES) 
 +/RESULT_TYPES=DERIVED 
 +/RESULT_FOLDERS=RADIUS 
 +/RESULT_NAME=HORIZONTAL 
 +! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE 
 +
 + 
 +Create_Target 
 +/SIGNAL_NAMES=SPHERE 
 +! /SIGNAL_DESCRIPTION= 
 +/EXPRESSION=VECTOR( 
 +COS(DERIVED::RADIUS::VERTICAL)*COS(DERIVED::RADIUS::HORIZONTAL), 
 +-COS(DERIVED::RADIUS::VERTICAL)*SIN(DERIVED::RADIUS::HORIZONTAL), 
 +SIN(DERIVED::RADIUS::VERTICAL)) 
 +! /INCLUDE_CALFILE=FALSE 
 +
 +</code>
  
-random7.jpgrandom7view.jpg +{{:random8view.jpg}}
-example : create a target where each frame is on a random location on the surface of a sphere of radius 1 +
-**evaluate_expression** +
-/expression=rand(-pi(),pi(),frame_numbers::original::frames) +
-/result_types=derived +
-/result_folders=radius +
-/result_name=vertical +
-! /apply_as_suffix_to_signal_name=false +
-**;** +
-**evaluate_expression** +
-/expression=rand(0,2*pi(),frame_numbers::original::frames) +
-/result_types=derived +
-/result_folders=radius +
-/result_name=horizontal +
-! /apply_as_suffix_to_signal_name=false +
-**;** +
-[[visual3d:documentation:pipeline:signal_commands:create_target|create_target]] +
-/signal_names=sphere +
-! /signal_description= +
-/expression=vector( +
-cos(derived::radius::vertical)*cos(derived::radius::horizontal), +
--cos(derived::radius::vertical)*sin(derived::radius::horizontal), +
-sin(derived::radius::vertical)) +
-! /include_calfile=false +
-**;** +
-random8view.jpg+
  
-}}}}}}}} 
visual3d/documentation/pipeline/expressions/expression_numbers.1718801395.txt.gz · Last modified: 2024/06/19 12:49 by sgranger