Circle surface

Hi, I make first steps in Julia and I want to do circle surface. I can only makes surface on rectangles field in 3D. I will be really thankfull for tips.
I attach photo, what it should look likeimage

Do you mean something like in these examples? https://lazarusa.github.io/gnuplot-examples/menu2/#spheres

not quite, I need to make a 2D wheel in 3D

I’m not sure if you can do that with quadrilaterals, but Makie.jl can plot triangular meshes in 3D.

EDIT: See e.g. the example gallery

You can actually do this by passing matrices of x, y to surface - this is something that I do all the time in GeoMakie.

Consider this example of a sphere.

n = 20
θ = [0;(0.5:n-0.5)/n;1]
φ = [(0:2n-2)*2/(2n-1);2]
x = [cospi(φ)*sinpi(θ) for θ in θ, φ in φ]
y = [sinpi(φ)*sinpi(θ) for θ in θ, φ in φ]
z = [cospi(θ) for θ in θ, φ in φ]
surface(x, y, z)

If you want a flat sphere, you can just make the z values 0.

1 Like