Re: Scripts vs APIs

Linas Vepstas ([email protected])
Thu, 8 Sep 1994 18:33:51 -0500


> Date: Thu, 8 Sep 1994 11:18:06 -0700
> To: [email protected]
> Subject: Re: Scripts vs APIs
>
> So, in setting a variable, you are actually just declaring the
> attributes of an object. If you wish dynamic action, then there is
> indeed a problem. (but from my understanding, VRML is intended to be
> static, like HTML)

You can describe dynamics in a declarative fashion; you don't need
an algorithm to get things to move. In fact, the declarative description:

DefineObject bigGreenGlob {polygon vertex ... vertex ... }
AccelerateObject {bigGreenBlob From 0.0, 3.1, 1.0, To 100.0, 0.0, 0.0, Speed 33.3 }

would lead to more efficient execution than interpreting the
following VRML program:

DefineObject bigGreenGlob {polygon vertex ... vertex ... }
BeginLoop { for i=1,100 do
x += 9.0; y += 3.58; z += 1.0;
DrawObject { bigGreenBlob At x,y,z}
} EndLoop

In fact, with the algorithm, its up to the script writer, rather
than the VRML viewing tool, to get the timing right. Also, the
viewer would not be able to have VCR-style rewind, fast-forward
control buttons.

--linas