Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Plotting surfaces over non-rectangular domain

I'm wondering if we can plot a surface over non-rectangular domain. E.g.

plot3d(lambda x, y: 2 + sin(x) + cos(y) if y < 2*pi - x else False, (x,x0,x1), (y,y0,y1))

or something. I've tried playing with the domain like

implicit_plot3d( (s,t,2+sin(s)+cos(t)), (s,0,2*pi), (t,0 2*pi - s) )

but again no dice. I'm sure I could just draw a whole bunch of polygons but I wonder if there's a better way.

click to hide/show revision 2
retagged

Plotting surfaces over non-rectangular domain

I'm wondering if we can plot a surface over non-rectangular domain. E.g.

plot3d(lambda x, y: 2 + sin(x) + cos(y) if y < 2*pi - x else False, (x,x0,x1), (y,y0,y1))

or something. I've tried playing with the domain like

implicit_plot3d( (s,t,2+sin(s)+cos(t)), (s,0,2*pi), (t,0 2*pi - s) )

but again no dice. I'm sure I could just draw a whole bunch of polygons but I wonder if there's a better way.