Fill a curve in 3D

Here’s a solution using Makie:

using GLMakie

x = 0:0.05:3;
y = 0:0.05:3;
z = @. sin(x) * exp(-(x+y))

fig = Figure(size=(400, 300))
ax = Axis3(fig[1,1], limits=((0,3), (0,3), (0,0.2)),
           azimuth=0.3, elevation=0.4)
lines!(Point3f.(x, 0, z))
lines!(Point3f.(0, y, z))
band!(Point3f.(x, y, 0), Point3f.(x, y, z), color=(:red, 0.5))
fig

image

I used GLMakie because CairoMakie handles the transparency poorly for some reason:

3 Likes