|
 |
clipka <ano### [at] anonymous org> wrote:
> Am 05.01.2013 10:48, schrieb denis.beurive:
> >
> > I try to deeply understand the PovRay's grammar.
>
> Frankly there's not much to deeply understand. POV-Ray's parser is a
> kludgy old incoherent mess, and while there are structures that /seem/
> to form a common pattern among all the statements, there are probably
> exceptions to each and every one of them. There's absolutely no hidden
> core grammar to be found in there, everything is in the individual
> statements (except for the tokenization rules, but they're quite
> straightforward).
My idea is this one :
If I can find a logic behind the grammar, I can model the relation between
objects (that form the scene) in a class hierarchy (in the sense of object
oriented programming).
For example :
A sphere is an object.
All objects share some properties. For example, all objects may have a color.
It is possible to apply some common transformation to all objects.
Therefore :
The class sphere inherits from the class object.
The class object has some methods (the common transformations).
We could produce object oriented representation of a scene.
Then :
output.
Step 2 : Get rid of the intermediate step that consists on producing the POVRAY
output. We produce a "binary" representation og the scene that we give to the
renderer?
Do you think it is possible ?
Thank you,
Denis
Post a reply to this message
|
 |