1 /* Copyright (C) 2004 Viktor T. Toth <http://www.vttoth.com/>
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU General Public License as
5 * published by the Free Software Foundation; either version 2 of
6 * the License, or (at your option) any later version.
8 * This program is distributed in the hope that it will be
9 * useful, but WITHOUT ANY WARRANTY; without even the implied
10 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
16 if get('ctensor,'version)=false then load(ctensor);
17 ("To select a stock metric, use ct_coordsys")$
19 ct_coordsys(spherical);
21 ("The metric tensor is stored in the array lg")$
24 ("A call to cmetric() sets up the inverse and other properties")$
29 ("Most metrics are available also as a frame base")$
31 ct_coordsys(spherical);
33 ("The inverse frame base is in the array fri; lfg is the frame metric")$
37 ("Now, cmetric computes the frame base, and also the metric")$
43 ("You can also supply a set of transformation rules to ct_coordsys")$
44 ct_coordsys([r*cos(theta)*cos(phi),r*cos(theta)*sin(phi),
45 r*sin(theta),[r,theta,phi]]);
50 /* End of demo -- comment line needed by MAXIMA to resume demo menu */