Ignore this posting. The question was answered already in comp.soft-sys.math.maple. The problem was the use of point as the first argument of rotation. Change the two lines

> rotation(point,P,evalf(theta),el);
> coordinates(%);


> rotation(PP,P,evalf(theta),el);
> coordinates(PP);

and the procedure will work.


When I execute the procedure Rot below it works fine the first time but a second execution gives an error message? Is there a way to fix this problem? I have to do a restart to make it work again.

The procedure Rot(Pt, theta, P1,P2) is meant to rotate (in 3-space) the point Pt theta radians about the line determined by P1 and P2 where Pt, P1 and P2 are three element lists.

> restart:
> with(geom3d):
> Rot:=proc(Pt,theta,P1,P2)
> local el,P,A,B,C;
> point(A,P1);
> point(B,P2);
> point(P,Pt):
> line(el,[A,B]):
> rotation(point,P,evalf(theta),el);
> coordinates(%);
> end proc:
> Rot([1,0,0],Pi/4,[0,0,0],[0,0,1]);

[0.7071067811, 0.7071067813, 0.]

> Rot([1,0,0],Pi/4,[0,0,0],[0,0,1]);
Error, (in geom3d:-line) wrong type of arguments

Please Wait...