plotting a function of three variables



>From Maths Mathematica Geometry Crew, Fri Aug 02, at 13:37:
 .>From Valerij Pipin, Fri Aug 02, at 20:12:
 . (...) 
 . .If you have the function of three vars it could be visualized 
 . in 4 dim space or you might look at section
 . .in 3D by plotting the sequence of graphs ff(x,y,{t=1...}).
 .i feel embaressed with 4-d real spaces, i prefer to look at sections... so 
 .how to plot f(x,y,t) at t=1.3 ? 
 .


Sorry, i have just found that the assignment:
  t : 1.3 ; 

is enough to plot f(x,y,t) at t=1.3

The actual function (here enclosed) i am working on still cannot be
plotted, for other reasons:

 (C41) PLOT3D(P21(e1, e2, t), [e1, - 1, 1], [e2, - 1, 1], [NTICKS, 100]) ;
 Division by 0
 -- an error.  Quitting.  To debug this try DEBUGMODE(TRUE);)


Any help?

thank you 

--
Paolo Pumilia



----------------------------------------- plotfunc-3.mx: 
/* pol, 29 jul 2002
   Matrix computations  
   to be loaded by maxima, by the command
   batch("plotfunc-3.mx");
*/  

writefile("plotfunc-3.log");
chi : 1.0 ;
V   : 1.0 ;
e1  : chi*s1 ;
e2  : chi*s2 ;

r : (e1^3 + e2^3) / (e1 + e2) ;

f1 :  108*(e1 - e2)*(e1*e2 - V) ;
f2 : -(2*V^2 + r)/3 ;
f3 : -(f1^(1/3) - 36*f2*f1^(-1/3))/6 ;
f4 : -%i*sqrt(3)*(f1^(1/3) + 36*f2*f1^(-1/3))/6 ;
f5 :  f4 - f3/2 ;
f6 :  -f4 ;
f7 :  -f4 - f3/2 ;
g1 :  f4 + 3*f3/2 ;
g2 :  f4 - 3*f3/2 ;
g3 :  -2*f4 ;

r3 : (f3^3 - e1^3) / (f3 - e1) ;
r5 : (f5^3 - e1^3) / (f5 - e1) ;
r7 : (f7^3 - e1^3) / (f7 - e1) ;

detv : g2*r7 + g1*r5 - 2*f4*r3 ;
o_ab : f3/2 - f4 ; 
o_ac : f3/2 + f4 ; 
o_bc : 2*f4 ; 

k1 : (4*f4^(2)*(r3-r-V^2)^2 + g1^(2)*(r5-r-V^2)^2+g2^(2)*(r7-r-V^2)^2) / (V^2*detv^2) ;
k2 : (4*f4^(2)*(f3+e2)^2 + g1^(2)*(f5+e2)^2 + g2^(2)*(f7+e2)^2) / (detv^2) ;
k3 : V^2*(4*f4^(2) + g1^(2) + g2^(2)) / (detv^2) ;

amp_ab1 :  (2*f4*(r3-r-V^2)*g1*(r5-r-V^2)) / (V^2*detv^2) ;
amp_ac1 :  (2*f4*(r3-r-V^2)*g2*(r7-r-V^2)) / (V^2*detv^2) ;
amp_bc1 :  (2*g1*(r5-r-V^2)*g2*(r7-r-V^2)) / (V^2*detv^2) ;
amp_ab2 :  (2*f4*(f3+e2)*g1*(f5+e2)) / (detv^2) ;
amp_ac2 :  (2*f4*(f3+e2)*g2*(f7+e2)) / (detv^2) ;
amp_bc2 :  (2*g1*(f5+e2)*g2*(f7+e2)) / (detv^2) ;
amp_ab3 :  V^2*(2*f4*g1) / (detv^2) ;
amp_ac3 :  V^2*(2*f4*g2) / (detv^2) ;
amp_bc3 :  V^2*(g1*g2) / (detv^2) ;




t : 1;

P21(e1,e2,t) := k1 - k2 +  2*(amp_ab1 - amp_ab2)*cos(o_ab*t)  
               +  2*(amp_ac1 - amp_ac2)*cos(o_ac*t)  
	       +  2*(amp_bc1 - amp_bc2)*cos(o_bc*t);


P32(e1,e2,t) := k2 - k3 +  2*(amp_ab2 - amp_ab3)*cos(o_ab*t)  
               +  2*(amp_ac2 - amp_ac3)*cos(o_ac*t)  
	       +  2*(amp_bc2 - amp_bc3)*cos(o_bc*t);

plot3d(P21(e1,e2,t),[e1,-1,1],[e2,-1,1],[nticks,100]);
------------------------------------------