Don Havey

Sustainably harvested information

Archive for the Flash Category

Fixed  

Oops. I hadn’t noticed that the inline code blocks were displaying incorrectly since I upgraded a plugin. I’ve reverted to the old version of the plugin and vow to never update anything ever again. Sorry about that.

The article has

no responses yet

Written by Don

September 10th, 2008 at 5:04 pm

Inverse-kinematic springy grass  

IK grass previewThis isn’t a formal tutorial… just a source code dump. I made this randomized, springy IK grass in Flash for Curiobot a while ago, but decided that it was too CPU-intensive to risk combining with all of the DOM-scripting on the site. As such, I didn’t bother optimizing it much, so that’s up to you.

The files: IK grass classes

The final result: Springy IK grass

Click on the stage and then move your mouse left and right to simulate a breeze through the grass.

The variables contained in the .fla are pretty well labeled… you shouldn’t have any trouble playing around with them. I’m afraid the thing was built in Flash MX 2004… so it’s AS2.0, not AS3.0. But it wouldn’t be hard to convert… it’s already OOPed. I think I’ll put it into Processing soon. Should run much better.

Enjoy!

The article has

no responses yet

Written by Don

April 28th, 2008 at 9:31 am

Paul Bourke  

I should give a nice big link of thanks to Paul Bourke and his excellent website, which has been helping novice programmers like me find answers to their geometry questions for many years.

Paul Bourke was one of the first people to publish clear, concise, down-to-earth solutions to common math questions from a computer programming standpoint. While in college, I took a class taught by Golan Levin, who introduced us to the website.

When other sites will be using matrices and trigonometry to approach a simple problem, Paul Bourke’s solutions rely almost solely on basic arithmetic. This is a good thing.

Whenever you see a variable prefixed with a “pb” in my code, that’s my acknowledgment that the solution was derived from the ones posted on his site.

The article has

no responses yet

Written by Don

April 6th, 2008 at 10:13 pm