Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => (new) Theories & Research => Topic started by: DarkBeam on July 23, 2012, 09:21:31 AM




Title: Folding around a rectangle
Post by: DarkBeam on July 23, 2012, 09:21:31 AM
I found this solution while trying to replicate objects around a rectangle. Because folding is much faster than "make" objects one by one then take the minimum DE. :embarrass:

It should be something like this. I literally report my assembly solution that works. Surely there are much better ones to be found :angel1:

Code:
// fold, user float that defines the space between objects
// where p,q,r modify the shape, user floats
// where n tells how much you need to fold (slows down, use the minimum needed!)
x = abs(x); y = abs(y);
t = x-y-p; y = x+y-q; x = t;
x = -abs(x);
t = (-(x+y)-r)*0.5; y = (y-x-r)*0.5; x = t;
repeat (2*n) times {
x = abs(fold-x);
}

// creates a double list of objects
// y = abs(fold2-y); y = abs(fold2-y);

Let me know what you think. :beer: