What are some computer languages for describing/generating graphics?
September 10, 2004 11:48 AM   Subscribe

What are some computer languages for describing/generating graphics?

Not libraries and tools, but actual languages? Not languages that are good for graphics, but whose primary subject is graphics.

The only ones I could think of immediately were Logo and Postscript. I don't know enough about "processing" to know for sure if it counts. It looks to me like a normal language with lots of builtin stuff for graphics, but I could be wrong.
posted by freebird to Computers & Internet (33 answers total)
 
SVG
posted by jeremias at 11:58 AM on September 10, 2004


Response by poster: duh! Forgot SVG. Though I might argue it's a marginal example, since it's an application of a non-graphics language to the graphics domain. But I think SVG is totally cool, so let's count it. It needs all the attention it can get.
posted by freebird at 12:03 PM on September 10, 2004


OpenGL?
posted by gwint at 12:07 PM on September 10, 2004


POV-Ray (and just about every 3D program worth its salt, but POV-Ray is a good example since it is free and quick to get going with) has a "scene description language" whose only purpose is to create and plot objects for in 3D.
posted by ChasFile at 12:07 PM on September 10, 2004


OpenGL is an application library, not a language, gwint.
posted by SpecialK at 12:26 PM on September 10, 2004


processing is, and its predecessor, dbn (i'm not sure what you're distinction is, but they're both developed by mit's media lab for graphics, afaik).

i'm not sure its fair to say logo is primarily for graphics - i believe it's a general language, intended for teaching, that used graphics as a way of involving the student. if you include logo you might want to think about including squeak, which is smalltalk implementation that is/has its own visual environment. and also alan kay et al's croquet (which isn't available).

what about cad (computer aided design) languages? do they count?

do video games have high level languages for scripting scenes? doom?

there's not always a clear distinction between what is a language and what is a library, for two reasons: (1) a graphics language is still going to need lots of the normal stuff any language has (which is what you saw in processing, i think) and (2) it's the fashion these days, especially with more modern dynamic/functional languages, to use "embedded domain specific languages" - you extend a language with extra bits to make the langauge you want (which works very well if you use a language with the right kinds of features - saves you a lot of work).
posted by andrew cooke at 12:53 PM on September 10, 2004


flash?
posted by andrew cooke at 12:55 PM on September 10, 2004


an embedded langauge example that you might consider - pan
posted by andrew cooke at 12:58 PM on September 10, 2004


Unless the graphics are integral to the functioning of the language, then any graphics language that is Turing complete without using graphics is not really a graphics language, if you get what I'm saying.

PostScript is a straight-forward RPN programming language. It just happens to have a bunch of built-in graphics operations. One could claim that if PostScript is therefore a graphics language, then so is Applesoft BASIC since it has graphics operations built-in.
posted by plinth at 12:59 PM on September 10, 2004


