omdl  v0.6.1
OpenSCAD Mechanical Design Library
math_vector_algebra.scad File Reference

Vector algebra mathematical functions. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

function distance_pp (p1, p2)
 Compute the distance between two Euclidean points. More...
 
function is_left_ppp (p1, p2, p3)
 Test if a point is left, on, or right of an infinite line in a Euclidean 2d-space. More...
 
function dimension_2to3_v (v)
 Return 3d vector unchanged or add a zeroed third dimension to 2d vector. More...
 
function get_line_dim (l)
 Return the number of dimensions of a Euclidean line (or vector). More...
 
function get_line_tp (l)
 Return the terminal point of a Euclidean line (or vector). More...
 
function get_line_ip (l)
 Return the initial point of a Euclidean line (or vector). More...
 
function get_line2origin (l)
 Shift a Euclidean line (or vector) to the origin. More...
 
function dot_ll (l1, l2)
 Compute the dot product of two lines (or vectors). More...
 
function cross_ll (l1, l2)
 Compute the cross product of two lines (or vectors) in a Euclidean 3d or 2d-space. More...
 
function striple_lll (l1, l2, l3)
 Compute the scalar triple product of three lines (or vectors) in a Euclidean 3d or 2d-space. More...
 
function angle_ll (l1, l2)
 Compute the angle between two lines (or vectors) in a Euclidean 3d or 2d-space. More...
 
function angle_lll (l1, l2, n)
 Compute the angle between two lines (or vectors) in a Euclidean 3d-space. More...
 
function unit_l (l)
 Compute the normalized unit vector of a Euclidean line (or vector). More...
 
function are_coplanar_lll (l1, l2, l3, d=6)
 Test if three lines (or vectors) are coplanar in Euclidean 3d-space. More...
 
function get_pnorm2nv (pn, cw=true)
 Convert a planes' normal specification into a normal vector. More...
 

Detailed Description

Vector algebra mathematical functions.

Author
Roy Allen Sutton
Date
2015-2017

This file is part of omdl, an OpenSCAD mechanical design library.

The omdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

The omdl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the omdl; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA; or see http://www.gnu.org/licenses/.

Definition in file math_vector_algebra.scad.