POV-Ray : Newsgroups : povray.general : POV-CSDL (or Java Binding?) : Re: POV-CSDL (or Java Binding?) Server Time
10 Aug 2024 03:24:24 EDT (-0400)
  Re: POV-CSDL (or Java Binding?)  
From: Chris Huff
Date: 12 Mar 2000 11:28:21
Message: <chrishuff_99-18E4E1.11301012032000@news.povray.org>
In article <38cb8f8b@news.povray.org>, "Johannes Hubert" 
<jht### [at] mailacom> wrote:

> The idea was, that only the "programmers" among us would want to write
> CSDL scripts (for example for complex includes/plug-ins) and that normal
> users could simply include the produced "normal" POV-Script into their
> scenes, not having to worry about the CSDL at all - they could simply
> ignore that part.
> A CSDL plug-in would thus be published as two sources: A CSDL source and
> a POV-Script source. "Programmers" could use the CSDL source to modify
> the plugin to their own needs, and "Users" could use the POV-Script
> (compiled from the CSDL) to use the plug-in in their scenes.
> Sounds like a good compromise to me, having all the arguments from "The
> Language of POV-Ray" in mind.

This is a good description of what I had in mind, except that it 
wouldn't be exclusively for plugin development, and I am hoping the 
non-programmers would also want to develop scenes in it.


> A number of packages (class libraries) would be written in Java to
> support the POV-objects. A "programmer" could then use these packages to
> program POV scripts (with focus on plugins, not on full scenes) directly
> in Java, in a manner intuitive to programmers.
> The resulting Java program would, if compiled and run, create a standard
> POV-Script plugin which could be included into any POV-Scene, and which
> would contain any macro and object created in the Java-Script.
> The programmer could publish both the Java code (to make his plugin
> modifiable by other programmers) and the resulting POV-Scene (to make
> the plugin usable by "normal" users) (usually both would be published
> together).
> 
> The advantage over the CSDL approach would (in my eyes) be that no "new"
> language is needed. Why create a parser and compiler, if it is already
> there, for example in the Java parser, compiler and runtime environment?

The Java language isn't designed for scene description. CSDL could be 
used for scene description as well as plugin development, and would have 
the advantage of being designed for the purpose of describing objects in 
3D space. People who want to make scenes but want a cleaner, more 
flexible language than POV-Script could use CSDL.
ANSI/ISO C++ could be better, since it is more platform independant and 
has things like operator overloading which would make things like vector 
manipulation easier, but then people who don't know C++ would have to 
learn it. And the fact that it would require a C++ compiler would drive 
many away, more people would be willing to use a pre-compiled utility, 
especially if it includes an editor and a way to access POV on their 
platform.

Also, CSDL would be a much simpler language than C++/Java, probably 
without things like class types(you could attach variables and functions 
to specific objects, and make copies of those objects, though.). It 
would be object-oriented, but in a different way from C++ or Java, it 
would be oriented toward specific objects and their "children" instead 
of kinds of objects. It's variables, functions, expressions, loops and 
conditionals would use a C-like syntax, but some of the C types would be 
eliminated, pointers would behave themselves, and there would be 
additional types like object, vector, pigment, texture... It would be 
more strongly typed than POV-Script, but you could still do things like 
make a pigment into a texture and a float or int into a vector. 
Component parts of objects(like transform, texture, other flags and 
properties) would be accessible with dot notation.(I think the -> 
notation for pointers to objects should probably be left out)

It wouldn't be an extended C/C++/Java with additions for making scenes, 
it would be a new, cleanly designed language based on those languages, 
without all the "dirt" that POV-Script has accumulated over time, and 
designed with the purpose of describing scenes and developing plugins.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

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