POV-Ray : Newsgroups : povray.unofficial.patches : name for no interpolation : Re: name for no interpolation Server Time
8 Jul 2024 17:36:10 EDT (-0400)
  Re: name for no interpolation  
From: Christoph Hormann
Date: 11 Sep 2002 11:01:28
Message: <3D7F5AC4.95F64565@gmx.de>
Le Forgeron wrote:
> 
> [...]
> 
> Please, do not waste your time at writing such kludging-macro, when the
> best solution would have been to change the syntax of the poly objects
> so as to parse only the useful information. At worst, if backward
> compatibility is an issue, a new 'poly2' syntax would be able to provide
> the new one while the old 'poly' remained unchanged. (just like the new
> mesh2... same core object, different syntax!)

I disagree, the current syntax isn't exactly easy to use in hand written
code but wrapper macros can much improve that.  Adding more than 100 new
keywords is really not a good idea IMO, it would enormously blow up the
already large parser (the current parsing code for the poly object is
really compact).  Your suggestion would also introduce a disturbing double
meaning to the x, y and z identifiers.

A serious advantage would of course be the potential for signatures and
the shortest code contest.

If a new syntax is made for poly objects i would suggest using 'exponent
vectors':

poly2 { 
  <6, 0, 0>, 1,
  <0, 5, 0>, 1,
  <0, 0, 4>, 1,
  <0, 0, 0>, -10
}

poly2 { 
  <6, 0, 0>, 1,
  <0, 5, 0>, 1,
  <0, 0, 4>, 1,
  <0, 0, 0>, -10,
  <2, 1, 3>, -3
}

You could still declare symbols for the vectors but the parser would be
kept clean from unnecessary clutter.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

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