First of all, povscript does not create an entire input file for PovRay.
Rather it makes a model that can be used in a PovRay scene.  The part of
the model centered on your postscript page in molscript is created
centered at the origin of the PovRay world.  All models get created at a
scale where one angstrom in your molecule corresponds to one unit in

You can use whatever naming convention you like, but I like the
following for all my files.  I use a ".in" suffix with my molscript
input files, a ".povinc" suffix with the output of povscript, and ".pov"
with my PovRay scenes (which include the ".povinc" model) which are
ready for rendering.  I've set up all the sample input files that we
distribute with povray in this way.

So, a typical session might have you do the following:

	povscript < > test.povinc
	x-povray +D +I test.pov

I'll talk about running x-povray later, but first I'll tell you more
about PovRay scenes.
Almost every picture you would ever want to make in PovRay has to have a
few items in it.  These include:

1) A description of a camera in your 3D world.  This includes where it
is located, where it is looking, how wide of a field of view should it
have.  and so on.

2) At least one light source.  (Otherwise your picture comes out very

3) You may want the background set to some other color than the default,

4) Finally, you need to place all the items in your 3D world that make
up the picture.

Here is a sample input file that you might make.


camera { location <0, 0, 15>
         look_at <0, 0, 0>
         up y
         right 3/2*x }

background { rgb <0,0,0> }

light_source { <10, 10, 50> color rgb .8 }
light_source { <10, 10, 50> color rgb .2 shadowless }

//#declare RFont="timrom.ttf"           // Times Roman
#declare RFont="cyrvetic.ttf"         // Helvetica
#declare FontWidth=0.2

#default { texture { finish { specular 0.5 roughness 0.02 } } }
#declare molecule=union {
  #include "gdp.povinc"

object { molecule 
  rotate z*-90
  translate y
  scale <1,2,1>


I think a lot of this is pretty straightforward.  But i'll give you some
hints as to what you might need to change.

First of, comment your input files well!  Any text to the right of a 


is a comment ignored by PovRay.

If you are creating a picture of a LARGE object, you will need to pull
the camera farther back to see all of it, say to a 

	location <0, 0, 60>

Going on, the 

	right 3/2*x

statement is actually one of the harder concepts in PovRay.  PovRay by
default works in a left handed coordinate system.  Making "right" a
positive vector along the x-axis and

	up y

makes the scene a right handed system.  It also describes the aspect
ratio for the entire scene, independent of the number of pixels you use.
if you want your circles to be perfectly round, then set this ratio to
be the ratio of the dimensions of your image.  For example, to make a
600x400 pixel image, set this to 3/2*x.  For a 200x800 pixel image, set
it to 1/4*x.  Take any of the sample images and play with the "right"
parameter to see what happens.

You may have noticed that I create two light sources at the same
location in the PovRay scene.  If you used only the first light source,
areas in shadow would come out completely dark, which is a bit
unrealistic.  So I always put a second light source which casts no
shadows to light up these darkened areas a bit.

Models made by povscript have a default font and fontdepth used for any
labels.  You can override these defaults with the

	#declare RFont="cyrvetic.ttf"   
	#declare FontWidth=0.2

statements.  PovRay comes with a few installed fonts:

	timrom.ttf for Times Roman
	cyrvetic.ttf for Helvetica
	crystal.ttf for Courier

In theory, you can use any True-Type Font (.ttf) in PovRay's library
search path.  There are a bunch that come with the macintosh and windows
95 operating system.  For example, "symbol.ttf" is needed if you want
greek characters in your labels.  Unfortunately, this is a trademarked
font so we can't distribute it.  Go find a mac or PC and put symbol.ttf
in the include directory of your povray source tree if you need Greek

Note: PC .ttf fonts are all set for the UNIX version of x-povray.  Mac
.ttf files come with macinstosh resource forks which causes PovRay to
break.  If you want to use a mac .ttf font in PovRay, you need to strip
out the resources with a program called "TTConverter."  It's available
from the Info-Mac Archive.  You can get it from:

Every object in your scene has to define characteristics of it's
surface.  PovRay breaks this up into three sections:

	pigment - the color or pattern of the surface.
	finish - how bright is the surface, how shiny, how reflective?
	normal - do you want the surface to look bumpy?  dented?  rippled?

By setting a 

	#default { texture { finish { specular 0.5 roughness 0.02 } } }

this makes every object that follows in the scene WHICH DON'T HAVE THEIR
OWN DEFINED FINISH (models made by povscript do not, for example) to
have a specular shine.  This is, for example, the bright white shine
which appears on the face of a watch on a sunny day.  The variable
"specular" changes how bright the shine will be.  "roughness" changes
how spread-out the shine comes out.  The lower the roughness, the
smaller and more glass-like the shine.  The higher the roughness, the
more plastic a highlight.  Sometimes you may want to get rid of this
shine.  That's why we mention it here so you know how to do this.

Finally, in the sample input we declare an object called "molecule"
which is made up of a model that povscript made.

	#declare molecule=union {
	  #include "gdp.povinc"

This does not actually place a "molecule" into our scene.  This gets
done later with the command

	object { molecule 
	  rotate z*-90
	  translate y
	  scale <1,2,1>

Note that here we can scale, rotate and translate the entire object
"molecule" in one command.  All rotations are made around the origin.
Note that the order of these transformations is important.  If you take
an object which is centered at the origin, rotate it around the y-axis
by 90 degrees, then translate it 2 units along the x-axis, you get at
object centered at <2,0,0>.  On the other hand, if you take the object
and translate it 2 units along the x-axis, then rotate around the y-axis
by 90 degrees, you wind up with an object with the same side facing you
but centered at <0,-2,0>!  Think about it.  You should be able to figure
it out.

Once you are ready to render a scene, there are a few command-line
options to x-povray that you should know about.  For example, the
command to make a test render might be:

	x-povray +D +I test +W300 +H200 +SP4

The options I've used are:

	+D - Display while rendering.
	+I - The name of the input file.  By default, povray looks
		for a file with a ".pov" suffix, and writes out a 
		targe format image with a ".tga" suffix.  (test.pov 
		renders test.tga)
	+W300 - Render 300 pixels wide
	+H200 - Render 200 pixels high
	+SP4 - "Starting preview" 
		This is pretty cool, actually.  For the first pass,
		calculate every fourth pixel.  For a second pass, 
		calculate every second pixel.  In a final pass, 
		calculate every pixel.  Yes, it takes twice as long
		for the entire job, but it allows you to quickly see
		the entire scene.

Once I get everything looking good, I might type

	x-povray +I test +W1200 +H800 +A +V &

The only added options are

	+A - Antialias mode.  (Takes longer, but gets rid of jagged edges)
	+V - Verbose mode.  (Gives more info during render)

Oh, one more usefull option is:

	+C - which tells povray to attempt to continue an unfinished render.
		(in case a long job died before it was finished)

Ok.  That's it!  Go play, and good luck!  If you make any images that
you are proud of and would like to share with the rest of the world,
send me a copy and I'll put it on the povscript web page.

-Dan Peisach