| |
- angle_3p(p1, p2, p3)
- Returns the angle, in radians, rotating vector p2p1 to vector p2p3.
arg keywords:
p1 - a vector
p2 - a vector
p3 - a vector
returns: a number
In 2D, the angle is a signed angle, range [-pi,pi], corresponding
to a clockwise rotation. If p1-p2-p3 is clockwise, then angle > 0.
In 3D, the angle is unsigned, range [0,pi]
- cc_int(p1, r1, p2, r2)
- Intersect circle (p1,r1) circle (p2,r2)
where p1 and p2 are 2-vectors and r1 and r2 are scalars
Returns a list of zero, one or two solution points.
- cl_int(p1, r, p2, v)
- Intersect a circle (p1,r) with line (p2,v)
where p1, p2 and v are 2-vectors, r is a scalar
Returns a list of zero, one or two solution points
- cr_int(p1, r, p2, v)
- Intersect a circle (p1,r) with ray (p2,v) (a half-line)
where p1, p2 and v are 2-vectors, r is a scalar
Returns a list of zero, one or two solutions.
- cs_transform_matrix(from_cs, to_cs)
- returns a transform matrix from from_cs to to_cs
- distance_2p(p1, p2)
- Returns the euclidean distance between two points
arg keywords:
p1 - a vector
p2 - a vector
returns: a number
- is_acute(p1, p2, p3)
- returns True iff angle p1,p2,p3 is acute, i.e. less than pi/2
- is_clockwise(p1, p2, p3)
- returns True iff triangle p1,p2,p3 is clockwise oriented
- is_counterclockwise(p1, p2, p3)
- returns True iff triangle p1,p2,p3 is counterclockwise oriented
- is_flat(p1, p2, p3)
- returns True iff triangle p1,p2,p3 is flat (neither clockwise of counterclockwise oriented)
- is_left_handed(p1, p2, p3, p4)
- return True if tetrahedron p1 p2 p3 p4 is left handed
- is_obtuse(p1, p2, p3)
- returns True iff angle p1,p2,p3 is obtuse, i.e. greater than pi/2
- is_right_handed(p1, p2, p3, p4)
- return True if tetrahedron p1 p2 p3 p4 is right handed
- ll_int(p1, v1, p2, v2)
- Intersect line though p1 direction v1 with line through p2 direction v2.
Returns a list of zero or one solutions
- lr_int(p1, v1, p2, v2)
- Intersect line though p1 direction v1 with ray through p2 direction v2.
Returns a list of zero or one solutions
- make_hcs_2d(a, b)
- build a 2D homogeneus coordiate system from two vectors
- make_hcs_2d_scaled(a, b)
- build a 2D homogeneus coordiate system from two vectors, but scale with distance between input point
- make_hcs_3d(a, b, c)
- build a 3D homogeneus coordiate system from three vectors
- make_hcs_3d_scaled(a, b, c)
- build a 3D homogeneus coordiate system from three vectors
- pivot_scale_3D(pivot, scale)
- rotate_2D(angle)
- rr_int(p1, v1, p2, v2)
- Intersect ray though p1 direction v1 with ray through p2 direction v2.
Returns a list of zero or one solutions
- scale_3D(sx, sy, sz)
- sign(x)
- Returns 1 if x>0, return -1 if x<=0
- sss_int(p1, r1, p2, r2, p3, r3)
- Intersect three spheres, centered in p1, p2, p3 with radius r1,r2,r3 respectively.
Returns a list of zero, one or two solution points.
- test1()
- test_ll_int()
- test random line-line intersection. returns True iff succesful
- test_rr_int()
- test random ray-ray intersection. returns True iff succesful
- test_sss_int()
- transform_point(point, transform)
- transform a point from from_cs to to_cs
- translate_2D(dx, dy)
- translate_3D(dx, dy, dz)
- uniform_scale_3D(scale)
|