Hello MG,
Take a look at share/contrib/vector3d, which has some code for vectors
in R^3. Unfortunately, Maxima has seen various vector implementations,
and I don't really know which one is best. From time to time I think I
should work on that ... maybe someday soon.
A few less important comments.
On 2012-12-06, M G Berberich <berberic at fmi.uni-passau.de> wrote:
> I'm declaring vectors from R? by a macro:
>
> r3vect(x) := for i in x do i :: [ i[1], i[2], i[3] ];
Well, the standard terminology for something defined by := is that it is
a function. A macro is defined by ::= and has somewhat different
properties.
> A vector named ?x? can not be declared this way. Why is this?
It is a consequence of dynamic (i.e. not lexical) binding of the
function argument x. Inside the function, x is the same symbol as
outside. There has been some work on lexical binding for Maxima symbols,
but until that is implemented, really the only thing to do is to use an
"unusual" symbol for the argument, e.g. x% or xx instead of x.
Hope this helps,
Robert Dodier