You can webstart or download source.
Source requires JGoodies Forms.

Have changed some things again, and once again thanks to Romain for pointing me in the direction i needed to go.

The drawCurve function now works by using a general path to create the curve, rather than the way romain was previously using (basically..creating a cubic curve and then subtracting from the area created to get the bottom curve). What does this mean? it means i’ve turned the Rendering Hints back on to high quality, because the crappy 500mhz PII’s i’m targetting this small project for are finally able to handle it alot better.

This CurvesPanel is getting around 15% to 20% CPU Usage on my celeron 2Ghz.. most of the non-cheapass(read non-celeron) CPU’s seem to handle it quite well, starting around the same and dropping to 0%-5% pretty quickly (it did this on my P4 3.0E at home and the AMD Sempron 2400 at work) and on the 500Mhz PII’s here it’s pulling about 50% of the CPU.

I moved house recently, and i’m finding it pretty boring. Whenever something in my computer breaks i goto google and theni remember, my dsl is being relocated *YAWN*. So anyway, while i wait for this to happen i’ve been playing lots of Empire Earth II because i can’t get online to play World of Warcraft.

Not too bad a game honestly, i’ve been spending about 3-4 hours a day playing it at least. My major problem is that it so far doesnt seem much different to the old Empire Earth. When will people stop bringing us just a rehash of their first game with bugger all changes as a sequel!?

You can webstart or download source. (Updated Here)
Source requires JGoodies Forms.

I’ve been working for a few days on trying to get the CPU usage down on Romain Guy’s Follow The Curves Demo and i believe i’ve gotten it to a semi-acceptable level.

I’ve done this by implementing Dim’s gradient panel from the blogs comments, this buffers the rather complex gradient on the background, hence stopping it from redrawing every single time we paint he animation and it took quite a load off the CPU. Next i went about changing some of the rendering hints to some lower quality values and i honestly can’t see a differnece. I then started to do some minor code changes which envolved chagning all the floats to doubles (it seems to lightly increase performance) and also changing all divide by 2 references to right shift 1 and the multiply by 2 to left shift 1.

Now on starting it’s using about 46% of my work box’s CPU (Celeron 2ghz) and after running for about 5 seconds it hovers around the 8% / 13% mark and then after another 3 seconds it’s ranging from 0% / 3%. Quite significant improvements for a demo that was starting at bout 70% and hovering around 50% still after a long period of time.