-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Luxor, Cairo, and Turtle graphics #2
Comments
Hi Christian I had the same problem that Cairo.jl was not building. using NativeSVG
t = Turtle()
forward(t, -200)
penup(t)
turn(t, -90)
forward(t, 200)
turn(t, 90)
pendown(t)
for c in (:black, :red, :orange, :yellow, :green, :blue, :indigo, :violet)
pencolor(t, c)
forward(t, 100)
turn(t, 45)
end
Drawing(t) Can you look at it and give me some feedback? I really like to replace the Luxor dependency with something else;) Kind regards Ben |
Hey Ben, It looks good! It looks like a small, clean package. I tried it out in Jupyter, and it works very well there. I tried a few of the examples form Chapter 4, and they all seem to work well. I looked around a bit to understand what would need to happen to display an SVG from the REPL. I guess one option is to to display the svg in a web browser window; is this the approach you're thinking of? Chris |
Hi Christian Checkout NativeSVG. It should work now also from a REPL (to a web browser window). Ben |
Wonderful! The example works well from the REPL; that's quick work on your part. I have wondered if an introduction to a more typical plotting package would be more useful than turtle graphics. It seems the turtle graphics is targeting children; I wonder at what age or in what situations an introduction to something like Plots.jl would be as enjoyable. I don't have plans to change this in PiensaEnJulia; even so, I'm interested to learn if you have comments on this topic. |
I was able to use this PR on Cairo.jl to get ThinkJulia.jl working. I was able to run the code in Chapter four of ThinkJulia. Ben, do you plan to modify the book to use NativeSVG? If so, do you know when? |
Chapter 4 and other chapters use turtle graphics via the Luxor package which wraps Cairo. Apparently Cairo.jl is not building right now.
I wish there were a 100% Julia graphics package that we could use for the Turtle business.
The text was updated successfully, but these errors were encountered: