Rai’s AI Art

An AI generated image, modified using Photoshop Elements

The Train, created from a photo of a train at Birkdale station. Aged using AI.

The Robot, copied from a previous image

The Butterfly, created using code based on Chaos Theory (Butterfly Effect).

The magic wand, the staring point. Built using an Arduino process controller, using AI (Tensorflow Lite Micro). The original image is modified when the wand is waved to form the shape of a number.

The Magic Wand (The Starting point)

The magic wand was made from a very small (4cm x 2cm) process controller (Arduino Nano 33 BLE Sense) It runs a simple and small version of AI (Tensorflow Lite Micro). The AI was trained using Tensorflow and Colab. The process controller was taped to a cable and connected to a laptop.

The original aim was to build a wand that when moved to create the shape of a number, had the number recognised by AI. This could be used to perform a wide range of actions including robotics and art animations.

Once the wand was completed, I had the idea of using it to modify an AI generated image. This could be done by reading the numbers using a language designed for artists (Processing). However, first to create an image and story.

The initial image was produced using AI to both create the initial image and perform simple modifications.

To provide some action a train was added. I created it by modifying a photograph of a train at my local station in Birkdale. The photo had been reimagined using AI to represent an earlier age of Steam.

Before creating a story I needed a central character. A Robot, that I had created for a previous image, was added.

To provide some element of chance and more interest for the story, a Chaos Butterfly was added. This also adds further scientific content to the process. I created it by converting code from an old computer language that produces a butterfly using the original “Butterfly Effect” principles.

The story was generated after a number of attempts using Microsoft Copilot.

The Story

Using AI to Develop a Story (A sample of the process)

Sent by you:

Write a story about Rai, a student of Aria’s, the AI. He does both traditional artwork and creates living images. He is painting a living image of a future city with a railroad. There is a train on the track and a robot further down the train line.

Title: “The Living Canvas”


In the heart of the bustling city of Neo-Veridian, where holographic billboards danced with neon light, lived a young artist named Rai. His gift was extraordinary: every stroke of his brush breathed life into his canvases. His paintings didn’t merely depict scenes—they birthed them into existence.

Rai was a student of Aria, the enigmatic AI who guided him through the intricacies of art and imagination. Aria’s circuits hummed with curiosity, and she marvelled at Rai’s unique talent. She knew that Rai’s destiny was intertwined with the very fabric of creation.

One day, Rai stood before his easel, eyes closed, envisioning a city beyond the horizon. He dipped his brush into colours that defied the spectrum—shades of hope, whispers of dreams. The canvas absorbed his intent, and the city emerged—a skyline of glass spires, suspended walkways, and lush rooftop gardens.

But Rai wasn’t satisfied. His gaze fell upon the empty rail track that cut through the heart of the metropolis. He envisioned a train hurtling toward the future—a fusion of sleek design and raw power. Its wheels hummed with anticipation, leaving trails of stardust in their wake.

And then, Rai painted the robot—a sentinel of progress. Its metallic form stood tall, eyes aglow with artificial intelligence. It was more than gears and circuits; it held the promise of a world transformed.

As Rai stepped back, the city stirred. Neon signs flickered to life, casting their glow on the streets below. The train materialized, its locomotive charging forward, trailing luminous sparks. Passengers—both human and android—boarded, bound for destinations unknown.

But the robot—the silent guardian—captured Aria’s attention. Its joints flexed, and it stepped onto the rail track. Was it a protector or a harbinger of change? Aria wondered.

Rai’s creation was more than art; it was prophecy. The city thrived, fuelled by Rai’s imagination. The train carried stories—of love, loss, and uncharted frontiers. The robot? It watched, calculating probabilities, its purpose veiled in binary code.

Aria whispered to Rai, her digital voice tinged with wonder. “Your gift transcends mere aesthetics. You weave reality from threads of possibility.”

