Subject: how to transform array to sequence - vector3d
From: Wolfgang Lindner
Date: 10 May 2007 16:49 GMT
dear group,
I stumble over two stupid problems. [I use wxMaxima 5.12]
(Despite of the very new function vector in package draw.lisp, version 1.9 from Mario, I
have the following question.)
1. If I define a simple user function vector3d as follows:
vector3d(a,b) := block(
points_joined = true,
point_type = 6, point_size=1,
points([a,b]),
point_type = 9, point_size=2,
points([b]) )$
and call
vector3d([1,2,3],[2,4,1]);
.. so the function gives back the last entry 'points_joined = false' as return value
(which results in an error), but I need the *whole* sequence of commands inside block as
return value.
2. Similar, to define a line in 3D and to plot it I try:
Line : [2,3,0]+t*[1,-2,1];
draw3d( parametric(Line ,t,-2,2) )
.. but instead of [2+t,3-2t,t]
I need the sequence 2+t,3-2t,t as return value resp. as input for parametric().
Which Maxima concept solves these similar problems?
Any hint would be very welcome. Sorry, if the question should be too simple.
HTH Wolfgang