A little free time

With the holidays my workload has backed off a little and I’ve been checking out chrome experiments for some inspiration. One of those was Ablaze js. One of the first graphic tricks I used on my TRS-80 color computer on the high resolution black and white mode 256×192 pixel screen was drawing curves with string art style lines. I never made it past just filling in along the sides of the screens. Seeing ablaze brought me back to those days.

So string art is my take on doing something similar. I wanted to use the same string art style and the brilliant colors of the original. However I wanted it to continue to evolve and look good indefinitely. I also wanted to use the differential equation solver as the source for the lines.

The first thing I thought about was the movement of the lines. I started with a particle system moving in a force field. The particles are moving in a central force field with a moving center. Overlaid on that is a uniform magnetic field so that the particles travel in tight loops.

Once I had the particle motion nailed down I experimented with several attempts to get something that looked good. My first attempt was to just draw lines between randomly generated particles. That started out with a nice initial distribution, but got unruly as the system unfolded. Next I tried similar particles, but those eventually drifted too far apart. Adding code to force them back together created some strange wedge shapes. Eventually, I settled on drawing a tangent line segment centered on the current location.

I tried a few simple color schemes before I settled on the blue and gold. If I spend some more time on it, I plan on making the colors independent for each particle and dependent on the velocity, but this looks good enough for now.

Related Images:


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *