|
|
while ( int i = r; i > 0; i - 1 ) is a counting loop that will count from
"r" backwards by 1 each loop. The value stored in r is preserved so it
can be reused. The loop ends when i = 0. If r doesn't need to be saved,
declare it inside the loop and r will be destructed when the loop is
exited.
You could store the coordinate in another variable and then factor it by
i inside the while loop.
Lewis wrote:
> I'm trying to make a macro that outputs an infinite surface area cube.
> This cube is really your usual cube, with so many pieces cut out of it
> so that it is almost infinite in surface area, but has the same volume
> as the original.
>
> The idea is to create a basic box, and then difference out, say, 3
> quarters of it, but not really three quarters, because each quarter is
> scaled down to leave a bit of the original box as a frame. Then the
> macro passes itself the coordinates of the last quarter, and thus runs
> recursively. The result should be very complex and defined by a number
> given to the macro when it is first called. Each time the macro
> recurses, it decreases this number and calls itself again, until this
> number reaches zero.
>
> Any ideas how to do this? I tried, but couldn't figure out a way to
> define the coordinates of the three quarters so that I can difference
> them out and to pass the last quarter.
>
> I guess nobody will understand any of this but hey, I gotta try...
Post a reply to this message
|
|