How to plot a surface with Makie by using corner points?


I have x, y, z corner points of a plane as follows.

x = [-24.576 24.576 24.576 -24.576]
y = [20.0 20.0 20.0 20.0]
z = [-24.576 -24.576 24.576 24.576]

I am trying to plot the surface with Makie using following commands,

using Makie
AbstractPlotting.surface(x, z,y , color=:blue, alpha=0.5)

But I am getting error as following

ERROR: No overload for Surface{...} and also no overload for trait AbstractPlotting.SurfaceLike() found! Arguments: (Scene, Array{Float64,2}, Array{Float64,2}, Array{Float64,2})

Can anyone help me to solve this issue and plot the surface?

Thanks in Advance !

You can plot it as a mesh:

using Makie, GeometryTypes
x = [-24.576, 24.576, 24.576, -24.576]
y = [20.0, 20.0, 20.0, 20.0]
z = [-24.576, -24.576, 24.576, 24.576]
triangle_indices = [1, 2, 3, 3, 4, 1]
mesh(x, y, z, triangle_indices)

@sdanisch : Your reply is awesome and it works great. I am really thankful to you. I have a small question related to your reply. I am trying to change the colour and transparency. But it is not working? I tried like below:
Makie.mesh!(scene,x, y, z, triangle_indices, alpha=0.01, transparency=true)

Could you please comment on my try?

Thanks and Regards,

the alpha keyword is still not implemented :frowning:

mesh(x, y, z, triangle_indices, color = (:green, 0.5), transparency = true)

@sdanisch : Thank you…:slight_smile: Everything working fine :ok_hand: