Question

Is there a general way to use turtle graphics in ruby like this?

require 'turtle'
Turtle.draw do
    pencolor blue
    forward 100
end

I tried hackety-hack, which is nice but too buggy (crashes almost every minute). I am also trying rdf-turtle, but I have no idea how to draw a single line. Could somebody help me?

Était-ce utile?

La solution

It looks like rdf-turtle is just a library for parsing the RDF format and not for drawing anything.

If you want to draw something with turtle in Ruby, checkout Kidsruby. It comes with a GUI and a turtle module.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top