Tupper's self-referential formula: Difference between revisions
m
→{{header|Julia}}
m (→{{header|Julia}}: cleanup) |
|||
Line 59:
=={{header|Julia}}==
<syntaxhighlight lang="julia">import Images: colorview, Gray
import Plots: plot
setprecision(BigFloat, 8000)
""" get logical inverse of Tupper function values for white on black graphic """
function tupper_mat(k)
tmatrix =
for (i, x) in enumerate(0.0:1:105), (j, y) in enumerate(k:k+16)
tmatrix[j, 107 - i] = 1/2
end
return tmatrix
Line 83 ⟶ 84:
function test_tupper()
display(plot(colorview(Gray,
savefig("tupper.png")
end
|