Package reflectometry :: Package model1d :: Package tests :: Module proj3d

Module proj3d

Functions
 
cross(a, b)
A x B = <Ay*Bz - Az*By, Az*Bx - Ax*Bz, Ax*By - Ay*Bx>
 
dist2d(p0, p1)
 
dot(a, b)
 
draw_axes(M, s=1)
 
inv_transform(xs, ys, zs, M)
 
iterable(v)
 
line2d(p0, p1)
 
line2d_dist(l, p)
 
line2d_seg_dist(p0, p1, p)
distance(s) from line defined by p0 - p1 to point(s) p
 
mk_test_proj()
 
mod(v)
 
persp_transformation(zfront, zback)
 
proj_points(points, M)
 
proj_trans_points(points, M)
 
proj_transform(xs, ys, zs, M)
 
proj_transform_vec(vec, M)
 
rot_x(V, alpha)
 
test_cross()
 
test_dot()
 
test_lines_dists()
 
test_mul()
 
test_proj()
 
test_rot()
 
test_world()
 
transform(xs, ys, zs, M)
 
view_transformation(E, R, V)
 
world_transformation(xmin, xmax, ymin, ymax, zmin, zmax)
Function Details

line2d_seg_dist(p0, p1, p)

 

distance(s) from line defined by p0 - p1 to point(s) p

p[0] = x(s) p[1] = y(s)

intersection point p = p0 + u*(p1-p0) and intersection point lies within segement if u is between 0 and 1