Fix projection_on_plane() example.

This commit is contained in:
Garth Minette 2021-01-05 17:53:03 -08:00
parent d139384b36
commit 697368b3a3
2 changed files with 11 additions and 4 deletions

View file

@ -1005,10 +1005,17 @@ function plane_transform(plane) =
// Arguments:
// plane = The `[A,B,C,D]` plane definition where `Ax+By+Cz=D` is the formula of the plane.
// points = List of points to project
// Example(3D):
// points = move([10,20,30], p=yrot(25, p=path3d(circle(d=100))));
// plane = plane3pt([1,0,0],[0,1,0],[0,0,1]);
// Example(3D,FlatSpin):
// plane = plane_from_normal([1,0,1]);
// proj = projection_on_plane(plane,points);
// color("red") move_copies(points) sphere(d=2,$fn=12);
// color("blue") move_copies(proj) sphere(d=2,$fn=12);
// rot(from=UP,to=plane_normal(plane)) {
// left(10) {
// anchor_arrow(30);
// %cube([120,150,0.1],center=true);
// }
// }
function projection_on_plane(plane, points) =
assert( _valid_plane(plane), "Invalid plane." )
assert( is_path(points), "Invalid list of points or dimension." )

View file

@ -6,7 +6,7 @@
//////////////////////////////////////////////////////////////////////
BOSL_VERSION = [2,0,514];
BOSL_VERSION = [2,0,515];
// Section: BOSL Library Version Functions