POV-Ray : Newsgroups : povray.newusers : Problem with macros and translate function :/ : Re: Problem with macros and translate function :/ Server Time
20 May 2024 03:52:55 EDT (-0400)
  Re: Problem with macros and translate function :/  
From: jr
Date: 23 Aug 2023 09:10:00
Message: <web.64e604c2d6a8965b80c03e9d6cde94f1@news.povray.org>
hi,

"aysays" <nomail@nomail> wrote:
> Hello I'm new to Pov-Ray and am trying to write a broccoli fractal code however

great.  enjoy!


> I'm having problems with the translate function. If I understood it correctly,
> translate only accepts numerical values. I tried writing a macro but that didn't
> work either. How am I supposed to write a recursive function that utilizes
> translate? :/ Here is my code:

have not the time to delve deeply, right now, just a couple of things (as you're
"new").

scene files ought to have a '#version' directive as (one of) their first lines.
re variable names, I too am all for lowercase but you will have to be very
careful, using capitalised or pre/post-fixed names is recommended and "safe".
use '#local' inside macros, rather than '#declare's.

re the recursive macro.  I'd be uncomfortable trying to create, um, a cone of
cones, inline, suggest a macro which expands to one cone, and call/place that
from within the loop  in 'frac()'.  hth.


regards, jr.


Post a reply to this message

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