omdl  v0.5
OpenSCAD Mechanical Design Library

Mathematical functions. More...

#include <primitives.scad>
+ Include dependency graph for math.scad:
+ 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 points in a Euclidean 1, 2, or 3D-space. More...
 
function dot_vv (v1t, v2t, v1i, v2i)
 Compute the dot product of two vectors. More...
 
function cross_vv (v1t, v2t, v1i, v2i)
 Compute the cross product of two vectors in a Euclidean 3D-space (2D). More...
 
function striple_vvv (v1t, v2t, v3t, v1i, v2i, v3i)
 Compute scalar triple product of two vectors in a Euclidean 3D-space. More...
 
function angle_vv (v1t, v2t, v1i, v2i)
 Compute the angle between two vectors in a Euclidean 2 or 3D-space. More...
 
function angle_vvn (v1t, v2t, nvt, v1i, v2i, nvi)
 Compute the angle between two vectors in a Euclidean 3D-space. More...
 
function unit_v (vt, vi)
 Compute the normalized unit vector for a 1, 2, or 3 term vector. More...
 
function are_coplanar_vvv (v1t, v2t, v3t, v1i, v2i, v3i)
 Test if three vectors are coplanar in Euclidean 3D-space. More...
 
function ngon_vp (n, r, vr)
 Compute the vertices for an n-sided equiangular/equilateral regular polygon. More...
 
function triangle_lll2vp (s1, s2, s3)
 Compute the vertices of a plane triangle given its side lengths. More...
 
function triangle_vl2vp (v)
 Compute the vertices of a plane triangle given its side lengths. More...
 
function triangle_ppp2vl (v1, v2, v3)
 Compute the side lengths of a triangle given its vertices. More...
 
function triangle_vp2vl (v)
 Compute the side lengths of a triangle given its vertices. More...
 
function triangle_centroid_ppp (v1, v2, v3)
 Compute the centroid (geometric center) of a triangle. More...
 
function triangle_centroid_vp (v)
 Compute the centroid (geometric center) of a triangle. More...
 
function triangle_incenter_ppp (v1, v2, v3)
 Compute the coordinate for the triangle's incircle. More...
 
function triangle_incenter_vp (v)
 Compute the coordinate for the triangle's incircle. More...
 
function triangle_inradius_ppp (v1, v2, v3)
 Compute the inradius of a triangle's incircle. More...
 
function triangle_inradius_vp (v)
 Compute the inradius of a triangle's incircle. More...
 

Detailed Description

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/.

Note
Include this library file using the include statement.

Definition in file math.scad.