Posts

Showing posts from 2026

Rendezvous With Rama

Rendezvous With Rama Rendezvous With Rama is a seminal work by Arthur C Clarke. It tells the tale of a long cylindrical object, probably some kind of starship, that enters our solar system. It is named Rama by Earth and, as it gets closer, an expedition is sent out to make contact with it. At first the object seems dead and doesn't respond to any attempts at contact. The expedition members find a way on board and discover a world within the object featuring lakes and buildings but still an alarming lack of life. As Rama gets closer to the sun strange things begin to happen. Robotic creatures appear and the buildings shift in shape. Eventually the expedition has to leave, as it is evident that Rama is picking up speed and they will be stuck inside forever. The expedition, once again safe in their own ship, watch as Rama departs taking its mysteries with it and leaving humanity behind - an insignificant encounter. And here is the code: let t ...

A Seaside Village

Image
A Seaside Village With the lovely weather of last week, I was inspired to create a new piece. I call this A Seaside Village.  I've used p5js once again (I do love it) and forked the code from  @Saya Kubota  to draw the houses and make the grainy effect. I think it came out quite nice and reminds me of walking along the front in Aberdyfi, chips in hand, on a spring/summer's day. Here's the code: const PALETTE = ['#CFECF7','#A0D9EF','#62C1E5','#20A7DB','#1C96C5']; let noiseGra; let waveX = 0; let waveY = 400; function setup() { createCanvas(600, 600); noiseGra = createGraphics(width, height); noiseGra.loadPixels() for( let x=0; x<=width; x++) { for(let y=0; y<=height; y++) { noiseGra.set(x, y, color(255, noise(x/10,y/10,x*y/50)*random([0,40,80]))) } } noiseGra.updatePixels(); } function draw(){ randomSeed(0); noStroke(); //console.log(mouseX,mouseY); background(200); fill(194,174,128); rectMode(COR...

AB38 "Genesis"

Image
  AB38 "Genesis" On a sunny March morning it's always lovely to see the famous AB38 ship off to work in Bae Ceredigion. The ship has been around since 1981 and its catches are sold all along the Dyfi coastline. If you like seafood and eat in a restaurant in the area then you've probably eaten something caught that day by the crew of Genesis.

Cosmic Gobstoppers

Cosmic Gobstoppers This little effect is based on Rainbow Storm by mathisvdr.  I converted the dweet to p5js. I have NO IDEA how the maths works! For a creative coder, my maths skills leave a lot to be desired! But, with a little bit of tweaking and research, I managed to create a nice sketch. Dweets are interesting. They're golfed code. Golfed code comes from the game of golf, where you try to complete a hole in as little moves (par) as possible. Golfed code takes a block of code and strips it down to the bare minimum. This is mathisvdr's golfed code, which would fit in a tweet as it is 138 characters long: function u(t) { c.style.filter='invert()';for(i=836;i--;x.fillRect(i%38*50+5,~~(i/38)*52+2,45,45))x.fillStyle=`hsl(${i*S(t)},99%,${S(i**3+t)**33*90+10}%)` } This is my code, which is more readable but would not fit in a tweet: let t = 0; function setup() { createCanvas(400, 415); colorMode(HSL, 360, 100, 100); } ...

Review: Jason X

Image
  Jason X For the past umpteen years I've been watching horror films on significant horror dates. On Halloween I watch one of the Halloween movies and on Friday 13ths I watch a Friday 13th movie. This year, a month ago, I watched Friday 13th Part IX: Jason Goes to Hell. That film was, well, god awful to be fair. The best bit was at the end where Freddy Krueger's glove comes along and pulls Jason's mask into the ground, paving way for Freddy vs Jason. But before you can get to that film you have to watch Jason X. Well, you don't have to but, to be fair, it is enjoyable nonsense. The plot, if such a thing exists, is Jason, somehow alive again, gets cryogenically frozen, wakes up 450 years later on a spaceship and goes on a killing spree. That's it. And, well, it's actually quite good. It's still rubbish, but, as slasher movies go, it was actually one of the best. I enjoyed every daft moment of it. Lexa Doig and Lisa Ryder, two turn of the century scifi stalwa...

Tutorial: Hello, world! in Z80 Assembly Language

Image
  I'm feeling kind of nostalgic today so I thought I'd write Hello, world! in Z80 assembly for the ZX Spectrum! The last time I wrote any Z80 assembly was when I was 14 so around 36 years ago! I may be a little rusty! Here it is: org $8000 ld bc, TEXT LOOP ld a, (bc) cp 0 jr z, EXIT rst $10 inc bc jr LOOP EXIT ret TEXT defb "Hello, world!" defb 13, 0 How this works line by line: org $8000 - this line puts the program into memory location $8000 ld bc,TEXT - ld stands for load. We load register bc with the memory location of what comes after the label TEXT LOOP - the beginning of our printing loop. We will be printing each letter at a time. ld a,(bc) - now we load register a with the content of register bc. As register a is a single register and can only take a single byte at a time, then the content of bc loaded into register a will be the letter H (the first letter in Hello, world!) cp 0 - stands for compare 0. We check if ...

