Thank you for giving it a go Une! I can make it better wrt a different
way of programming. This tends to overwhelm the cpu with computation and
the use of the garbage collector. Wrt GC, the JavaScript engines tend to
create new object for every array passed to a function. For instance, I
can pass two 3d points and a radius like this wrt the style of my
current code:
foo([-1, 0, 0], [1, 0, 0], 1);
Each array index is mapped to (a[0] = x), (a[1] = y) and (a[2] = z).
This will create two damn arrays for each call! And those go into the
GC. Read here for some further information:
https://groups.google.com/d/topic/comp.lang.javascript/dgakiMzhgv0/discussion
Also, it can burn CPU because DLA points never die off! I need to allow
them to die off and leave the per-field-line segment vector field
summation. The more points, the slower it goes. I wonder if changing the
color of the field lines to grey, or some color that designates turning
"brown/yellow", or the interpolation of the death cycle wrt specific
colors. The act of death would take pressure off the core field logic
wrt reducing iterations.