Hi All
I need to draw some vectors (with draw3d for example).(and have some
(indeed 2) problems with gnuplot draws)
Even though it seems a gnuplot problem , i'd like to solve it from
the maxima prespective as that is the one i need to use.
PROBLEM 1 :
Follows an example :
8<---------------8<---------------8<---------------
draw3d(
xlabel = "axis X"
, ylabel = "axis Y"
, zlabel = "axis Z"
/* --- v12 => z' ---- */
, color = red
, head_angle = 10
, line_width = 4
, vector ( origin_point , v12 )
/* --- vx ---- */
, color = blue
, head_angle = 30
, line_width = 4
, vector ( origin_point , vx * 0.1)
);
8<---------------8<---------------8<---------------
I already calculated vx and v12 , in this case i can define them as :
8<---------------8<---------------8<---------------
/* ---- 1st define some interesting points ----------- */
(x2 : 0.5 / sqrt(3) , y2 : 0.5/sqrt(3) , z2 : 0.5/sqrt(3) , x1 : 0 ,
y1 : 0 , z1 : 0 );
/* --- define origin point -------------------*/
origin : ([ x1 , y1 , z1 ]);
/* --- v12 ---- */
v12 : ([x2 , y2 , z2 ]*0.1);
/* ----- vx from A.vx = b ------------ */
vx : linsolve_by_lu(A,b);
8<---------------8<---------------8<---------------
In this way i can perform whatever calculations i need with the
pertinent vectors and in the end just add them to the previous draw3d
instruction .As happens with vectors v12 and vx , in the previous example.
But , my gnuplot , window has z as the vertical axis.And i need y as
the vertical one instead of z.
Note : lets assume a vector defined as = ( l , m , n ) values./
/ Being so if i change the labels , and do zlabel="Y axis" ,
ylabel="Z label" (in the draw3d instruction), i get what i want , but ,
to maintain consistency , i still need to swap the values -m- and -n-,
in all vector definitions!And it is a prone error method , i 'd like to
know if there is a way to simply swap , axis drawn in the gnuplot
window , say swap z with y , for example.
PROBLEM 2 :
The output of the former expresssion , that originates vector vx , (
= linsolve_by_lu(A,b) ) returns what seems a vector , as maxima
interprets it.So when i try to use this value to draw this vector (with
the former draw3d() instrcution) i get the error :
draw (vector): coordinates are not correct*/
/*
I need to build a list out of the vx output in this ugly* *way in
order to make it work ,
vx : (
determinant(vx[1]) .
, determinant(vx[2])
, determinant(vx[3])
);
But this seems a not very elegant way .I was looking for some
function to transform a vector back to a list , or some other solution
to this problem.
Anyone can throw a solution ?
Thank You very much.