La Isla Bonita

Image
La Isla Bonita Another drawing made using P5JS based on an image I've found online. This one was a bit more difficult as the original has lots of shadows. I decided to forgo some of the shadows to make my image more simple. I think it turned out quite well. I called the sketch "La Isla Bonita" as it reminded me of the Madonna song from my childhood. Here's the original. I think this is an AI pic. It doesn't really matter. And here is my version: And here is the code: function setup() { createCanvas(400, 600); angleMode(DEGREES); } function draw() { background(255); stroke(0); strokeWeight(3); push(); translate(-30,0); // centre whole image /* hat */ push(); noFill(); //brim strokeWeight(6); translate(200,100); rotate(30); ellipse(0,0,60,80); //top strokeWeight(5); arc(-10,-10,40,40,20,320); arc(-10,-5,40,40,10,180); pop(); strokeWeight(3) //crease line(180...

Coffee for Two

Image
Coffee for Two I like taking drawings I find online and seeing if I can recreate them in code. Here's my latest: Coffee for Two. Here's the original from @gregcatarino1 : And here is the code: /* after:https://x.com/gregcatarino1/status/2024795951710236868/photo/1 */ function setup() { createCanvas(450, 500); // 450, 500 angleMode(DEGREES); noLoop(); } function draw() { background(220); //line(300,0, 300,600); strokeWeight(1); stroke(0); push() translate(0,-20); man(); push(); translate(-30,0); woman(); pop(); pop(); push(); scale(0.5); drawCursiveM(765, 940, 45); // x, y, size pop(); } function man(){ /* head */ //neck line(150,50, 130, 120); //hair noFill(); curve(145, 50, 145,50, 190,55, 145, 15); curve(145, 48, 145,48, 190,55, 145, 15); line(160,54, 205,54); line(160,53, 210,53); //face beginShape(); vertex(180,56); bezierVertex(185,75,171,100,171,...

にゃー、にゃー。(Meow, meow)

にゃー、にゃー。 Today my wife was playing Stray on the PS5. It seems an interesting game where you play the role of a stray cat in the far future that finds itself lost in a city full of robots. Whilst scrolling through Twitter, I came across a wonderful p5js sketch by Senbaku , which inspired me to create this animation. And here is the code: /* After にゃー、にゃー。 (Meow meow) by @Senbaku https://x.com/senbaku/status/2024819224028541210 */ function setup() { createCanvas(400, 400); rectMode(CENTER); angleMode(DEGREES); noStroke(); } function draw() { background(220); drawCat(width / 4, height / 2, false); drawCat(width / 4, height / 4, false); drawCat(width / 4, height / 2+100, false); //mirrored cats drawCat((width / 4) * 3, height / 2, true); drawCat((width / 4) * 3, height/4, true); drawCat((width / 4) * 3, height/2+100, true); textSize(30); text('After センバク', 100,360); } ...

All You Need is Kill by Hiroshi Sakurazaka - review

Image
All You Need is Kill by Hiroshi Sakurazaka  If you've watched Edge of Tomorrow starring Emily Blunt and Tom Cruise then you'll probably already know that All You Need is Kill is the story that the movie was based on. Mimics, alien terra-forming beasts, have been sent to Earth with the intention of changing the planet into something their masters can live on. The only thing that stands in their way are the pesky humans who seem hell bent in not giving up the keys to their planet without a fight. The story begins with  Keiji Kiriya, a new recruit for the United Defence Force, waking up to the day that he knows will be his last day of peace for, in the morning, the UDF will strike the Mimics hard and fast with all they've got hoping to turn the tide of war. The day goes by as Keiji prepares himself. The next day he's thrust into battle. He survives the next few minutes and comes face to face with a Mimic. The creature strikes a killing blow, knocking Keiji to the ground. J...

Blurry, orbital spheres in p5js

Blurry, orbital spheres in p5js This is a tiny p5js sketch to make a bunch of spheres orbit a single, large sphere. It is user controlled so please click anywhere in the canvas to send a planet on its way! And here is the code: let place = []; let x = 0; let y = 0; let s = 50; let t = 0; function setup() { createCanvas(400, 400); // add the Sun place.push ({ x:x, y:y, s:100, col:'yellow' }); } function draw() { background(0,50); noStroke(); translate(width/2, height/2); rotate(t); for (let p of place){ fill(p.col); circle(p.x, p.y, p.s); } t+=0.02; filter(BLUR, 2); } function mousePressed() { // move mouse into centre-based space let mx = mouseX - width / 2; let my = mouseY - height / 2; // undo the current rotation let cosT = cos(-t); let sinT = sin(-t); let rx = mx * cosT - my * sinT; let ry = mx * sinT + my * cosT; place.push({ x: rx,...

A Trip to Glastonbury

Image
  The Chalice Well. Our second favourite place in the whole world is Glastonbury, Somerset. Since the late 90s, we try to get there at least once a year (although this past few years visits have been slightly longer apart). We spent a couple of days in the town this week and, whilst it rained quite a lot, it was still enjoyable. Glastonbury is known for its other-worldly presence. Many people believe that there is a deeper, spiritual connection to the place rather than just an old, medieval town steeped in legend. To me it's very peaceful and full of a diverse range of people, which makes it interesting to someone who has always held more than a passing interest in Sociology (if I have regrets one of them would have been not studying Sociology at A-Level/degree). The smell of incense and spices flood the streets. As well as grass!!! I did stop and warn a young lady toking away on a rather pungent smelling spliff in a doorway that there were two police officers literally coming roun...

Kill Them With Kindness by Will Carver

Image
  Imagine if COVID was actually a much more deadly virus created in a Chinese laboratory by a shadowy cabal of World Leaders, the ringleader of which bares a strong resemblance to one Boris Johnson. Imagine again if the lead scientist of the project decides not to go through with the deadly virus but to destroy it and replace it with a much less lethal virus that changes a person into a thoughtful, compassionate human being...until the deadly gas is released. That's the premise of Kill Them With Kindness - the latest book from Will Carver. It's quite the page turner, especially with the memories of the pandemic still fresh in people's minds, but it's also incredibly dark. The humour is very, very black. Not at all laugh out loud. Each chapter seems to drip with cynicism and you turn each page with a feeling of dread and anticipation but also strangely feeling like you're reading a cosy murder book or another "Before The Coffee Goes Cold". Like Sam Holland ...
Image
The Harrier Hide This week is World Wetlands Week and the WWT were giving away free entry to their sites. We decided to travel up to Martin Mere in Burscough, Lancashire. A great day was had (with lovely humus and carrot sandwiches!). We saw a Ring Necked Duck that had been blown in from America (probably escaping the madness over there!), Whooper Swans, Ruff, Pintails, Pochards and a lovely Kestrel flying near the Harrier hide (above).  
Image
  MOO SHALL NOT PASS!!! A trip to Llyn Bargof can be quite an experience. The rules of the walk to the lake are thus: The cows will determine whether you proceed. See rule 1. Suffice to say, we turned around and went the other way!
Image
  I didn't! On a walk around Aberdyfi village in the summer a couple of years ago I stumbled across the Tides Inn bin. This old geezer doesn't always follow the rules, but this time he did! I kind of feared the consequences somewhat!
Earth Disco! Sometimes the Earth is just one big party! let x = 200; let y = 200; let size; let palette = ['#1cb9e4','#e4d086','#142c44','#5b64b1','#d0aed8', '#34291c']; let p; function setup() { createCanvas(400, 400); frameRate(5); angleMode(DEGREES); } function draw() { background(0); noStroke(); p = floor(random(palette.length)); for (let k = 7; k

Motion Binding Illusion

An example of the Motion Binding Illusion. The below animation looks like it is four lines moving but is actually one square moving in a circle! You can see for yourself by hovering over the animation and holding down your left mouse button And here is the code: let x = 200; let y = 200; let t = 0 function setup() { createCanvas(400, 400); rectMode(CENTER); } function draw() { background(255); strokeWeight(10); stroke('blue'); x = 200 + 10 * cos(t); y = 200 + 10 * sin(t); rect(x,y,100,100); if(!mouseIsPressed){ noStroke(); fill(255); rect(150,150, 50,50); rect(250,150, 50, 50); rect(150,250, 50, 50); rect(250, 250, 50, 50); }

A View from Penhelig Park Gardens

Image
The View from the Shelter On a fine day you will often find my wife and I sitting in the shelter in Penhelig Park Gardens, adjacent to Penhelig Terrace, eating a picnic and sipping wine before strolling down to the beach for a walk along the dunes.   

A 1970s Retro Computer Graphics Effect

Image
In the late 1970s, and early 1980s, kids science programmes were filled with these kind of animations. They were always hyped as "The Future of Computer Graphics". Fifty years later and we have 8K screens showing bazillions of pixels, graphics that blow you away and some even think FDVR is around the corner. But, for nostalgia, nothing beats the feeling that these kind of things invoked in me all those years ago. If you want to see the code:  https://openprocessing.org/sketch/2858706

White's Illusion

Image
When I'm not walking along the beach at Aberdyfi, I like to code in p5js . This is an example of White's Illusion. The two squares are the same colour. Below is the code to make it yourself. function setup() { createCanvas(400, 400); noStroke(); } function draw() { background(0); fill('blue'); rect(250,50, 100,100); fill(255); rect(0,200,400,200); fill('blue'); rect(50, 250, 100, 100); for (let i=0; i < 210; i+=20){ fill(255); rect(0,i, 400, 10); } for (let i = 210; i< 400; i+=20){ fill(0); rect(0,i, 400, 10); } }

A Winter's Sunset on Aberdyfi Beach

Image
A Winter's Sunset On a mild December afternoon along the Dyfi estuary - a place known for its striking winter sunsets - I was lucky enough to capture this stunning moment. The beach walk from Aberdyfi to Tywyn can often be windy and chilly during the winter months, but conditions that day were just right. A bottle of wine to salute the sunset was the perfect addition.