Saturday 9 July 2011

Model realistic movement that is subject to friction

/*
Model realistic movement that is subject to friction
and therefore non-uniform acceleration/deceleration.
*/

float velocity = 50.0; //added to y coordinate
float friction = 0.99;

/*velocity is multiplied by friction, because friction
is less than 1, friction decreases the velocity with each frame
so the 'ball' slows down, until we re-boost it with a mouse press */

float y =0;

void setup() {
size(400, 400);
}



void draw() {
background(255);

fill(255, 0, 0);
ellipse(55, y, 45, 45);
velocity*=friction; //this decreases velocity with every frame.

y +=velocity;//add this to y;
//check for edges:
if ((y>height) ||(y<0)) {
velocity=-velocity;
}
println(velocity);
}

//reboost the 'ball'
void mousePressed() {
velocity =10;
}

Visualising name, age, height, data



























String name ="Taumata­whakatangihanga­koauau­o­tamatea­turi­pukakapiki­maunga­horo­nuku­pokai­whenua­kitanatahu"; //name of a hill in NZ


Friday 8 July 2011

Glasgow Coma Test (GCT)


Worrying results from the Glasgow Coma Test: It thinks I have a mild head injury...
:-/

Thursday 7 July 2011

Visualisation of 'Chakra' test results



Results from my Chkara Test, 07/07/11. Chakra test available at : http://www.eclecticenergies.com/chakras/chakratest.php, and mapped to my body.











Sequences of EEG readings mapped to my image
















The brainwave frequencies are mapped to colours that tint the video as I capture my EEG readings, by coincidence they look like 'aura' images or images of Chakras ('wheel-like vortices which, according to traditional Indian medicine, are believed to exist in the surface of the 'etheric double' of man' (wikipoodia where else). I used the crude background subtraction and transparency effect I wrote the other day in Processing.

Wednesday 6 July 2011





















I'm trying to obtain images inbetween 'fractional fixations', capturing the ninety waking minutes a day each of us reputedly spends in total darkness...I'm not sure if that's really the same thing as a blink, or if a saccade is even smaller, but even a blink seems to represent cognitively indiscrete moments of darkness, a partial loss of awareness, when 'we are basically sightless' (Cognitive Impact of Eye Movements in Picture Viewing, Gufran Ahmad, Yukio Ohsawa, Yoko Nishihara, International Journal of Intelligent Information Processing, Volume 2, Number 1, March 2011)

Tuesday 5 July 2011

Various ways of converting from decimal to binary

/*
Various ways of converting from decimal to binary
In order to convert a decimal number to its
binary equivalent, you repeatedly divide
the decimal number by 2, the base of the binary system.
Division by 2 will either give a remainder of 1 (dividing an odd number)
or no remainder (dividing an even number). Collecting the remainders
from our repeated divisions will give us the binary answer....

*/

void setup() {

//convert decomal to binary

int mynum = 13; // num to unpack
for (int i=mynum; i >= 0; --i) { // start at 31, go down to 0
int bit = 1 << i; //clever bit wise operator
if ((mynum & bit) == bit) {
print(" 1 ");
}
else {
print(" 0 ");
}
}
println("\n ");
//could also just cheat and do
println(" CHEAT:" +Integer.toBinaryString(13));

//another way:


int dec, rem;
int i=1;
int sum=0;

dec =13;
do
{
rem=dec%2;
sum=sum + (i*rem);
dec=dec/2;
i=i*10;
}
while (dec>0);
println("The binary of the given number is:"+sum);

//even simpler:

int x =13;

while (x>0)
{
int y=x%2;
x=x/2;
System.out.print(y); //reverse numbers to get the proper binary number
/**
The while loop will run until the variable x is equal to 0. While running,
this loop will get the remainder of x divided by 2, assign the remainder to variable y,
divides x by 2, and prints out y to display to the user The process repeats until x is 0.
*/
}
}

Monday 4 July 2011

Ganesh calming Android phone app



Ganesh calming Android phone app

















very simple:
PImage gan;
int counter;

void setup() {

gan =loadImage("ganesh.png");

background(#FF99FF);
}




void draw() {
imageMode(CENTER);
counter =frameCount;

translate(width/2, height/2);
image(gan, 0, 0, width, height);
rotate(counter*TWO_PI/360);
strokeWeight(5);

stroke(#CC527A);
fill(#FF99FF);


tint(255, frameCount%5);
noTint();
tint(255, 124);

image(gan, 0, 0, 400, 400);
noTint();
tint(255, frameCount%120);
image(gan, 0, 0);

}

Saturday 2 July 2011

The Global Consciousness Project Meaningful Correlations in Random Data

The Global Consciousness Project could form the basis for an interesting arts project, the site includes 'EEG tapestries', with data gathered at the time of major traumas, earthquakes, train crashes etc and tries to prove a linked consciousness and impact on random number generation...

http://noosphere.princeton.edu/

Subtle interactions link us with each other and the Earth

"When human consciousness becomes coherent and synchronized, the behavior of random systems may change. Quantum event based random number generators (RNGs) produce completely unpredictable sequences of zeroes and ones. But when a great event synchronizes the feelings of millions of people, our network of RNGs becomes subtly structured. The probability is less than one in a billion that the effect is due to chance. The evidence suggests an emerging noosphere, or the unifying field of consciousness described by sages in all cultures.

The Global Consciousness Project is an international, multidisciplinary collaboration of scientists and engineers. We collect data continuously from a global network of physical random number generators located in 70 host sites around the world. The data are transmitted to a central archive which now contains more than 12 years of random data in parallel sequences of synchronized 200-bit trials every second"