views:

93

answers:

4

I'm an architecture student and a designer, rather than a programmer, so I am looking for a programming language or library with best support for interactive graphics. For example, last week I had this idea about a traffic intersection program where I would insert incoming and outgoing lanes and then connect them with nodes using mouse to show the required paths and this would be used to calculate the average throughput using best traffic light scheme.

Or that time I wanted to draw a shape and then fit rooms with predefined floor space optimally into that shape.

There is Javascript+Canvas, Processing, also Rebol and that's about all I have heard of. Anything more concise/ easier available on Windows platform?

A: 

Scratch programming language? :-)

naivists
It seems capable of graphics, sure, but graphical programming is a bit weird even for me.. :P
luminarious
+1  A: 

For your use case, it would sound like a CAD package with good scripting support would be best. There are many CAD packages out there, and they all take different approaches to scripting. AutoCad uses Lisp, BRL-CAD has its own language, and PythonCAD uses, surprisingly enough, Python. I would look at these, or other CAD packages that may have scripting support, and see if any of them will meet your needs.

Brian Campbell
That reminds me, Google Sketchup has Ruby API as well. I think I even saw some demonstration where it was used as a crude game engine.
luminarious
@luminarious Yes, 3D modeling packages like Google Sketchup might also work for this use case. Another that comes to mind is Blender http://www.blender.org/ which is scriptable in Python, though it has a pretty steep learning curve.
Brian Campbell
A: 

You might find Flex or Flash works well for your purpose. With Flex you can create all your individual graphics as images in whatever program you're most comfortable with (Photoshop, Illustrator, Paint, whatever) and then reference those within a Flex app. You can give everything an initial position easily within mxml, a simple XML based language for defining your UI, and then program interaction with ActionScript (basically same as JavaScript).

It also has support for transitions and tweens and effects built in.

http://www.adobe.com/products/flex/

You can also get away without having to buy anything. The SDK is free and there are decent free IDE's like FlashDevelop. There are also better commercial IDE's like IntelliJ and FlashBuilder.

http://www.flashdevelop.org

http://www.jetbrains.com/idea/

http://www.adobe.com/products/flashbuilder/

Sam
A: 

Asymptote, the vector graphics language. Links: Wiki, Gallery.

You can make professional looking graphs offline from LaTex processing, but being LaTeX aware. It is a full blown C-ish language for vector graphics and function graphing. The output eventually is encapsulated postscript (eps) which can be displayed directly into LaTeX documents.

Note that it is not interactive, but rather more like a script that builds graphics objects.

jalexiou