Revision history [back]

You can use plot3d to plot your surface and then add to that Graphics object the collection of points you want to visualize:

sage: N = 3
sage: f(x,y)=x^2+y^2
sage: G = plot3d(f, (x,-N,N), (y,-N,N))
sage: points = [ (a,b,f(a,b)) for a in [-N..N] for b in [-N..N] ]
sage: G += sum(point(points, color='red'))
sage: show(G)

You can use plot3d to plot your surface and then add to that Graphics object the collection of points you want to visualize:

sage: N = 3
sage: f(x,y)=x^2+y^2
sage: G = plot3d(f, (x,-N,N), (y,-N,N))
sage: points points_list = [ (a,b,f(a,b)) for a in [-N..N] for b in [-N..N] ]
sage: G += sum(point(points, color='red'))
point(points_list, color='red')
sage: show(G)

You can use plot3d to plot your surface and then add to that Graphics object the collection of points you want to visualize:

sage: N = 3
sage: f(x,y)=x^2+y^2
sage: G = plot3d(f, (x,-N,N), (y,-N,N))
sage: points_list = [ (a,b,f(a,b)) for a in [-N..N] for b in [-N..N] ]
sage: G += point(points_list, color='red')
sage: show(G)

Here's a working demo:

http://aleph.sagemath.org/?q=784f1e88-2b61-4dd1-aa80-fb5fc0a74d70&lang=sage