POV-Ray : Newsgroups : povray.programming : Example files for the POVRAY's grammar ? : Re: Example files for the POVRAY's grammar ? Server Time
23 Apr 2024 07:12:47 EDT (-0400)
  Re: Example files for the POVRAY's grammar ?  
From: denis beurive
Date: 5 Jan 2013 11:20:00
Message: <web.50e8520861000dc7be007bed0@news.povray.org>
clipka <ano### [at] anonymousorg> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.