question about plot3d



Try this:

f(x,y):=if x^2+y^2>1 then 0 else sin(x*y)$
plot3d(f(x,y),[x,-1,1],[y,-1,1])$

or also this:

load(draw)$
draw3d(parametric_surface(r*cos(theta),r*sin(theta),sin(r^2*sin(2*theta)/2),r,0,1,theta,0,2*%pi))$

See the documentation for the draw package. And also this document:
http://www.austromath.at/daten/maxima/zusatz/Graphics_with_Maxima.pdf


Le 16/11/2012 19:02, Dmitry Shkirmanov a ?crit :
> i tried this:
>
> f(x,y):=block([],
> if (y< -sqrt(1-x^2)) then return(0),
> if (y>sqrt(1-x^2)) then return(0),
> return(sin(x*y)));
>
> plot3d(
> f(x,y),[x,-1,1], [y, -1,1]
> );
>
> But this does no work. I got  graph of function sin(x*y). What is wrong?
>> Hello, list.
>>
>> By using maple it's possible to plot something like this:
>>
>> plot3d(sin(x*y), x = -1 .. 1, y = -sqrt(1-x^2) .. sqrt(1-x^2), axes = 
>> boxed);
>>
>> Here the area that coordinates x,y are changing in is a circle 
>> instead of square.
>>
>> I tried to do the same with maxima:
>> plot3d(sin(x*y),[x,-1,1],[y,-sqrt(1-x^2),sqrt(1-x^2)]);
>> But maxima says: plotting: range must be of the form [variable, min, 
>> max]; found: [y,-sqrt(1-x^2),sqrt(1-x^2)].
>>
>> So, is there any way to plot by maxima a function f(x,y) that is 
>> bounded by other functions in the x-y plane?
>> .
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>