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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top