POV-Ray : Newsgroups : povray.programming : [ANNOUNCE] SERVAL: A C++ library for building POV-Ray models Server Time
29 Jul 2024 04:17:11 EDT (-0400)
  [ANNOUNCE] SERVAL: A C++ library for building POV-Ray models (Message 1 to 1 of 1)  
From: Ross Smith
Subject: [ANNOUNCE] SERVAL: A C++ library for building POV-Ray models
Date: 22 Sep 1998 09:32:19
Message: <360798E8.595E@ihug.co.nz>
SERVAL is a slightly contrived acronym for a Solid Environment Rendering
and Visualisation Application Library. The source code and documentation
can be found on my home page (see sig).

POV-Ray's scene description language ("POV-Script") can be used to
produce very complex scenes, but as a programming language it leaves a
lot to be desired. New features are added with each release, and the
latest versions provide a usable procedural language, but it's still
only on the level of, for example, some of the older versions of Basic.
For programmers used to the tremendous expressive power of modern
programming languages such as C++, constructing a very complex scene in
POV-Script quickly gets very frustrating.

My original plan was to write a preprocessor for POV-Script, which would
effectively add many new features to the language by expanding them into
the equivalent standard POV-Script code before passing the resulting
code to POV-Ray for rendering. But then it occurred to me: why go to all
the trouble of writing what amounts to a small compiler, when I already
have much better compilers for a much better language than I could ever
create on my own?

So instead of being a POV-Script preprocessor, Serval is a class library
for C++. The full power of C++ can be brought to bear in creating
scenes; the Serval classes then generate the POV-Script code, and then
either write it to a file for later rendering, or use system calls to
command POV-Ray to render it immediately.

In effect, I reversed of my original plan of starting with POV-Ray and
adding a more powerful programming language: instead, I started with a
powerful programming language and added POV-Ray. (The name Serval came
later, after it occurred to me that my original name for it -- C++
Rendering Application Programming Interface, or CRAPI for short -- left
something to be desired.)

As the discussion above suggests, this is not something that I expect to
be of interest to all POV-Ray users. You probably won't be able to get
much use out of it unless you're already reasonably familiar with both
POV-Ray and C++ programming. Some advanced features of C++, such as
member templates, are required by Serval (see the design notes for notes
on compiler compatibility). You'll also need to know at least a little
about analytic geometry (you should be familiar with terms like "vector
cross product").

You will need an up-to-date C++ compiler; Serval makes extensive use of
Standard C++ features such as exceptions, member function templates,
namespaces, and run-time type identification. It is known to work on
EGCS 1.1 and Microsoft Visual C++ 5.0; it is known not to work on any
earlier version of either of those compilers, or on any version of GCC
up to 2.8.1. For any other compilers, you'll have to take your chances.
(It will definitely not work under MS-DOS or Windows 3.x, regardless of
the compiler involved, because it uses long file names.)

The current version is very incomplete; it implements only a few of
POV-Ray's object and texture types, and almost no features beyond that
level. I'm releasing it in this skeletal form in hopes of receiving
feedback, suggestions, bug reports, and so on, from other C++
programmers who are interested in POV-Ray. New features will be added as
soon as possible; I expect it to support almost all features of POV-Ray
3.1 by version 1.0, probably by the end of 1998 (subject, of course, to
the release schedule of POV-Ray itself).

-- 
Ross Smith ....................................... Auckland, New Zealand
<mailto:r-s### [at] ihugconz> ........ <http://crash.ihug.co.nz/~r-smith/>
    "Oh boy! Violence! Can't wait! Hey, sex is everywhere, but good
    violence is hard to find!"                  -- Michael Thompson


Post a reply to this message

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