Saturday, May 29, 2010

I've been playing with curves...



Specifically, I've been playing with how to animate curves and keep them random but smooth. This here's my second version. The original is below. A little less trippy...or at least a different trippy.

OH, by the way. Click the above to change the color of the glow. Some glows are more powerful than others, so if you don't see much of a glow...click!



The bulk of this is done by connecting an array of points with Flash's curveTo function and then then slightly changing the curve values every frame. The top was made with a BitmapData field over the top to give that glow effect (see 2 posts ago). As for the non-glowing version, I simply told the curves to fill in with a color. Since the points are intersecting all sorts of wobbly angles, you'll have some "negative" areas that won't be filled in, generating a nifty little checkerboard effect.

UPDATE: Looking at this little project the day after the fact reminds me why I love doing this so much. I put a VERY slight offset in the curve points that are randomized. The curves work wonderfully to show how a small change can have a large impact. If the initial offset was too large, you'd see the curves jitter as they scramble to their new random point. With no offset, the curves would essentially loop indefinitely in the same pattern (I'm using sin to loop). This tiny tiny offset adds upon itself, so once through the sin period, it has altered ever so slightly. Given that there are....I think 50? points on each glob of curves, that winds making a whole new pattern EVERY time it cycles through! The odds of getting the same exact curve are next to nothing! Add to that the fact that there are really 3 individual continuous curve globs and you really won't see the same thing twice...fun!

No comments:

Post a Comment