vector3d



On Wednesday 19 March 2008 18:13, Robert Dodier wrote:

> (1) vect.mac preserves expressions a foo b as such, and
> expands them into expressions in the coordinate basis upon
> request (via express); vector.mac immediately expands.

In my opinion, vect.mac approach is better. Anyway, this behavior could be 
controlled by some flag.

> (3) vect.mac uses the symbols "." and "~" instead of the
> names "dot" and "curl" like vector.mac.
> [...] "." and "~" should be renamed to "dot" and "curl".

Okay, but here "~" is the cross-product operator, so it should be 
named "cross"; "curl" is the other vector calculus operator (also known 
as "rot").

"." confuses anyway since "listarith" is "true" by default, so "." works just 
like "dot" operator for lists (vectors are represented as lists in 
vect/vector):

(%i1) [1,2,3] . [4,5,6];
(%o1)                               32
(%i2) [4,5,6] . [1,2,3];
(%o2)                               32
(%i3) [4,5,6] . [1,2,3], listarith:false;
(%o3)                      [4, 5, 6] . [1, 2, 3]

Also, "arithmetics on lists" expands x*[a,b,c] to [a*x,b*x,c*x] and x+[a,b,c] 
to [a+x,b+x,c+x]. It is very bad for vector lists. For example, 
when "listarith" is "true"

(%i1) x + [a,b,c];
(%o1)                      [x + a, x + b, x + c]
(%i2) [d,e,f] + [a,b,c]; /* Gives the expected result */
(%o2)                      [d + a, e + b, f + c]
(%i3) at(x+[a,b,c], [x=[d,e,f]]); /* Gives unexpected result */
(%o3) [[d + a, e + a, f + a], [d + b, e + b, f + b], [d + c, e + c, f + c]]
(%i4) at(x+[a,b,c], [x=[d,e,f]]), listarith:false; /* Will not be expanded */
(%o4)                      [d, e, f] + [a, b, c]

So I think that vector package should set "listarith:false" and do expansions 
only upon request.

Well, "dot" could be introduced to denote not only vector-vector, but also 
scalar-vector commutative multiplication and we can use "*" only for 
scalar-scalar multiplication. Replacing "+" as vector-vector sum operator by 
something else ("plus"?) is bad idea... If we do so, we'll get peculiar 
syntax ("(x cross y plus -z) dot u dot v"), but it will remove "listarith" 
issues. What do you think?

> (4) vector.mac defines some operators not known to vect.mac,
> namely dotdel, curlgrad, graddiv, divrurl, and christoffel.

Christoffel symbols are belong to tensor analysis, but not to vector calculus, 
I think they should be removed from vector packages since the ctensor already 
knows about them.

The directional derivative denoted as "dotdel" should be implemented in some 
way. As for curlgrad, graddiv, divcurl, curlcurl, they could be preserved, 
but they are not very important.

-- 
Alexey Beshenov <al at beshenov.ru>
http://beshenov.ru/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20080319/abb2e4ce/attachment.pgp