POV-Ray : Newsgroups : povray.object-collection : (First?) Contribution Drive: Office Supplies : Re: (First?) Contribution Drive: Office Supplies Server Time
23 Feb 2024 04:33:47 EST (-0500)
  Re: (First?) Contribution Drive: Office Supplies  
From: Warp
Date: 21 Jan 2008 13:53:37
Message: <4794ea31@news.povray.org>
Chambers <ben### [at] pacificwebguycom> wrote:
> OK, to try this out, I'll be collecting, for a period of one week, 

  Do you think that's enough?

> 2) Try to use a macro parameter to define the size of your object.  If 
> you cannot, then please use a variable named 'meter', and place the 
> following at the beginning of your code:

> #ifndef(meter)
> #declare meter = 1.0;
> #end

> Then, create all your objects based on this variable.

  I would like to suggest what I suggested in the other post:

  If possible, try to make the different dimensions of the object
configurable. For example, if you are making a table, try to make
it possible to define either the width and depth or the "aspect
ratio" of the tabletop, the length of the table legs, etc. instead
of just creating a fixed model. In some cases it may be feasible to
put some limits on the given measures.

  The most flexible way to do this is to put something like this in
the include file:

#ifndef Someid_Table_Leg_Length
  #declare Someid_Table_Leg_Length = 5;

  Or, alternatively:

#local Table_Leg_Length = 5;
#ifdef Someid_Table_Leg_Length_Factor
  #local Table_Leg_Length = Table_Leg_Length * Someid_Table_Leg_Length_Factor;

  This way people can either use your #include with its default settings,
or they can fine-tune some settings like:

#declare Someid_Table_Leg_Length_Factor = 1.2;
#include "theinclude.inc"

  It would also be nice to be able to configure other things about the
object in a similar way. For example, if you are making a lamp, it should
be possible to tell if the lamp is on or off, and its brightness/color,
for example like:

#declare Someid_Lamp_Light = on;
#declare Someid_Lamp_Light_Color = <1.2, 1, .6>;
#declare Someid_Lamp_Light_Fade_Distance = 4;
#include "thelamp.inc"

  Likewise for other similar things, eg. object which can be open or close,
objects which can have parts which are rotated (ie. it should be possible
to define the rotation angle for that part), etc.

                                                          - Warp

Post a reply to this message

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