POV-Ray : Newsgroups : povray.windows : Problem with macros and translate function :/ : Re: Problem with macros and translate function :/ Server Time
7 Dec 2023 14:12:11 EST (-0500)
  Re: Problem with macros and translate function :/  
From: Leroy
Date: 23 Aug 2023 14:25:00
Message: <web.64e64e5cd6a8965bd082ffedf712fc00@news.povray.org>
"aysays" <nomail@nomail> wrote:
> Hello I'm new to Pov-Ray and am trying to write a broccoli fractal code however
> 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:

Welcome to POV! Hope you'll have as much fun as I've had.

I don't do many recursive macros. But I do see that one problem is the i loop is
in a cone so you have a n-1 cones with 100 closing }. You can't put cones in
cones that way.

The #macro trans() look alright, the i and ang variables are #declare  before
it's called. That works fine. But when we write a macro we usually feed values
to it. Like #macro trans(C,A) and use C & A in the macro. It just help you keep
track of what the macro needs and makes the macro more mobile.

There is a lot more that macros can do. Read the documentation! There is a lot
to POV. I'm still learn something new once in awhile and been at it for over 30

Come to think of it, do a search for POV recursive macros and there is probable
a few complete macros you can use.

Hoped I helped in a small way.

Have Fun!

Post a reply to this message

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