Baby Pause is here

As some of you may know, I’m now the proud father of Willow (Baby Pause), full name Willow Mia Csoka, born 25th May 2011 05:46 am BST, at Whipps Cross Hospital.

All I can say is, she’s beautiful, and my heart stops every time I look at her

Willow and I

Willow and I

I you want to catch up with Willow’s life, you can check her blog out Life in the big world by Willow Mia Csoka

Laters

Advertisements
Posted in Life | Leave a comment

Mudeford harbour

20110428-071052.jpg

20110428-071341.jpg

20110428-071439.jpg

20110428-071424.jpg

20110428-071432.jpg

Location:Christchurch,United Kingdom

Posted in Uncategorized | Leave a comment

America – Fuck Yeah!

Posted in Uncategorized | Leave a comment

Symmetric Chaos

Been playing with some code for generating symmetric chaos, from the book by Michael Field and Martin Golubitsky – Symmetry in Chaos.

Just a wee bit of processing, it uses the ControlP5 lib for value sliders.

Anyway here it is.

import processing.opengl.*;
import controlP5.*;

ControlP5 controlP5;
MyControlListener myListener;

int   iter   = 1000;
float lambda = -2.54;
float alph   = 5.0;
float beta   = -2.0;
float gamma  = 1.05;
float omega  = 0.19;
int   degree = 6;

int scaling = 40;

int ss = 600;
boolean stop = false;

float x = 0.01; float y = 0.003;
int cols [][] = new int[ss][ss];

void setup() {
 size(ss, ss, OPENGL);
 smooth();
 resetPixels();

 // sliders
 controlP5 = new ControlP5(this);
 controlP5.addSlider("lambda", -4, 4, lambda, 10, 10, 500, 10);
 controlP5.addSlider("alph", -10, 10, alph, 10, 30, 500, 10);
 controlP5.addSlider("beta", -20, 20, beta, 10, 50, 500, 10);
 controlP5.addSlider("gamma", -4, 4, gamma, 10, 70, 500, 10);
 controlP5.addSlider("omega", -4, 4, omega, 10, 90, 500, 10);
 controlP5.addSlider("scaling", 0, 200, scaling, 10, 110, 100, 10);
 controlP5.addSlider("degree", 3, 40, degree, 10, 130, 100, 10);

 myListener = new MyControlListener();
 controlP5.controller("lambda").addListener(myListener);
 controlP5.controller("alph").addListener(myListener);
 controlP5.controller("beta").addListener(myListener);
 controlP5.controller("gamma").addListener(myListener);
 controlP5.controller("omega").addListener(myListener);
 controlP5.controller("scaling").addListener(myListener);
 controlP5.controller("degree").addListener(myListener);
 background(0);
 colorMode(HSB, 360, 100, 100, 1);
}

void draw() {
  for(int j = 0; j < iter; j++) {
    float zzbar = x*x + y*y;
    float zreal = x;
    float zimag = y;
    for(int i = 0; i < degree - 2; i++) { 
       float za = zreal*x - zimag*y;
       float zb = zimag*x + zreal*y;
       zreal = za;
       zimag = zb;
    }
    float zn = x*zreal - y*zimag;
    loat p = lambda + alph*zzbar + beta*zn;
    float xnew = p*x + gamma*zreal - omega*y;
    float ynew = p*y - gamma*zimag + omega*x;

    int xi = (int)(xnew*(ss/2 - scaling)+ss/2);
    int yi = (int)(ynew*(ss/2 - scaling)+ss/2);

    if(xi >= 0 && xi < ss && yi >= 0 && yi < ss0) {
      cols[xi][yi]++;
      stroke(360-cols[xi][yi], 70, 70, 0.7);
      point(xnew*(ss/2 - scaling)+ss/2, ynew*(ss/2 - scaling)+ss/2);

      x = xnew; y = ynew;
    }
  }
}

void resetPixels() {
  for(int i = 0; i < ss; i++) {
   for(int j = 0; j < ss; j++) {
     cols[i][j] = 0;
   }
 }
}

class MyControlListener implements ControlListener {
  public void controlEvent(ControlEvent theEvent) {
    background(0);
    x = 0.01; y = 0.003;
    resetPixels();
  }
}

The initial image is a nice 6 fold pattern, that looks somewhat like a flower

Posted in Uncategorized | Leave a comment

Baby Pause

We had our 28 week scan done today, both 2d and 3d.

So here to say hello to the rest of the world for the first time is Baby Pause

Love

Posted in Life | Leave a comment

Spaghetti question

We’ll start with an easy question.

A man has a large number of 1 meter long sticks. He breaks these into 2 pieces (assume the break is at a random point on the stick), and keeps the shorter piece each time. What is the average length of the pieces he keeps?

Now, as we all know (thanks to Feynman), when we break spaghetti, it almost always breaks into 3 pieces. So repeating the question above, if we break spaghetti into 3 pieces (assume the breaks are independent and uniformly distributed – i.e. they occur at the same time at uniformly random points on the whole length of the spaghetti), what would be the average length of the shorter pieces? What about the middle and longer pieces?

Finally, what if we extend this to breaking into n pieces?

The first question is from Richard Wisemans Friday Puzzles posted on 7 Jan 2011.

Posted in Maths | Leave a comment

Winter in Scotland




Posted in Life | Leave a comment