Vectorial Calculus Algebra
Cross product, dot product, parallel and orthogonal projections, face normals โ all via expressive infix operators like .cross., .dot., .paral., .ortho.
A pure Fortran 2003+ OOP library for 3D Cartesian vector calculus.
Import VecFor, define some vectors using the built-in Cartesian versors, and perform vectorial algebra:
use vecfor
implicit none
type(vector) :: point1, point2, distance
point1 = 1 * ex ! ex is the x-direction versor [1, 0, 0]
point2 = 1 * ex + 2 * ey ! ey is the y-direction versor [0, 1, 0]
distance = point2 - point1 ! [0, 2, 0]
call distance%print ! Component x 0.000...
! Component y +2.000...
! Component z 0.000...
print *, distance%normL2() ! +2.000...Contributions are welcome โ see the Contributing page.
VecFor is distributed under a multi-licensing system:
| Use case | License |
|---|---|
| FOSS projects | GPL v3 |
| Closed source / commercial | BSD 2-Clause |
| Closed source / commercial | BSD 3-Clause |
| Closed source / commercial | MIT |
Anyone interested in using, developing, or contributing to VecFor is welcome โ pick the license that best fits your needs.