Death Star: Difference between revisions

m (→‎{{header|Perl 6}}: fix file open error handling)
Line 874:
 
</lang>
 
=={{header|Julia}}==
<lang julia>using Makie
# run from the Julia REPL command line
n = 20
θ = [0;(0.5:n-0.5)/n;1]
φ = [(0:2n-2)*2/(2n-1);2]
x = [(x1 = cospi(φ)*sinpi(θ)) > 0.85 ? 0.85 : x1 for θ in θ, φ in φ]
y = [sinpi(φ)*sinpi(θ) for θ in θ, φ in φ]
z = [cospi(θ) for θ in θ, φ in φ]
 
plt = surface(x, y, z, color = rand(RGBAf0, 124, 124))
axis = plt[Axis]
axis[:showgrid] = (false,false,false)
axis[:showaxis] = (false,false,false)
</lang> {{output}}[[File:deathstar-julia.jpg|300px|Death Star]]
 
 
=={{header|LSL}}==
4,103

edits