Julia Makie supports recording of animated gif, etc. I wish to utilize this feature to create an animation of a Turing machine’s tape. I’d like the tape to appear such as follows (created using HTML) …
My attempt at this in Julia appears below …
using CairoMakie
function mainFunction()
figure = Figure()
colgap!( figure.layout, 0 )
Textbox( figure[1,1], placeholder = "☐", bordercolor = :black, cornerradius = 0, borderwidth = 2 )
Textbox( figure[1,2], placeholder = "A", bordercolor = :black, cornerradius = 0, borderwidth = 2 )
Textbox( figure[1,3], placeholder = "B", bordercolor = :black, cornerradius = 0, borderwidth = 2 )
Textbox( figure[1,4], placeholder = "C", bordercolor = :black, cornerradius = 0, borderwidth = 2 )
Textbox( figure[1,5], placeholder = "☐", bordercolor = :black, cornerradius = 0, borderwidth = 2 )
save( "Turing_machine_tape.png", figure )
end # function mainFunction
mainFunction()
The above Julia program creates an image that suffers from the following “deficiencies” …
- has tape cells farther apart than I would like (as I wish to display as many cells as possible horizontally)
- does not have uniform cell-width (A, B, C cells seem narrower than cells)
- does not have cell contents in black (as A, B, C, and appear to be grey)
How may I correct these “deficiencies” in the Julia-generated image?