VecMath REPL shell
Features
The VecMath REPL shell is a tool developed specifically for students Game Development at Digital Arts and Entertainment. The goal is to make it easier to execute the typical vector operations such as cross and dot products, linear combinations and calculating 3D rotations with quaternions.
Quick examples
Vectors and dot product
vecmath>v1=[2,3,4]
vecmath>v2=[3,4,5]
vecmath>d = v1.v2
vecmath>print d
[38]
1
2
3
4
5
2
3
4
5
Vectors and cross product
vecmath>v1=[2,3,4]
vecmath>v2=[3,4,5]
vecmath>n = v1 # v2
vecmath>print n
n = [-1,2,-1]
1
2
3
4
5
2
3
4
5
Normalize
vecmath>v1=[2,3,4]
vecmath>v1n = v1 / |v1|
v1n = [0.371391,0.557086,0.742781]
1
2
3
2
3