POV-Ray : Newsgroups : povray.advanced-users : POVRay and XML : Re: POVRay and XML Server Time
29 Jul 2024 02:20:00 EDT (-0400)
  Re: POVRay and XML  
From: Bernd Fuhrmann
Date: 2 Jan 2005 11:17:25
Message: <41d81e95$1@news.povray.org>
Warp wrote:
> Bernd Fuhrmann <Sil### [at] gmxde> wrote:
> 
>>But POVRay SDL isn't a full featured programming langugage.
> 
>   What is, in your opinion, a "full featured programming language"?
>   The SDL is turing-complete.

Yes, it is. There are a lot of features missing that are used in a lot 
of modern programming languages. Examples:
* Structs/Classes
* References, esp. to functions
* Namespaces
* strict type checking

Other possibly cool features
* Inheritance
* Java-like classes inside classes
* C++ like multiple inheritance
* Lambda expressions (Scheme)

>>and so on...
> 
> 
>   Exactly my point. Too tedious to write?

Well, yes. But I'm even more tedious to rewrite that POVRay parser.

>   Besides, you conveniently skipped the hard parts of the code, for
> example the conditional inside the sphere.

Ooops. Sorry for that. What you're missing is this:
[...]
<sphere center="$IndX*5+1, $IndY/4-1.25, -5" radius="$IndX*$IndY/10">
<xsl:if test="$IndX<MaxX/2">
<rgbpigment value="$IndX/$MaxX, IndY/MaxY, 0"/>
</xsl:if>
</sphere>
[...]

But as I just found out: XSLT won't be able to do all transformations 
that POVRay would be able to do, since POVRay knows sometimes more about 
objects (like max_extent) and so on. Sorry for not knowing this.

Still, this does not solve those namespace and data access problems. 
There still needs something to be done. I just have to think about 
another way...

>   What good does it do to simply put the code into quotation marks and
> add some extra junk around them? That doesn't help the user nor the
> program trying to interpret the code (it simply gets the code as a
> bunch of strings which it has to parse and interpret anyways, without
> the help of any XML parser).

XSLT can process it. Nothing more nothing less.

>>Besides: Your code is nonsense. 0*0.125 is always 0. Your code will 
>>either do nothing or never finish.
> 
> 
>   Besides the point. It was just an abstract example. Set the initial
> values to 1 if you want to feel better about it. ;)

Ok, never mind.

I must admit that using XML/XSLT exclusively for scene design and 
parsing is mad. But on the other hand I will still require a SDL that 
has more features, with configurable preprocessing levels. To give you a 
nice example: What about a JavaDoc/Doxygen-like processing? Wouldn't 
that be cool?

Regards,
Bernd Fuhrmann


Post a reply to this message

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