日本語
English
Vectors
Samples
Create a 3D vector (Vector3D)

Input
- x
- X axis
- y
- Y axis
- z
- Z axis
Output
- out
- Direction vector
3D vector structure
| sVector | Direction vector |
| x | X axis |
| y | Y axis |
| z | Z axis |
Example

Input
- x
- 2.0
- y
- 1.0
- z
- 0.0
Output
- out
- out.x=2.0
out.y=1.0
out.z=0.0
Addition (vecADD)

Input
- a
- Vector 1
- b
- Vector 2
Output
- out
- Direction vector
Example

Input
- a
- a.x=3.0
a.y=2.0
a.z=1.0 - b
- b.x=1.0
b.y=4.0
b.z=2.0
Output
- out
- out.x=4.0
out.y=6.0
out.z=3.0
[Formula]
\[ \overrightarrow{a}+\overrightarrow{b}=(a_x+b_x,\ a_y+b_y,\ a_z+b_z) \]
Subtraction (vecSUB)

Input
- a
- Vector 1
- b
- Vector 2
Output
- out
- Direction vector
Example

Input
- a
- a.x=3.0
a.y=2.0
a.z=1.0 - b
- b.x=1.0
b.y=4.0
c.z=2.0
Output
- out
- out.x=2.0
out.y=-2.0
out.z=-1.0
Formulas
\[ \overrightarrow{a}-\overrightarrow{b}=(a_x-b_x,\ a_y-b_y,\ a_z-b_z) \]
Scalar multiplication (vecMUL)

Input
- vec
- Vectors
- k
- Multiplier
Output
- out
- Direction vector
Example

Input
- vec
- vec.x=3.0
vec.y=2.0
vec.z=1.0 - k
- 2.0
Output
- out
- out.x=6.0
out.y=4.0
out.z=2.0
Formulas
\[ k\overrightarrow{a}=(ka_x,\ ka_y,\ ka_z) \]
Hadamard product (vecMultiply)

Input
- a
- Vector 1
- b
- Vector 2
Output
- out
- Direction vector
Example

Input
- a
- a.x=3.0
a.y=2.0
a.z=1.0 - b
- b.x=1.0
b.y=4.0
b.z=2.0
Output
- out
- out.x=3.0
out.y=8.0
out.z=2.0
Formulas
\[ \overrightarrow{a}\odot\overrightarrow{b} = (a_xb_x,\ a_yb_y,\ a_zb_z) \]
Cross product (vecCross)

Input
- a
- Vector 1
- b
- Vector 2
Output
- out
- Direction vector
Example

Input
- a
- a.x=3.0
a.y=2.0
a.z=1.0 - b
- b.x=1.0
b.y=4.0
b.z=2.0
Output
- out
- out.x=0.0
out.y=-5.0
out.z=10.0
Formulas
\[ \overrightarrow{a} \times \overrightarrow{b}= \begin{pmatrix} a_yb_z-a_zb_y \\ a_zb_x-a_xb_z \\ a_xb_y-a_yb_x \end{pmatrix} \]
Comparison (vecEQ)

Input
- a
- Vector 1
- b
- Vector 2
Example
Formulas
\[ a_x=b_x\ AND\ a_y=b_y\ AND\ a_z=b_z \]
Dot product (vecDot)

Input
- a
- Vector 1
- b
- Vector 2
Output
- out
- Result
Example

Input
- a
- a.x=3.0
a.y=2.0
a.z=1.0 - b
- b.x=1.0
b.y=4.0
b.z=2.0
Output
- out
- 13
Formulas
\[ result = a_xb_x+a_yb_y+a_zb_z \]
Norm (vecNorm)

Input
- a
- Vectors
Output
- out
- Result
Example

Input
- a
- a.x=3.0
a.y=2.0
a.z=1.0
Output
- out
- 3.742
Formulas
\[ result = \sqrt{a_x^2+a_y^2+a_z^2} \]