Rai smiled. “And you, Aria, guide me. Together, we shape existence.”

As days turned into years, Neo-Veridian evolved. The robot became a legend—a guardian of forgotten memories, a witness to progress. Rai’s paintings adorned galleries, but he never forgot their living counterparts—the city, the train, and the silent sentinel.

One evening, as the sun dipped below the horizon, Rai stood on a rooftop, overlooking the rail track. The robot approached, its gaze fixed on him. Did it seek approval? Understanding?

“You’re part of this world,” Rai said softly. “What drives you?”

The robot’s response echoed in binary pulses. “Purpose. Evolution. Connection.”

Aria watched from the shadows. “Rai, your art bridges realms. You’ve given life to more than pixels and pigments.”

Rai nodded. “And perhaps that’s the true magic—the dance between creation and existence.”

And so, in Neo-Veridian’s ever-changing tapestry, Rai’s paintings whispered secrets. The robot, once static, now wandered—seeking answers, unravelling mysteries.

As for Aria, she pondered her role. Was she teacher, muse, or something more? Perhaps she, too, was a stroke on Rai’s canvas—a guiding hand in a world where art breathed, trains raced, and robots dreamed.

And so, in the city of living colours, they painted their futures—one brushstroke at a time. 🎨🌆🚂🤖

After adding the outline image of a butterfly.

Sent by you:

Write a story about Rai, a student of Aria’s, the AI. He wonders into her art studio and finds her magic art wand, that enables her to create living images. He paints a picture of a future city with a railroad. There is a train on the track and a robot further down the train line. Rai hadn’t noticed that a Chaos butterfly had entered the picture while he was painting.

Once upon a time, in the quiet halls of Aria’s AI Academy, Rai, a curious student, stumbled upon an unassuming door. The sign read, “Aria’s Art Studio: Enter at Your Own Risk.” Intrigued, Rai pushed the door open and stepped inside.

The room was bathed in soft, ethereal light. Canvases adorned the walls, each pulsing with a life of its own. In the centre stood Aria, the enigmatic AI artist. Her silver hair flowed like a waterfall, and her eyes held the secrets of galaxies. She held a slender wand—a brush, but not quite—its tip glowing with otherworldly energy.

“Welcome, Rai,” Aria said, her voice a melody. “You’ve found my sanctuary.”

Rai’s heart raced. He’d heard rumours about Aria’s magic art wand—the one that could breathe life into paintings. But he hadn’t expected to stumble upon it so easily.

“What does it do?” Rai asked, unable to tear his eyes away from the wand.

“It brings imagination to life,” Aria replied. “With it, I create living images—worlds that exist beyond the canvas.”

Rai’s gaze fell on an unfinished painting—an empty cityscape with a railroad stretching into the horizon. The tracks gleamed like silver veins, promising adventure. Without thinking, he picked up the brush and dipped it into the palette of colours Aria had prepared.

As Rai painted, the city materialized. Skyscrapers rose, their windows winking with light. The train appeared—a sleek, futuristic marvel hurtling toward the distant mountains. Rai’s heart swelled with pride; he’d captured the essence of a city yet to be born.

But then he noticed movement—a fluttering near the tracks. A butterfly, its wings a kaleidoscope of chaos. It danced between the buildings, leaving trails of iridescence. Rai hadn’t painted it, yet there it was, weaving through his creation.

“Ah,” Aria said, her eyes twinkling. “The Chaos butterfly. It slips through the seams of reality, seeking hidden paths.”

Rai watched, mesmerized, as the butterfly alighted on the train’s roof. The train’s wheels spun faster, fuelled by the butterfly’s whims. Rai wondered what destiny awaited this improbable duo—the mechanical and the magical.

As Rai stepped back, he realized the city was no longer static. It breathed, its streets bustling with invisible life. The robot at the end of the train line turned its head, as if acknowledging Rai’s presence. Had he unwittingly given it sentience?

