Procedural animation language
Current declarative scene language in Panorama will soon be replaced
with this language. It's main structure is similar to the previous one,
but declarative expressions of attribute values like this:
location <0, 0, 0>
will be replaced with an assignment sentence:
location = Vector (0, 0, 0);
I won't talk too much about details, as I'm still in the language
specification phase, and they can be changed later on. Anyway, here is
an outline of its main characteristics:
-
Language is event based. An object can be given a "program", that is a
collection of event-response pairs. This response will work much like a
"C" function, with the event being the name of the function.
-
You can declare global variables, object variables (shared between all
events in an object), and local variables (inside the function implementing
the event response).
-
Some of the events are:
-
init, sent to every object before any action take place. This is the place
where you will normally put object initialization.
-
time, sent to an object to make it recalculate every time-dependent attribute.
This event will normally be sent to every object in the beginning of each
frame.
-
collision, when 2 objects taking part in a physical simulation collide.
-
User can send its own events. You can send a new event to any object, or
to the whole system, any time you want. This facilitates communication
between objects taking part in an animation.
-
Being a procedural language, it will have flow control statements, like
"for", "if/else", "while", "goto", etc.
-
You can create or destroy objects dynamically in any place and time.
-
Language has some common types, like "Int", "Real", "Bool", and other not-so-common,
like "Vector", "Color", "String". All of them can be used in algebraic
expressions with common operators.
-
Other types are the internal structures of Panorama, like "Camera", "Object",
"Light", etc. This can't be used in algebraic expressions. They have some
other features, like internal attributes you can get or set, the ability
to recieve an event you send, etc.
There is something I don't know how to solve yet. Materials can
be procedurally defined, meaning their attributes can change over time,
but I still don't know how to make this attributes change with space (I
mean I don't know how to integrate it with current event based syntax).
For any questions, comments or suggestions
about this pages, email ajimenez@gnu.org
Copyright (C) 1999 Angel Jimenez Jimenez
Please send FSF & GNU inquiries & questions to
gnu@gnu.org.
There are also other
ways to contact the FSF.
Verbatim copying and distribution of this entire article
is permitted in any medium, provided this notice is preserved.