The Visual-Cortex, a powerful graphics-engine? Expensive compute–

3D

Programming 3D environments without many high level libraries makes clear why the visual-cortex is so large! [truly its because of how expensive it is to compute I think] Below are some excerpts of the low level of objects written to build from the ground up, everything. From vertex to triples, to triangles, and beyond– not recommended for anything besides painful learning. Especially with the verbosity of Java, here’s part of a triple class.

import java.nio.FloatBuffer;
import java.util.Scanner;

public class Triple
public double x, y, z;
public Triple( double a, double b, double c ) {
x = a; y = b; z = c;
}
public Triple( Scanner input ) {
x = input.nextDouble();
y = input.nextDouble();
z = input.nextDouble();
input.nextLine();
}

public void sendData( FloatBuffer buff ) {
buff.put( (float) x );
buff.put( (float) y );
buff.put( (float) z );
}

This isn’t the hard part for our brains thought, but rather just how expensive it is to compute as the complexity of the world increases.

Had to finally build that castle in the sky

Which is then a part of a single vertex, like below; then with three vertices of 2 triple’s…. *drum roll* we can create a single shaded triangle.

import java.nio.FloatBuffer;
import java.util.Scanner;

public class Vertex {
private Triple position;
private Triple color;
public Vertex( Triple p, Triple c ) {
position = p;
color = c;
}
public Vertex( Scanner input ) {
position = new Triple( input );
color = new Triple( input );
}
public void sendData( FloatBuffer pb, FloatBuffer cb ) {
position.sendData( pb );
color.sendData( cb );
}
}

Then we have to think about what a world is, how to simulate it and compute it. A couple visuals give indication of whats involved without having to spend hours on this.

As my programs got more complex the resources consumed were too high to scale nearly at all on my devices, another point for the brain on that one.

It’s was about here for me when programming the view of agents in a world that matrix-algebra stopped being annoying and instead was totally awesome for the first time.



2D

Tons of individual agents each acting according to their internal rules based on the limited knowledge they have[keeping this a bit simpler than game theory with humans]? Two dimensions is plenty, below demonstrates some interesting, beautiful behavior emerging from just 3 simple rules.

This is a python variation I played with of Craig Reynolds, ‘boids’ algorithm from 1986. The behavior is determined by just 3 rules which each of the boids, or particles in this case, follows for itself. I ran this on my ipad and the compute slowed it to barely a crawl so afterward I speed it up with video editing software.

There is actually one more rule here, a 4th force helping to keep them on the screen

  • separation: steer to avoid crowding local flock
  • alignment: steer towards the average heading of local flock
  • cohesion: steer to move towards the average position (center of mass) of local flock

Some simple programs like these [even simpler], are turing complete and some sets of rules even create seemingly never ending complexity. If that sounds totally insane then you need to visit Stephen Wolfram’s work.

https://demonstrations.wolfram.com/CobwebDiagramsOfElementaryCellularAutomata/

This is a short little clip from recording the p5js program I uploaded onto a page of my blog on the left side. It allows for the variables controlling length of joining and acceleration/deceleration to be adjusted.

https://larsenclose.com/autopoeticcomplexity/

The following ones are also boids varients, these inspired by some of Daniel Shiffman’s work in his book on simulation nature . It has two flocks with different ranges of starting characteristics, also interactively, tapping the screen adds to each flock. A long screen press toggles what I call visualized entropic mode, were the history of the biods movements is retained. Then shaking the device will clear the screen. I built an APK for Nethunter and one for the Graphene android I had been been working on.

Clearly the behave in some very interesting ways despite being incredibly simple.

Since apparently this is a graphics and virtualization extravaganza, here’s another which is beautiful, though I only generated it through passively noting all the signal data from an area I was in, well 2.4ghz and 5ghz anyways.

If anyone wants to check out the little android simulation app I can put a signed APK up on here with hashes or I could push to Fdroid or Publish it on the play store. It’s purely aesthetic so I hadn’t been planning on doing that.