POV-Ray : Newsgroups : povray.programming : Re: Motion Blurring : Re: XML (was Re: Toughts about implementing motion-blur in POV-Ray...) Server Time
12 Jul 2025 23:04:02 EDT (-0400)
  Re: XML (was Re: Toughts about implementing motion-blur in POV-Ray...)  
From: Jon A  Cruz
Date: 2 Dec 1999 11:19:30
Message: <38469BFB.2A10475B@geocities.com>
Philippe Debar wrote:

> Jon A. Cruz wrote:
> > <sphere radius=1>
> >   <pigment>
> >     <color rgb='#ff00ff'>
> >   </pigment>
> >   <rotate x=0 y=10 z=0>
> > </sphere>
>
> I prefer
>
> sphere{x,1 texture{pigment{color rgb <1,0,1>}} rotate 10*y}
>
> It is shorter (60 characters instead of 92, and you left out the centre) and
> I find it much more readable. Part of this readability is from the one-line
> formatting, but I wouldn't like  the one-line:
>
> <sphere centerx=1 centery=0 centerz=0 radius=1> <pigment> <color
> rgb='#ff00ff'> </pigment> <rotate x=0 y=10 z=0> </sphere>
>
> (I took the liberty to add a centre for the sphere in a syntax analogue to
> what you propose.) I think I couldn't stand the inflation. more word to make
> typos, less info on screen (hence harder to read the script flow),. And
> think about backward compatibility... :-(

Yes, but one thing you get is that any standard XML editor (and more are
arriving each day) can do all that editing and homework for you. You'd then end
up typing less, and would be able to view your scene as a tree, move things
around, colapse and expand, etc.

I had just thrown things out quickly as an example. There'd be a little more
different if this were real XML. Here's a more extreme example. but remember it
is all handled by editors.

<sphere radius=1>
    <center>
        <vector3 x=1 y=0 z=0/>
    </center>
    <pigment>
        <color rgb='#ff00ff'/>
    </pigment>
    <rotate>
        <vector3 x=0 y=10 z=0/>
    <rotate>
</sphere>

And the editor imported what you typed and then did your preferred tab
formatting on it, of course. :-)


--
"My new computer's got the clocks, it rocks
But it was obsolete before I opened the box" - W.A.Y.


Post a reply to this message

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