Created
April 14, 2021 14:57
-
-
Save mschauer/6e1977a5282686513f5f7eb19d9331dd to your computer and use it in GitHub Desktop.
Calibration test image for Makie
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Makie | |
| using Colors | |
| n = 100 | |
| f(x) = 0.5 .*reim(((x[1] + x[2]*im)/33)^2) | |
| function f2(x) | |
| 0.5.*abs(2*(x[1] + x[2]*im)/1089) | |
| end | |
| #f(x) = (x[1],x[2]) | |
| #f2(x) = 1.0 | |
| αs = vec(CartesianIndices((n,n))) | |
| βs = (f.(αs)) | |
| Δ = [f2(α) for α in αs] | |
| γ = (1-pi/4) | |
| fig, ax, plot = scatter(first.(βs), last.(βs), markersize=Δ, color=:black, strokewidth=0, markerspace=SceneSpace) | |
| ax.aspect=DataAspect() | |
| lines!([1.2, 1.2], [0, 15], linewidth=50, color=RGB(γ, γ, γ)) |
Author
Author
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


The true value for the aliased grey should be
#373737orgrey(1-pi/4), because the image is a distorted square circle packing and each disk covers pi/4 of a square