Arrows on hemisphere



using Makie

scene = mesh(Sphere(Point3f0(0), 0.9f0), transparency=true, alpha=0.05)

function cosine_weighted_sample_hemisphere()
    θ = acos(sqrt(rand()))
    ϕ = 2π * rand()

    Point3f0(sin(θ)cos(ϕ), cos(θ), sin(θ)sin(ϕ))
end

N = 100

dirs = [cosine_weighted_sample_hemisphere() for i in 1:N]

arrows!(
    scene,
    fill(Point3f0(0), N),
    dirs,
    arrowcolor=:red,
    arrowsize=0.1,
    linecolor=:red
)