Вопрос

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