User Tools

Site Tools


visual3d:documentation:pipeline:signal_commands:compute_planar_angle

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:signal_commands:compute_planar_angle [2024/06/19 12:52] sgrangervisual3d:documentation:pipeline:signal_commands:compute_planar_angle [2024/07/17 15:46] (current) – created sgranger
Line 1: Line 1:
-{{this command computes a planar angle between three points as diagrammed in example 1 below, or four points as diagrammed in example 2 below. the location of the points displayed corresponds to the combo boxes containing the signal.+====== Compute Planar Angle ======
  
-it is possible to compute 3d angle, or to project the vectors onto one of the principal planes. if the user wants to project onto an arbitrary plane, transform the points into another coordinate system then project onto one of the principal planes of this new coordinate system.+This command computes planar angle between three points as diagrammed in example 1 below, or four points as diagrammed in example 2 below. The location of the points displayed corresponds to the combo boxes containing the signal.
  
-  * the user can select to use a right hand or left hand rule to define the sign of the angle. +It is possible to compute a 3D angle, or to project the vectors onto one of the principal planes. If the user wants to project onto an arbitrary plane, transform the points into another coordinate system then project onto one of the principal planes of this new coordinate system. 
-  * the user can select the range 0 - 360 degrees or -180 to 180 degrees.+ 
 +  * The user can select to use a Right Hand or Left Hand Rule to define the sign of the angle. 
 +  * The user can select the range 0 - 360 degrees or -180 to 180 degrees.
   * acos is used to calculate the planar angles. atan is not used.   * acos is used to calculate the planar angles. atan is not used.
-  * 3d angles can only be computed to 0 - 180 degrees unless a normal vector is specified.+  * 3D angles can only be computed to 0 - 180 degrees unless a normal vector is specified.
  
 vec1 = vector from vertex 2 to vertex 1 vec1 = vector from vertex 2 to vertex 1
Line 12: Line 14:
 normal= vec1 cross vec2 normal= vec1 cross vec2
 angle= acos(vec1 dot vec2) angle= acos(vec1 dot vec2)
-if you select a 3d angle and do not specify a projection plane or a normal vector, the answer is simply the angle between these vectors. +If you select a 3D angle and do not specify a projection plane or a normal vector, the answer is simply the angle between these vectors. 
-if you project the vertices onto a plane, the result is a 2d angle. in order to get 3 2d angles, you would need to create 3 different commands with each command projecting onto a different plane +If you project the vertices onto a plane, the result is a 2D angle. in order to get 3 2D angles, you would need to create 3 different commands with each command projecting onto a different plane 
-if you define the normal vector, you have the ability to specify the direction of the angle. +If you define the normal vector, you have the ability to specify the direction of the angle. 
-the command can be edited via text editor and dialog. the details on the dialog and command are found below:+The command can be edited via text editor and dialog. The details on the dialog and command are found below:
  
-|computeplanarangledialog.jpg  |<code>\\ square_root\\ /signal_types=the type of signal to be evaluated\\ /signal_names=the name of the signal to be evaluated\\ /signal_folder=the name of the signal folder\\ /result_folder=the name of the resulting folder\\ /result_names=the name of the resulting signal \\ /compute_3pt_angle=(true=3ptflase=4pt}\\ /normalx=the normal vector to the 3d angle\\ /normaly=\\ /normalz=\\ /reference_segmentlab\\ /projection_planexy\\ /use_right_hand_rule=true\\ /use_0_to_360_degrees=true\\ </code>  |+|{{:ComputePlanarAngleDialog.jpg}}  |<code>\\ Square_Root\\ /Signal_Types=The type of signal to be evaluated\\ /Signal_Names=The name of the signal to be evaluated\\ /Signal_Folder=The name of the signal folder\\ /Result_Folder=The name of the resulting folder\\ /Result_Names=The name of the resulting signal \\ /COMPUTE_3PT_ANGLE=(TRUE=3PTFLASE=4PT}\\ /NORMALX=The normal vector to the 3D angle\\ /NORMALY=\\ /NORMALZ=\\ /REFERENCE_SEGMENTLAB\\ /PROJECTION_PLANEXY\\ /USE_RIGHT_HAND_RULE=TRUE\\ /USE_0_TO_360_DEGREES=TRUE\\ </code>  |
  
  
 ---- ----
  
-===== examples =====+==== Examples ====
  
-==== example 1: projected angles - 3 point ====+=== Example 1: Projected angles - 3 Point ===
  
-given targets labeled:+Given TARGETS labeled:
  
-**distal1**, **vertex**, and **distal2**+**DISTAL1**, **VERTEX**, and **DISTAL2**
 and a segment and a segment
  
-**rft** +**RFT** 
-project the angle onto one of the principal planes of the **rft** segment coordinate system.+Project the angle onto one of the Principal Planes of the **RFT** Segment Coordinate System.
  
 <code> <code>
-compute the planar angle projected on the xy plane of the rft segment from 3 points (distal1+Compute the planar angle projected on the XY plane of the RFT segment from 3 points (DISTAL1
-vertexdistal2). the resulting signal is named test_anglethe right hand rule is used and+VERTEXDISTAL2). The resulting signal is named TEST_ANGLEThe Right Hand rule is used and
 ! the angle is between -180 to 180 degrees. ! the angle is between -180 to 180 degrees.
  
-compute_planar_angle +Compute_Planar_Angle 
-/signal_types=target+target+target +/SIGNAL_TYPES=TARGET+TARGET+TARGET 
-/signal_names=distal1+vertex+distal2 +/SIGNAL_NAMES=DISTAL1+VERTEX+DISTAL2 
-/signal_folder=processed+processed+processed +/SIGNAL_FOLDER=PROCESSED+PROCESSED+PROCESSED 
-/result_name=test_angle +/RESULT_NAME=TEST_ANGLE 
-/result_folder=angle +/RESULT_FOLDER=ANGLE 
-/compute_3pt_angle=true +/COMPUTE_3PT_ANGLE=TRUE 
-! /normalx+! /NORMALX
-! /normaly+! /NORMALY
-! /normalz+! /NORMALZ
-/reference_segment=rft +/REFERENCE_SEGMENT=RFT 
-! /projection_plane=xy +! /PROJECTION_PLANE=XY 
-! /use_right_hand_rule=true +! /USE_RIGHT_HAND_RULE=TRUE 
-/use_0_to_360_degrees=false+/USE_0_TO_360_DEGREES=FALSE
 ; ;
 </code> </code>
  
-==== example 2: compute planar angle using transform segment coordinate system ====+=== Example 2: Compute Planar Angle using transform segment coordinate system ===
  
-this example transforms the targets **distal1**, **vertex**, **distal2** into the segment **rft** coordinate system and then computes the planar angle **test_angle**.+This example transforms the targets **DISTAL1**, **VERTEX**, **DISTAL2** into the segment **RFT** coordinate system and then computes the planar angle **TEST_ANGLE**.
  
 <code> <code>
-first transform the locations into the segment coordinate system +First transform the locations into the segment coordinate system 
  
-transform_data_coordinate_system +Transform_Data_Coordinate_System 
-/signal_types=target+target+target +/SIGNAL_TYPES=TARGET+TARGET+TARGET 
-/signal_names=distal1+vertex+distal2 +/SIGNAL_NAMES=DISTAL1+VERTEX+DISTAL2 
-/signal_folder=processed+processed+processed +/SIGNAL_FOLDER=PROCESSED+PROCESSED+PROCESSED 
-/from_segment_cs=lab +/FROM_SEGMENT_CS=LAB 
-/to_segment_cs=rft +/TO_SEGMENT_CS=RFT 
- /result_type=target + /RESULT_TYPE=TARGET 
- /result_folder=rft + /RESULT_FOLDER=RFT 
-/result_suffix=+/RESULT_SUFFIX=
 ; ;
  
-compute the planar angle projected on the xy plane of the rft segment.+Compute the planar angle projected on the XY plane of the RFT segment.
  
-compute_planar_angle +Compute_Planar_Angle 
-/signal_types=target+target+target +/SIGNAL_TYPES=TARGET+TARGET+TARGET 
-/signal_names=distal1+vertex+distal2 +/SIGNAL_NAMES=DISTAL1+VERTEX+DISTAL2 
-/signal_folder=rft+rft+rft +/SIGNAL_FOLDER=RFT+RFT+RFT 
-/result_name=test_angle +/RESULT_NAME=TEST_ANGLE 
-/result_folder=angle +/RESULT_FOLDER=ANGLE 
-/compute_3pt_angle=true +/COMPUTE_3PT_ANGLE=TRUE 
-! /normalx+! /NORMALX
-! /normaly+! /NORMALY
-! /normalz+! /NORMALZ
-! /reference_segment=lab +! /REFERENCE_SEGMENT=LAB 
-! /projection_plane=xy +! /PROJECTION_PLANE=XY 
-! /use_right_hand_rule=true +! /USE_RIGHT_HAND_RULE=TRUE 
-/use_0_to_360_degrees=false+/USE_0_TO_360_DEGREES=FALSE
 ; ;
 </code> </code>
  
-==== example 3: projected angles - 4 point ====+=== Example 3: Projected angles - 4 Point ===
  
-given targets labeled:+Given TARGETS labeled:
  
-**prox1**, **prox2**, **distal1**, and **distal2**+**PROX1**, **PROX2**, **DISTAL1**, and **DISTAL2**
 and a segment and a segment
  
-**rft** +**RFT** 
-project the angle onto one of the principal planes of the **rft** segment coordinate system.+Project the angle onto one of the Principal Planes of the **RFT** Segment Coordinate System.
  
 <code> <code>
-compute the planar angle projected on the yz plane of the rft segment from 4 points +Compute the planar angle projected on the YZ plane of the RFT segment from 4 points 
-! (prox1,prox2,distal1,distal2). the resulting signal is named test_anglethe right hand rule+! (PROX1,PROX2,DISTAL1,DISTAL2). The resulting signal is named TEST_ANGLEThe Right Hand rule
 ! is used and the angle is between -180 to 180 degrees. ! is used and the angle is between -180 to 180 degrees.
  
-compute_planar_angle +Compute_Planar_Angle 
-/signal_types=target+target+target+target +/SIGNAL_TYPES=TARGET+TARGET+TARGET+TARGET 
-/signal_names=prox1+prox2+distal1+distal2 +/SIGNAL_NAMES=PROX1+PROX2+DISTAL1+DISTAL2 
-/signal_folder=processed+processed+processed+processed +/SIGNAL_FOLDER=PROCESSED+PROCESSED+PROCESSED+PROCESSED 
-/result_name=test_angle +/RESULT_NAME=TEST_ANGLE 
-/result_folder=angle +/RESULT_FOLDER=ANGLE 
-/compute_3pt_angle=false +/COMPUTE_3PT_ANGLE=FALSE 
-! /normalx+! /NORMALX
-! /normaly+! /NORMALY
-! /normalz+! /NORMALZ
-! /reference_segment=lab +! /REFERENCE_SEGMENT=LAB 
-/projection_plane=yz +/PROJECTION_PLANE=YZ 
-! /use_right_hand_rule=true +! /USE_RIGHT_HAND_RULE=TRUE 
-/use_0_to_360_degrees=false+/USE_0_TO_360_DEGREES=FALSE
 ; ;
 </code> </code>
  
  
-}}+
visual3d/documentation/pipeline/signal_commands/compute_planar_angle.1718801575.txt.gz · Last modified: 2024/06/19 12:52 by sgranger