Benutzer-Werkzeuge

Webseiten-Werkzeuge


modellingcomponents:functions

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Letzte ÜberarbeitungBeide Seiten der Revision
modellingcomponents:functions [2021/01/08 19:14] – [pocL()] olivermodellingcomponents:functions [2021/11/09 11:20] – [norm()] oliver
Zeile 233: Zeile 233:
  
    dist(A,B)    dist(A,B)
 +   
 +==== ddist() ====
 +
 +Directed distance between two points.
 +The first two arguments define the start point and the end point of a vector. The distance of the two points is calculated. The third argument defines a vector. If the vector defined by the first two points and this reference vector includes an angle less-90 or more than 90 degree than the result is negative else positive.
 +
 +Types:
 +
 +^ Argument 1 ^ Argument 2 ^ Argument 3 ^ Result ^
 +| 3d vector | 3d vector | 3d vector | double |
 +
 +=== Examples ===
 +
 +   ddist(A,B, ref)
 ==== vec() ==== ==== vec() ====
  
-This named function bundles the three double arguments to a 3d vector result value.+This named function bundles the three double arguments to a 3d tuple result value. Typically this in interpreted as a vector.
  
 Types: Types:
Zeile 290: Zeile 304:
  
 ==== norm() ==== ==== norm() ====
 +Creates the normal vector of a plane based on three given point laying in the plane 
 +^ Argument ^ Type ^ Description^ 
 +^ 1 | 3d vector | first point of a plane| 
 +^ 2 | 3d vector | seconds point of a plane | 
 +^ 3 | 3d vector | third point of a plane |
 ==== normalize() ==== ==== normalize() ====
  
 If the argument is a tuple with 3 elements, it is interpreted as a vector and the result is the normalized vector (length of the vector is set to 1). If the argument is a tuple with 3 elements, it is interpreted as a vector and the result is the normalized vector (length of the vector is set to 1).
  
-^ Argument  Result +^ Argument ^ Type ^ Description
-| 3d vector | real |+^ 1 | 3d vector | Normalize the vector. |
  
 ==== mid() ==== ==== mid() ====
Zeile 303: Zeile 321:
  
 Extracts the x/first-component of a 3d-vector. Extracts the x/first-component of a 3d-vector.
 +
 +^ Argument ^ Type ^ Description^
 +^ 1 | 3d vector | extracts the x-component auf a 3d vector. |
  
  
 ==== y() ==== ==== y() ====
 +
 +^ Argument ^ Type ^ Description^
 +^ 1 | 3d vector | extracts the y-component auf a 3d vector. |
 ==== z() ==== ==== z() ====
 +
 +^ Argument ^ Type ^ Description^
 +^ 1 | 3d vector | extracts the z-component auf a 3d vector. |
 ==== q() ==== ==== q() ====
-===== Special fuction useful for 3D geometric calculations =====+Create a quaternion from 4 double values. 
 + 
 +^ Argument ^ Type ^ Description ^ 
 +^ 1 | Double | x | 
 +^ 2 | Double | y | 
 +^ 3 | Double | z | 
 +^ 4 | Double | w | 
 +===== Special functions useful for 3D geometric calculations =====
  
 ==== poc() ==== ==== poc() ====
  
-^ Argument ^ Description ^ +Determines a point on the line defined by the first two arguments (P0 and n0) which has the shortest distance to the line defined by the third and fourth arguments (P1,n1).
-^ 1 | Point to define the first line +
-^ 2 | Direction to define the first line | +
-^ 3 | Point to define the second line +
-^ 4 | Direction to define the second line |+
  
-==== pocL() ====+^ Argument ^ Description ^ Type ^ 
 +^ 1 | Point to define the first line | VECTOR_3D | 
 +^ 2 | Direction to define the first line | VECTOR_3D | 
 +^ 3 | Point to define the second line | VECTOR_3D | 
 +^ 4 | Direction to define the second line | VECTOR_3D | 
 + 
 +==== PocL() ====
  
 Point of contact straight line: The first two arguments define a straight line. The first is a point on this line and the second defines the direction of the line. A perpendicular is dropped from the point defined by the third point to this line and the result value is the point of contact in the straight line. Point of contact straight line: The first two arguments define a straight line. The first is a point on this line and the second defines the direction of the line. A perpendicular is dropped from the point defined by the third point to this line and the result value is the point of contact in the straight line.
  
-**Types:** +^ Argument ^ Description Type 
- +^ 1 | Point to define a line. | VECTOR_3D 
-^ Argument Argument 2 ^ Argument 3 Result ^ +^ 2 | Direction to define a line. | VECTOR_3D 
-| 3d vector | 3d vector | 3d vector | 3d vector | +^ 3 | Point to start a second line perpendicular to the line defined by the first two arguments. | VECTOR_3D |
- +
-**Arguments:** +
- +
-^ Argument ^ Description +
-^ 1 | Point to define a line | +
-^ 2 | Direction to define a line | +
-^ 3 | Point to start a second line perpendicular to the line defined by the first two arguments. |+
  
 === Examples === === Examples ===
  
 +<code>
    pocL(A,B,C)    pocL(A,B,C)
-    +</code>    
-==== pocP() ====+==== PocP() ====
  
-Point of contact plane: The first two arguments define a plane. The first is a point in this plane and the second defines the direction of a normal to this plan. A perpendicular is dropped from the point defined by the third point to this plane and the result value is the point of contact in the plane.+Point of contact plane: The first two arguments define a plane. The first is a point in this plane and the second defines the direction of a normal to this plane. A perpendicular is dropped from the point defined by the third point to this plane and the result value is the point of contact in the plane.
  
