import numpy
var('x,y')
g(x,y)=sin(x**2+y**2)
x=numpy.arange(-5,5,0.01)
y=x
plot3d(g(x,y))

where 0.01 is the increment

On Wed, Nov 18, 2009 at 9:35 AM, kcrisman <[email protected]> wrote:

>
>
> On Nov 18, 12:16 pm, Laurent <[email protected]> wrote:
> > Hi.
> >
> > I'm writing the following code in order to plot sin(x^2+x^2) :
> >
> > var('x,y')
> > g(x,y)=sin(x**2+y**2)
> > plot3d(g(x,y),(x,-5,5),(y,-5,5))
> >
> > My problem is that the result is quite bad because of the sampling : all
> > the points with x^2+y^2=pi/2 are not taken, so that I don't get
> > beautiful circles.
> >
> >
>
> Not sure why this isn't documented, but try
>
> sage: plot3d(g(x,y),(x,-5,5),(y,-5,5),plot_points=200)
>
> or whatever you need.  It should go reasonably fast on a reasonably
> modern computer.
>
> - kcrisman
>
> --
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>



-- 
Ajay Rawat
Kalpakkam, IGCAR

-------------------------------------------------------------------------
Save Himalayas....
-------------------------------------------------------------------------

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to