Which Image Generation Library?

Discussion in 'Ruby' started by Winter Ayars, Oct 5, 2007.

  1. Winter Ayars

    Winter Ayars Guest

    I need to create a small program that generates images and "animations"
    (i can cheat on the animation) of Petri nets. Something like the
    wikipedia page's (http://en.wikipedia.org/wiki/Petri_net) examples, but
    automatically generated based on simple input.

    I'm thinking about doing this in Ruby (with Gnome 2) but don't know what
    image generation/manipulation tool would be best to use or if i should
    go with something else. Does someone have a suggestion? Ideally
    something with some good documentation. It doesn't have to be
    sophisticated, just enough to algorithmically generate pictures. I'm
    planning on using Gnome 2 as well, if this makes a difference.

    Thanks in advance!
    --
    Posted via http://www.ruby-forum.com/.
     
    Winter Ayars, Oct 5, 2007
    #1
    1. Advertising

  2. On 5 Oct 2007, at 10:51, Winter Ayars wrote:

    > I need to create a small program that generates images and
    > "animations"
    > (i can cheat on the animation) of Petri nets. Something like the
    > wikipedia page's (http://en.wikipedia.org/wiki/Petri_net) examples,
    > but
    > automatically generated based on simple input.
    >
    > I'm thinking about doing this in Ruby (with Gnome 2) but don't know
    > what
    > image generation/manipulation tool would be best to use or if i should
    > go with something else. Does someone have a suggestion? Ideally
    > something with some good documentation. It doesn't have to be
    > sophisticated, just enough to algorithmically generate pictures. I'm
    > planning on using Gnome 2 as well, if this makes a difference.


    Cairo can make nice figures and there are Ruby bindings. The bindings
    have little (no?) documentation, but Cairo itself is very well
    documented and there are good docs for the Python bindings which are
    almost identical.

    I'd post links, but Google is your friend really.

    Alex Gutteridge

    Bioinformatics Center
    Kyoto University
     
    Alex Gutteridge, Oct 5, 2007
    #2
    1. Advertising

  3. Alex Gutteridge wrote:
    > On 5 Oct 2007, at 10:51, Winter Ayars wrote:
    >
    >> I need to create a small program that generates images and "animations"
    >> (i can cheat on the animation) of Petri nets. Something like the
    >> wikipedia page's (http://en.wikipedia.org/wiki/Petri_net) examples, but
    >> automatically generated based on simple input.
    >>
    >> I'm thinking about doing this in Ruby (with Gnome 2) but don't know what
    >> image generation/manipulation tool would be best to use or if i should
    >> go with something else. Does someone have a suggestion? Ideally
    >> something with some good documentation. It doesn't have to be
    >> sophisticated, just enough to algorithmically generate pictures. I'm
    >> planning on using Gnome 2 as well, if this makes a difference.

    >
    > Cairo can make nice figures and there are Ruby bindings. The bindings
    > have little (no?) documentation, but Cairo itself is very well
    > documented and there are good docs for the Python bindings which are
    > almost identical.
    >
    > I'd post links, but Google is your friend really.
    >
    > Alex Gutteridge
    >
    > Bioinformatics Center
    > Kyoto University
    >
    >
    >
    >

    I've seen quite a few Petri net animations on the web -- perhaps you
    could grab one of those and just do the Ruby scripting.
     
    M. Edward (Ed) Borasky, Oct 5, 2007
    #3
  4. Winter Ayars

    John Joyce Guest

    On Oct 4, 2007, at 10:47 PM, M. Edward (Ed) Borasky wrote:

    > Alex Gutteridge wrote:
    >> On 5 Oct 2007, at 10:51, Winter Ayars wrote:
    >>> I need to create a small program that generates images and
    >>> "animations"
    >>> (i can cheat on the animation) of Petri nets. Something like the
    >>> wikipedia page's (http://en.wikipedia.org/wiki/Petri_net)
    >>> examples, but
    >>> automatically generated based on simple input.
    >>>
    >>> I'm thinking about doing this in Ruby (with Gnome 2) but don't
    >>> know what
    >>> image generation/manipulation tool would be best to use or if i
    >>> should
    >>> go with something else. Does someone have a suggestion? Ideally
    >>> something with some good documentation. It doesn't have to be
    >>> sophisticated, just enough to algorithmically generate pictures. I'm
    >>> planning on using Gnome 2 as well, if this makes a difference.

    >> Cairo can make nice figures and there are Ruby bindings. The
    >> bindings have little (no?) documentation, but Cairo itself is very
    >> well documented and there are good docs for the Python bindings
    >> which are almost identical.
    >> I'd post links, but Google is your friend really.
    >> Alex Gutteridge
    >> Bioinformatics Center
    >> Kyoto University

    > I've seen quite a few Petri net animations on the web -- perhaps
    > you could grab one of those and just do the Ruby scripting.
    >

    You could do it with RMagick, it is the Ruby lib for ImageMagick. It
    can handle vector art and raster art. It has quite good documentation
    too. Not sure about animation or interactivity, but you could do that
    using one of the game oriented libs like Gosu or Ruby/SDL or RubyGame.

    In the end though, Javascript might be a lot easier to just program
    an animation, you could then simply use any HTML view for display
    (web browser). That said, you might look into Scriptaculous or
    Prototype, the Ruby bound Javascript libraries that are commonly used
    in Ruby on Rails for eyecandy.
     
    John Joyce, Oct 5, 2007
    #4
  5. Winter Ayars

    Winter Ayars Guest

    John Joyce wrote:
    > In the end though, Javascript might be a lot easier...


    I was thinking about Javascript, although i sort of wanted to stay away
    from that. Maybe i should reconsider...

    Anyway, thanks for the advice everyone. I'll look into these things.
    --
    Posted via http://www.ruby-forum.com/.
     
    Winter Ayars, Oct 5, 2007
    #5
  6. Winter Ayars wrote:
    > I need to create a small program that generates images and "animations"
    > (i can cheat on the animation) of Petri nets. Something like the
    > wikipedia page's (http://en.wikipedia.org/wiki/Petri_net) examples, but
    > automatically generated based on simple input.
    >
    > I'm thinking about doing this in Ruby (with Gnome 2) but don't know what
    > image generation/manipulation tool would be best to use or if i should
    > go with something else. Does someone have a suggestion? Ideally
    > something with some good documentation. It doesn't have to be
    > sophisticated, just enough to algorithmically generate pictures. I'm
    > planning on using Gnome 2 as well, if this makes a difference.
    >
    > Thanks in advance!
    >

    Look at Graphviz. It may do exactly what you want, at least if you
    aren't too picky about layout and graphic conventions.

    http://en.wikipedia.org/wiki/Graphviz

    http://graphviz.org/
     
    William Rutiser, Oct 5, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Konrad Billewicz

    Java library for SQL generation

    Konrad Billewicz, Aug 8, 2005, in forum: Java
    Replies:
    1
    Views:
    601
    shakah
    Aug 8, 2005
  2. Replies:
    0
    Views:
    3,345
  3. Waverider
    Replies:
    1
    Views:
    199
    JuanDG
    Sep 21, 2004
  4. Sammy
    Replies:
    1
    Views:
    316
    NET_NET_2003
    Aug 18, 2003
  5. John W. Long

    HTML Generation (Next Generation CGI)

    John W. Long, Nov 22, 2003, in forum: Ruby
    Replies:
    4
    Views:
    344
    John W. Long
    Nov 24, 2003
Loading...

Share This Page