-**Types:** +^ Argument ^ Description Type ^  
- +^ 1 | Point to define a plane the point lays in.| VECTOR_3D 
-^ Argument Argument 2 Argument 3 ^ Result ^ +^ 2 | Normal vector of the plane (direction perpendicular to the plane to define)| VECTOR_3D 
-| 3d vector | 3d vector | 3d vector | 3d vector | +^ 3 | Point to start a line perpendicular to the plane defined by the first two arguments. | VECTOR_3D |
- +
-**Arguments:** +
- +
-^ Argument ^ Description +
-^ 1 | Point to define a plane the point lays in.| +
-^ 2 | Direction of perpendicular to the plane to define.+
-^ 3 | Point to start a line perpendicular to the plane defined by the first two arguments. |+
  
 +=== Examples ===
  
 +<code>
 +   PocP(A,B,C)
 +</code> 
  
 ==== midP() ==== ==== midP() ====
Zeile 363: Zeile 390:
  
 ^ Argument ^ Type ^ Description ^ ^ Argument ^ Type ^ Description ^
-^ 1 | Vector 3d | Point to define a the first line. | +^ 1 | VECTOR_3D | Point to define a the first line. | 
-^ 2 | Vector 3d | Direction to define the first line. | +^ 2 | VECTOR_3D | Direction to define the first line. | 
-^ 3 | Vector 3d | Point to define a the second line. | +^ 3 | VECTOR_3D | Point to define a the second line. | 
-^ 4 | Vector 3d | Direction to define the second line. |+^ 4 | VECTOR_3D | Direction to define the second line. |
  
-==== pocPL() ====+==== PocPL() ====
  
-Determines the point in the plane the arrows brakes throug the plane.+Determines the point in the plane the arrow brakes through the plane.
  
 **Arguments:** **Arguments:**
  
 ^ Argument ^ Type ^ Description ^ ^ Argument ^ Type ^ Description ^
-^ 1 | Vector 3d Point in a plane. | +^ 1 | VECTOR_3D Arbitrary point in a plane. | 
-^ 2 | Vector 3d | Normal vector of the plane. | +^ 2 | VECTOR_3D | Normal vector of the plane (normalization not needed). | 
-^ 3 | Vector 3d | Point to define arrow. | +^ 3 | VECTOR_3D | Point to define arrow. | 
-^ 4 | Vector 3d | Direction of the arrow |+^ 4 | VECTOR_3D | Direction of the arrow (normalization not needed). | 
 + 
 +=== Examples === 
 + 
 +<code> 
 +   pocPL(A,B,C,D) 
 +</code> 
 ===== Special functions useful for human motion analysis ===== ===== Special functions useful for human motion analysis =====
 ==== chordv() ==== ==== chordv() ====
Zeile 424: Zeile 457:
 ^ J | top joint position | ^ J | top joint position |
 ^ K | stick marker position | ^ K | stick marker position |
 +
 +=== Examples ===
 +
 +<code>
 +   chordv(70.5,I,J,K)
 +</code> 
 ==== chordv2() ==== ==== chordv2() ====
  
Zeile 440: Zeile 479:
 ^ offset | offset angle | ^ offset | offset angle |
 ===== Matrix manipulation functions ===== ===== Matrix manipulation functions =====
- 
-==== mat() ==== 
  
 ==== matq() ==== ==== matq() ====
 +Create a matrix from a quaternion.
 +
 +^ Argument ^ Type ^ Description ^
 +^ 1 | Double | x |
 +^ 2 | Double | y |
 +^ 3 | Double | z |
 +^ 4 | Double | w |
 +==== mat() ====
  
 ==== t() ==== ==== t() ====
 ==== mat4() ==== ==== mat4() ====
 +
 +==== R() ====
 +
 +Get a double component from a matrix defined by row and column index.
 +
 +**Arguments:**
 +
 +^ Argument ^ Type ^ Description ^
 +^ 1 | MATRIX_3X3D | Matrix to get double components from. |
 +^ 2 | INTEGER| row [0|1|2] |
 +^ 3 | INTEGER| column [0|1|2] |
 +
 +<code>
 +   R(TCPQ,0,1,2)
 +</code> 
 +===== Robotics functions =====
 +==== mdho() ====
 +Determines the Origin of a coordinate based on the modified Denavit-Hartenberg convention.
 +
 +**Arguments:**
 +
 +^ Argument ^ Type ^ Description ^
 +^ 1 | VECTOR_3D | Origin the previous coordinate system |
 +^ 2 | VECTOR_3D | Direction of the previous joint axis |
 +^ 3 | REAL| Displacement on the previous joint axis of the origin. Typically this is 0. |
 +^ 4 | VECTOR_3D | Point on the joint axis where the origin should be determined |
 +^ 5 | VECTOR_3D | Direction ofthe joint axis where the origin should be determined |
 +
 +=== Examples ===
 +
 +<code>
 +   mdhO(o1,v1,0.0,o2,v2)
 +</code> 
 +==== dhm() ====
 +Determines the 4x4 Matrix of the Denavit Hartenberg convention based the DH parameters.
 +
 +**Arguments:**
 +
 +^ Argument ^ Type ^ Description ^
 +^ 1 | REAL| theta |
 +^ 2 | REAL| alpha |
 +^ 3 | REAL| d |
 +^ 4 | REAL| r |
 +
 +
 +=== Examples ===
 +
 +<code>
 +   dhm(theta1, alpha1, d1, r1)
 +</code> 
modellingcomponents/functions.txt · Zuletzt geändert: 2021/11/09 11:22 von oliver

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki