POV-Ray : Newsgroups : povray.general : Q: Your scripting style : Re: Q: Your scripting style Server Time
8 Aug 2024 06:12:37 EDT (-0400)
  Re: Q: Your scripting style  
From: John VanSickle
Date: 13 Feb 2001 03:31:15
Message: <3A88F0F8.38F4C05@hotmail.com>
Marc-Hendrik Bremer wrote:
> 
> Hi,
> 
> I would like to know, how you manage to keep track of the things in your
> more complex scenes, 'cause I've problems with this.
> 
> So, how are you doing these things?

My scripts use the following conventions:

CSG brackets are marked with the object being put together, such as:

union { // the camera
  union { // the camera case
    box { ... }
    sphere { ... }
    cylinder { ... }
    // etc...
    texture { CameraTexture }
  } // end of the camera case
  difference { // the lens
    sphere { ... }
    sphere { ... }
    material { LensMaterial }
  } // end of the lens
} // end of the camera

I always indent (or at least try to indent) each level of nesting.
An indent of two spaces is enough for me; your mileage may vary.

A lot of my .inc files make use of variables passed on by the calling
script.  The first thing in the .inc is code defining those values
that I may have neglected:

#ifndef(RobotArmed)
#local RobotArmed=false;
#end

In my current IRTC project (which will feature Rusty, Domo, and Rosie),
I have one script file which positions the robots, another that places
the camera, others that place the static objects, build the robots, etc.

Hope this helps,
John


Post a reply to this message

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