scatter is not really made for these kinds of marker transformations I think, at least I tried markerspace = :data and that didn’t look correct in 3d (maybe that’s just an implementation omission in CairoMakie though).
You could use poly! and that will transform the coordinates accordingly:
f = Figure()
ax = Axis3(f[1, 1])
contour3d!(ax,
-1:0.1:1,
-1:0.1:1,
(x, y) -> -x^4+x^2 + y^2,
levels = 10,
linewidth = 4,
transparency = true
)
poly!(ax, Circle(Point2f(-0.5, -0.5), 0.2))
f
