POV-Ray : Newsgroups : povray.unofficial.patches : Something fresh - symetry operator patch : Re: Something fresh - symetry operator patch Server Time
20 Jul 2024 21:17:12 EDT (-0400)
  Re: Something fresh - symetry operator patch  
From: Warp
Date: 11 May 2001 07:48:01
Message: <3afbd171@news.povray.org>
Modifying the POV-Ray source code and thus making a patch can be cool
(I have made that, I know what I'm talking about :) ), but it's important
to be aware of one thing:

  If the exact same functionality can be made with an include file (usually
implemented as a #macro) without noticeable resource penalty (time, memory,
etc) nor compromise in easy-to-use, then the #macro is definitely the
right choice.

  Why?
  If this kind of thing is made by modifying the source code, it will only
cause more trouble than it's worth. It will also limit the functionality of
the new idea a lot.
  Adding new patches to a patch collection (such as MegaPov) or even the
official povray is usually a maintenance nightmare and a lot of work.
  Also the functionality of a patch is extremely fixed, ie. unmodifiable
(at least without having to modify the source code itself).

  A #macro, however, is much more versatile. You not only can use it, but
you can look how it is done, learn from it, modify it for your specific
needs, make your own version of it and so on. A #macro is much easier to
take (just download the include file from a website to your include
directory); you don't have to wait for someone to include it in MegaPov or
whatever. A #macro is also much less likely to have bugs than a patch.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

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