79 ) = !is_list(v) ? false
98 ) = !is_list(v) ? false
99 : (len(v) == 1) && !
is_point(v[0]) ? false
117 ) = !is_list(v) ? false
118 : (len(v) != 2) ?
false
121 : (len(v[0]) != len(v[1])) ?
false
163 : !is_list(v) ? false
164 : (len(v) != 3) ?
false
168 : (len(v[0]) != len(v[1])) ?
false
169 : (len(v[1]) != len(v[2])) ?
false
197 : !is_undef(p2) && !
is_point(p2) ? undef
199 sqrt(
sum([
for (i=[0:len(p1)-1]) p1[i]*p1[i]]))
200 : sqrt(
sum([for (i=[0:len(p1)-1]) (p1[i]-p2[i])*(p1[i]-p2[i])]));
272 : ((p2[0]-p1[0]) * (p3[1]-p1[1]) - (p3[0]-p1[0]) * (p2[1]-p1[1]));
298 x = (w * v) / (v * v)
350 : (len(p) == 3) ? p : [p[0], p[1], 0];
385 let( lx = (p1[0]*(p2[1]-y) + p2[0]*(y-p1[1])) / (p2[1]-p1[1]) )
390 : let( ly = (p1[1]*(p2[0]-x) + p2[1]*(x-p1[0])) / (p2[0]-p1[0]) )
431 : !is_undef(p2) ? !
is_point(p2) ? undef
436 : !is_undef(v) ? !
is_vol(v) ? undef
441 : [p1, p1 + m*[cos(a), sin(a)]];
475 : !is_undef(p2) ? !
is_point(p2) ? undef
480 : !is_undef(v) ? !
is_vol(v) ? undef
485 : [p1, p1 + m*[sin(t)*cos(a), sin(t)*sin(a), cos(t)]];
523 ) = !is_undef(p2) ? !
is_point(p2) ? undef
526 pd = !is_undef(p1) ? p1
533 : !is_undef(v) ? !
is_vol(v) ? undef
536 pd = !is_undef(p1) ? p1
547 [pd, pd + m*[cos(a), sin(a)]]
555 [pd, pd + m*[sin(t)*cos(a), sin(t)*sin(a), cos(t)]];
571 ) =
is_vector(l) ? (len(l) == 1) ? len( l[0] ) : len( l )
589 ) =
is_vector(l) ? (len(l) == 1) ? l[0] : l
610 d = (len(l) == 1) ? len(l[0]) : len(l)
630 ) =
is_vector(l) ? (len(l) == 1) ? l[0] : l
632 : (len(l) == 1) ? l[0]
633 : (len(l) == 2) ? (l[1]-l[0])
657 : !is_undef(p) && !
is_point(p) ? undef
692 : (len(l1) != len(l2)) ? undef
725 : (len(l1) != len(l2)) ? undef
761 : (len(l1) != len(l2)) ? undef
762 : (len(l2) != len(l3)) ? undef
808 ((sa < 0) && (s ==
false)) ? sa+360
841 : (len(l1) != len(l2)) ? undef
842 : (len(l2) != len(n)) ? undef
894 : (len(l1) != len(l2)) ? undef
895 : (len(l2) != len(l3)) ? undef
940 : cross(q[0]-q[1], q[2]-q[1]) * ((cw == true) ? 1 : -1);
origin2d
<point-2d> The origin point coordinate in 2d Euclidean space.
origin3d
<point-3d> The origin point coordinate in 3-dimensional Euclidean space.
function is_vector(v)
Test if a value defines a Euclidean vector.
function line_tp(l)
Return the terminal point of a line or vector.
function line_new(m=1, a=0, t, p1, p2, v)
Construct a directed line.
function dot_ll(l1, l2)
Compute the dot product of two lines or vectors in a 3d or 2d-space.
function are_coplanar_lll(l1, l2, l3, d=6)
Test if three lines or vectors are coplanar in 3d-space.
function point_closest_pn(p, n, np)
Compute the coordinates of the closest point on a plane to a given point.
function angle_ll(l1, l2, s=true)
Compute the angle between two lines or vectors in a 3d or 2d-space.
function line3d_new(m=1, a=0, t=90, p1=origin3d, p2, v)
Construct a 3 dimensional directed line.
function line_dim(l)
Return the number of dimensions of a line or vector.
function striple_lll(l1, l2, l3)
Compute the scalar triple product of three lines or vectors in a 3d or 2d-space.
function angle_lll(l1, l2, n)
Compute the angle between two lines or vectors in a 3d-space.
function is_point(v)
Test if a value defines a point.
function distance_pn(p, n, np)
Compute the shortest distance between a point and a plane.
function vol_to_origin(l)
Convert line to vector by shifting it to the origin.
function point_to_3d(p)
Return 3d point unchanged or add a zeroed third dimension to 2d point.
function vol_to_point(l, p)
Convert a vector to a line or move a line to another coordinate point.
function line_ip(l)
Return the initial point of a line or vector.
function cross_ll(l1, l2)
Compute the cross product of two lines or vectors in a 3d or 2d-space.
function is_left_ppp(p1, p2, p3)
Test if a point is left, on, or right of an infinite line in a 2d-space.
function line2d_new(m=1, a=0, p1=origin2d, p2, v)
Construct a 2 dimensional directed line.
function unit_l(l)
Compute the normalized unit vector of a line or vector.
function interpolate2d_l_pp(p1, p2, x, y)
Linearly interpolate along a line established by two points in 2d.
function plane_to_normal(n, cw=true)
Convert a planes' normal specification into a normal vector.
function point_closest_pl(p, l)
Compute the coordinates of the closest point on a line to a given point.
function is_line(v)
Test if a value defines a line.
function distance_pl(p, l)
Compute the shortest distance between a point and a line.
function is_plane(v)
Test if a value defines a plane.
function is_vol(v)
Test if a value defines a vector or a line.
function distance_pp(p1, p2)
Compute the distance between two points.
function all_numbers(v, c=0)
Test if all elements of an iterable value are numbers.
function round_d(v, d=6)
Round a list of numbers to a fixed number of decimal point digits.
function consts(l, v, u=false)
Create a list of constant or incrementing elements.
function sum(v, i1, i2)
Compute the sum of a list of numbers.
function is_between(v, l, u)
Test if a numerical value is between an upper and lower bounds.
function is_number(v)
Test if a value is a number.