1 | initial version |
Since both sqrt(3)*x-y
and -sqrt(3)*x+sqrt(3)-y
must be positive to define your region, multiply the two together:
var('x y')
contour_plot((x^2) * cos(x*y), (x,0,1), (y,0,sqrt(3)/2),
region=(sqrt(3)*x-y)*( -sqrt(3)*x+sqrt(3)-y), fill=True, contours=30)
Here's a live example.
2 | No.2 Revision |
Since both sqrt(3)*x-y
and -sqrt(3)*x+sqrt(3)-y
must be positive to define your region, multiply the two together:
var('x y')
contour_plot((x^2) * cos(x*y), (x,0,1), (y,0,sqrt(3)/2),
region=(sqrt(3)*x-y)*( -sqrt(3)*x+sqrt(3)-y), region=(sqrt(3)*x-y)*(-sqrt(3)*x+sqrt(3)-y), fill=True, contours=30)
Here's a live example.