More selected projects

The Galaxy Creator

The sketch created a follow-my-leader trail of particles as the user interacted with the sketch by moving the mouse. Various forces were applied to produce a suspenseful animation that resulted in creating patterns with similarities to galaxy type of structures.

 

produced by: Colin Higgs

 

The concept

To create a tendril-like attraction algorithm to produce a trail similar to how ink travels in water.

The result

The result was unexpectedly and pleasantly more galactic in nature. 
This led to work that was more elegant, less chaotic and more satisfying.

Requirements

The user interacts with the sketch by moving the mouse, in doing so the user becomes aware of the forces acting on the particles and reacting to them.


Inspiration Galaxy Images and Ink images

  • gallery-image
  • gallery-image
  • gallery-image
  • gallery-image
  • gallery-image
  • gallery-image
  • gallery-image
  • gallery-image
  • gallery-image
  • gallery-image

 

The Algorithm

I started off with this found algorithm:


dis = (p.px - px)*(p.px - px) + (p.py - py)*(p.py - py);

f = (force + p.force) / (dis); 
fx = f * (p.px - px);
fy = f * (p.py - py);
 
vx += fx;
vy += fy;

This algorithm is similar to Shiffman's online algorithm. 
http://natureofcode.com/book/chapter-2-forces/
Where particles are attracted to a singular central particle.


The 2 points below are the initial concepts used as a starting point.

1. I started with the same algorthm
2. All the particles are being attracted to the last particle

I rewrote and devoloped the algorithm with array lists (based on my previous work of particle interaction).

I simplified the algorithm from:

 My first equation:

My acceleration =   Fvmag/D*D= Amag  
D=magnitude of Dxy=|Pxy particle pos-Sxy search posn |
Afinal = (Fvmag/D*D )  *Dxy


My second equation:

Initial search force  Fvmag/Dmag where Dmag=Pxy particle pos-Sxy search posn   
 

Fvmag= Random selected acceleration based on a search acceleration of approx 10m/s/s.

Afinal =Fvmag/Dmag *  Dxy normalized + Fdrunk


Finally, I added a timer and a new random “drunken” force to the equation so the particles floated and suspended more. Due to mutiple forces being in play.

 

 

Summary of forces and the algorithm

 

 

Summary

The final force was :

 

Afinal =Fvmag/Dmag *  Dxy normalized + Fdrunk 

Fdrunk:
had 4 values different values triggered by a timer. This resulted in the particle stream being susupended in air. The scenes were auto reset every 15 seconds with a random selection of particle array patterns.

3 repetitions of the algorithm were made and displayed together with the 10 particle reset functions I added at different times.

 

Further Development

Further algorithm development would be to introduce a semi-snake algorithm, like the game in which the snake grows as he eats food along a path and his tail gets longer. Another possibility to explore would be also adding a fragmented stream algorithm which would make multiple paths that follow the leader.

Moving forward it would be interesting to develop another algorithm that comes in to play when the particles are suspended which creates smaller strands by dividing the longer strands. 

 

Self Evaluation

The algorithm was pushed and played with a number of times by adding other algorithms but they did not make a drastic improvement. The introduction of random forces helped a lot and this would be another type of algorithm to explore further. Although the intial algorithm was taken from another source of work that initial sketch and my final sketch are quite different. My piece of work produced more a of a trail of work that stayed on screen and was suspended on screen and mine added fresh reset values continously on screen. 

The development of the work introduced different displays of all the particles to form a variety of starting  patterns on screen. The particles were also constrained to only exist with a selected areas on screen. A rebuilt function was added to reinitalize the display to help engage the user. Perhaps, the starting display of the particles could exist in many small areas on the screen and not just as a cluster in a designed area. 

The fundamental exploration changes would be to just keep on trying out different algorithms until the results formed complementary changes. The theory and practice of different alogorithms was not wholey predictable.