Sunflower fractal: Difference between revisions

Content added Content deleted
m (Convert to a task.)
(julia example)
Line 162: Line 162:


</lang>
</lang>


=={{header|Julia}}==
<lang julia>using Makie

function sunflowerplot()
len = 2000
ϕ = 0.5 + sqrt(5) / 2
r = LinRange(0.0, 100.0, len)
θ = zeros(len)
markersizes = zeros(Int, len)
for i in 2:length(r)
θ[i] = θ[i - 1] + 2π * ϕ
markersizes[i] = div(i, 500) + 3
end
x = r .* cos.(θ)
y = r .* sin.(θ)
scene = Scene(backgroundcolor=:green)
scatter!(scene, x, y, color=:gold, markersize=markersizes, strokewidth=1, fill=false, show_axis=false)
end

sunflowerplot()
</lang>



=={{header|Microsoft Small Basic}}==
=={{header|Microsoft Small Basic}}==