# Plotting over simple geometric region gives error invalid domain dimension

This is my first time posting a question. In general, I am trying to plot a polynomial over a parallelogram but ran into trouble with a square.

f[x_, y_] := x + y;
domain = Parallelogram[{1/4, 0}, {{1/4, 0}, {0, 1/4}}];
Plot3D[f[x, y], {x, y} ϵ domain]


This gives the error

Plot3D::idomdim: {x,y}ϵdomain does not have a valid dimension as a plotting domain.


I don't get an error if I provide the plotting domain another way

Plot3D[f[x, y], {x, 1/4, 1/2}, {y, 0, 1/4}]


I'm running Mathematica 11.3

• It looks like the Region needs to be a MeshRegion.. perhaps try Plot3D[f[x,y],{x,y}\[Element]DiscretizeRegion@domain]. It would be nice if the documentation was clearer about this.
– chuy
Aug 29, 2018 at 17:59
• Thanks @chuy! It's just odd that for most regions plotting works without DiscretizeRegion. For example, plotting over domain = Parallelogram[{1/4, 1/4}, {{1/4, 0}, {0, 1/4}}]; works fine. Aug 29, 2018 at 18:08

This is due to a bug in RegionDimension:

RegionDimension[Parallelogram[{1/4, 0}, {{1/4, 0}, {0,1/4}}]]


1

Please report this issue to support. As a workaround, make sure that the first direction is not identical to the origin (here I just scale the directions):

f[x_, y_] := x + y;
domain = Parallelogram[{1/4, 0}, 2 {{1/4, 0}, {0,1/4}}];
Plot3D[f[x,y], {x,y} ϵ domain]