it's possible one of these might meet plinth's strict requirements. maybe something involving cellular automata (if they're always displayed)?
posted by andrew cooke at 1:14 PM on September 10, 2004


Response by poster: Good stuff - I think the discussion about what the question means, exactly, is at least as interesting as any of the answers.
posted by freebird at 1:23 PM on September 10, 2004


Maya has an embedded scripting language called Mel, which probably qualifies.
posted by ook at 1:29 PM on September 10, 2004


Response by poster: So I thought of a way to describe what I mean (maybe) a little better. Consider computer languages for music creation. There are libraries for 'normal' languages, and there are music-targeted languages whcih nonetheless 'look' like regular languages. Then there's stuff like Csound and MIDI which I'd argue are a different ilk entirely. They have syntax and semantics which is entirely specific to describing music and sound.

So while all this interesting, maybe a good way to put it would be:
"Csound and MIDI are to music as XXX and YYY are to graphics?"
posted by freebird at 1:44 PM on September 10, 2004


In that case, ChasFile named it. Every renderer (raytracers, rasterizers, combinations of the two, and things I can't think of) features a programmable scene description language comparable to CSound.

Midi isn't a language, by the way... it's a protocol.
posted by Eamon at 2:09 PM on September 10, 2004


Response by poster: Midi isn't a language, by the way... it's a protocol.

Yup, and I mentioned it because I thought the distinction interesting. I consider it a language in the sense I mean here: It's a mapping from a set of symbols and and an associated syntax/semantics to some pattern or process being described or generated. It allows (simplified) communication of musical information, so it's a language.

I think I understand the protocol/language description in the technical sense, but MIDI's actually much closer to what I'm interested in here than CSound, in that its structure is very much tightly coupled with the thing it describes. While CSound looks like an unholy coupling between C and a spreadsheet...
posted by freebird at 2:16 PM on September 10, 2004


how would you classify common music? (here's an example score).
posted by andrew cooke at 2:20 PM on September 10, 2004


Processing get a lot of hype these days.
Starlogo -- admittedly a Logo variant, but a weird one.
Autolisp, obviously.
If you're counting PostScript, you might as well count most dialects of Forth
posted by majick at 2:20 PM on September 10, 2004


Oh, and if you're looking at MIDI and calling it a language, just go ahead and throw X in there as well.
posted by majick at 2:22 PM on September 10, 2004


you might as well count most dialects of Forth

that makes no sense. postscript has an obvious graphics emphasis. the relationship with forth is about the implementation, not how it's used. you might as well argue from processing that java is equivalent.
posted by andrew cooke at 2:24 PM on September 10, 2004


POV-Ray ... has a "scene description language" whose only purpose is to create and plot objects for in 3D.

This scene description language is in fact the native file format of POV-Ray, which for some reason seems pretty cool to me.
posted by signal at 2:38 PM on September 10, 2004


And it is actually a language, you can do loops, conditionals, etc. It's not just a list of objects, like DXF.
posted by signal at 2:49 PM on September 10, 2004


And, being a 3d graphics-oriented language, it has all sorts of native functions (methods?) for handling vectors, coordinate systems, colors, transformation matrices, etc.
posted by signal at 2:57 PM on September 10, 2004


I suppose you can call MIDI a language, if you want, but it's not a very useful application of the term. If you are going to call MIDI a language, then you can call just about any scheme for formatting information a language. (TCP is a networking language! ASCII is a character-description language! The entire Win32 API is a language!) Such a stretched version of the term is redundant and so broad as to be more or less useless; besides, it will confuse people who use "language" in the conventional way.
posted by Mars Saxman at 4:28 PM on September 10, 2004


Response by poster: If you are going to call MIDI a language, then you can call just about any scheme for formatting information a language [...] ASCII is a character-description language!

Not at all. ASCII is a simple 1-1 mapping between integers and characters; there is no syntactic structure. MIDI has structure - pitch bends modifying other notes, controller changes affecting what comes after. I could be entirely mistaken, but I think of it as having more structure to it than ASCII, which is simply a representation. A better analogy with text might be simple markup like HTML, which I think certainly could be called a language - though that's of course arguable as well.

So how would you describe the difference, then, between a sufficiently complex protocol and a language?
posted by freebird at 5:57 PM on September 10, 2004


MIDI includes both a physical interface standard and a description of messages and syntax to be carried over the physical interface. So saying "MIDI is a language" is at most half-right, even if you grant the idea of a protocol being language. But I would say that a protocol that has several state registers, messages that modify these registers, and ways in which the registers can modify the meanings of other (later) messages, comes mighty close to being a language. The MIDI protocol is more like an assembly language than a high-level language, but a case can certainly be made.
posted by kindall at 6:32 PM on September 10, 2004


I think the distinction Mars is making is between things that have syntax and semantics, and describe something and things that have syntax, semantics, and "do something". I'm a bit less certain than Mars that things on the description side are not interesting languages. I've played a bit with declarative languages and constraint programming systems and there are some very cool things that you can do with them.

To answer freebird's question. I don't think there's a difference between a protocol and a language except that unless I'm being extremely geeky the protocol is less interesting to me.
posted by rdr at 6:42 PM on September 10, 2004


rdr, protocols are very different from (Turing Complete) languages. If it doesn't have control-flow, it's definitely not a language.
posted by Eamon at 8:25 PM on September 10, 2004


If it doesn't have control-flow, it's definitely not a language.

It's not a programming language without flow control. Note that freebird carefully avoided asking for programming languages in his original question, restricting it to computer languages, a broader category that would also include markup languages like SVG.
posted by kindall at 9:02 PM on September 10, 2004


Response by poster: Hrm, neat stuff.

I'm not entirely certain I buy the definition of protocol as being between computing systems, but I find the whole issue pretty intriguing. I guess I think of a 'protocol' as being about transfer of information with no change. So for example, I'd think of the language of flags and semaphores and such between ships in the old days as a protocol. Whereas some means by which computers talk to each other these days I'd probably consider languages.

So I guess it has do with whether you're transferring state information (protocols) or transferring process information (languages)? But then I think we have to consider natural languages as protocols, which just isn't cricket.
posted by freebird at 11:26 PM on September 10, 2004


You'd be suprised what tcp/ip can do.
posted by rdr at 2:34 AM on September 11, 2004


It's not a programming language without flow control.

what about the subset of prolog without cut or state? that's a programming language without flow control, as far as i can see.
posted by andrew cooke at 6:10 AM on September 11, 2004


t's not a programming language without flow control. Note that freebird carefully avoided asking for programming languages in his original question, restricting it to computer languages, a broader category that would also include markup languages like SVG.

Good point. I take it back then.
posted by Eamon at 8:02 AM on September 11, 2004


PostScript
posted by i_cola at 8:14 AM on September 11, 2004


« Older Negative calorie foods ?   |   Stuff to do in Nashville Newer »
This thread is closed to new comments.