Best Ruby Geometry lib?

P

Pito Salas

I am looking for a basic geometry library with classes like Point, Line,
Rect, etc. And with operations like

Rect.new(Point, Point, Point, Point)

or

Line#angle

or

Line#rotate

or

Line#intersect(line)

and so on. Basic, abstract, dealing with points, lines, and other 2d
constructs. I know it's everyone's favorite oo example but is there a
well worked out, tested library so I don't have to write me another one?

Thanks!

Pitp
 
M

Mason Simon

Pito Salas wrote in post #859299:
I am looking for a basic geometry library with classes like Point, Line,
Rect, etc. And with operations like

Rect.new(Point, Point, Point, Point)

or

Line#angle

or

Line#rotate

or

Line#intersect(line)

and so on. Basic, abstract, dealing with points, lines, and other 2d
constructs. I know it's everyone's favorite oo example but is there a
well worked out, tested library so I don't have to write me another one?

Thanks!

Pitp

Try http://github.com/DanielVartanov/ruby-geometry, or my fork of it, in
which I just added a line class. It doesn't have Rect's yet, but you
could easily add 'em

-mason
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top