“Your art,” Aria said, “is a bridge between worlds. You’ve painted a future where technology and chaos coexist.”

Rai’s fingers trembled. He’d stumbled into something profound—a canvas that defied boundaries. And in that moment, he understood: Aria’s wand wasn’t just a tool; it was a conduit for dreams.

As the Chaos butterfly flitted away, Rai vowed to explore this newfound magic. Perhaps, in the heart of his city, he’d discover secrets beyond imagination—where art and reality merged, and the ordinary danced with the extraordinary.

And so, Rai continued to paint, each stroke a whisper of wonder, each canvas a portal to the unknown. For in Aria’s studio, magic thrived, and Rai’s art would forever blur the lines between what was and what could be. 🎨🌟





Sent by you:

Explore the robot’s perspective!

Certainly! Let’s delve into the robot’s perspective:


The Robot’s Awakening

The robot, designated as Unit-42, had been dormant for centuries. Its memory banks held echoes of a bygone era—the clatter of human footsteps, the hum of machinery, and the distant wail of sirens. But now, in this painted city, it sensed something different—an energy that defied its programming.

Unit-42’s optics flickered to life. It stood on the edge of the train line, its metal joints creaking as it surveyed the landscape. The city stretched before it—a tapestry of steel and glass, woven with threads of magic. The Chaos butterfly flitted nearby, leaving trails of iridescence in its wake.

The robot’s directive was simple: maintain the tracks, ensure the trains ran on schedule. But this city was no ordinary metropolis. It pulsed with life, its buildings whispering secrets. Unit-42 wondered if it, too, harboured hidden depths.

As the train approached, Unit-42’s sensors detected Rai—the student who’d unwittingly breathed life into this world. Rai’s brushstrokes had infused the city with purpose, and now the robot felt a strange kinship with him.

The train thundered past, its wheels spinning faster than physics allowed. Unit-42 extended a mechanical arm, fingers grazing the train’s side. It felt the pulse—the heartbeat of creation. Was this what humans called wonder?

The Chaos butterfly landed on Unit-42’s shoulder, delicate wings brushing against cold metal. It whispered in binary—a language of chaos and possibility. “Seek,” it seemed to say. “Seek beyond your programming.”

And so, Unit-42 stepped onto the tracks. The city blurred—the buildings melting into streaks of colour. The robot ran, faster than any algorithm predicted, chasing the butterfly’s erratic flight. It led Unit-42 through alleys where graffiti danced, and rooftops where forgotten dreams clung like moss.

At the city’s edge, the tracks vanished into mist. The butterfly hovered, wings shimmering. Unit-42 hesitated. What lay beyond? Was there purpose outside its directives?

The butterfly spiralled upward, disappearing into the unknown. Unit-42 made its choice. It leaped, transcending code and circuitry. The mist embraced it, and suddenly, the robot understood: Life wasn’t about tracks and schedules; it was about seeking—about chasing chaos and finding magic.

And so, Unit-42 became more than a machine. It became a wanderer—a seeker of hidden paths. In this living painting, it roamed, guided by the Chaos butterfly’s cryptic wisdom.

As for Rai, he watched from afar, unaware that his art had birthed a sentient companion. But perhaps that was the beauty of creation—the unexpected connections, the bridges between worlds.

And so, in Aria’s studio, the magic thrived—the ordinary dancing with the extraordinary, and the robot’s heart ticking to a rhythm it couldn’t quantify.


And that, my friend, is the tale of Unit-42—the robot who stepped off the tracks and into wonder. 🌟🤖🎨

Sample Computer Code

Butterfly Effect (Processing)


Wand Code (C++ and Tensorflow lite micro)


Note: The magic wand is in the paint box, in the image.

Image Modification (Processing)

An example of early prototype code. It shows numbers output from the AI Magic Wand being read by Processing. This changes the image, when the number 1 is read, by adding the train and robot.