juliamakie.jl

What is the easiest way to draw a sphere using Makie.jl in Julia?


I am trying to get started with Makie.jl and want to test out how to plot a simple sphere.


Solution

  • It's quite simple. Note that you need to have Makie installed which can be done via ] add Makie in the Julia REPL.

    
    using Makie
    
    scene = mesh(Sphere(Point3f0(0), 1f0))
    display(scene)
    
    

    enter image description here

    It's also worth noting that Makie windows are interactive! You can zoom in and out as well as rotate around the sphere.