Walabasquiat: An Interactive Generative Art Installation!

Walabasquiat is an interactive generative art installation using the Walabot 3D imaging sensor, Raspberry Pi, and Android.

Walabasquiat

Story

Idea ? ?

In the mid-1990s, William Latham amazed the world with hisĀ Organic ArtĀ PC application and screensavers ā€“ introducing the public to bizarre, other-worldly forms rendered using cutting-edge genetic algorithms that continually mutate simple shapes into elaborate organic lifeforms. Iā€™ve always been fascinated by generative art, and have long dreamt of creating an interactive installation where participants can influence the algorithms by their presence or movement.Ā WalabasquiatĀ usesĀ ProcessingĀ onĀ Raspberry PiĀ andĀ AndroidĀ with theĀ WalabotĀ sensor as input parameters to create a unique, ever-evolving tapestry of pixels in response to the movement of its viewers. ? ?

Getting Started ? ?ā€?

Getting theĀ WalabotĀ working on aĀ Raspberry PiĀ is extremely straightforward: simply plug it into an available USB port via the included micro-USB cable (be sure youā€™re using aĀ 2.5A+ power supply) and install theĀ Walabot API. I like to use theĀ CLIĀ whenever possible, so fromĀ TerminalĀ on the Pi itself, I ran:

cd ~
wget https://s3.eu-central-1.amazonaws.com/walabot/WalabotInstaller/Latest/walabot_maker_1.0.34_raspberry_arm32.deb
sudo dpkg ā€“i walabot_maker_1.0.34_raspberry_arm32.deb

to install the API, and then:

pip install WalabotAPI ā€”noā€“index ā€”find-links=ā€œ/usr/share/walabot/python/

in order to run the included Python examples as well as those availableĀ on GitHub. A great first app to run isĀ SensorApp.py, which outputs the rawĀ coordinatesĀ of targets that the Walabot detects:

cd /usr/share/doc/walabot/examples/python
python SensorApp.py

Raw sensor values from SensorApp.py

Now that everythingā€™s up and running, itā€™s time to make something cool with it! ?ļø

Development Process ? ?

The first challenge was coming up with a way forĀ Processing, which I wanted to use to create the generative art, to talk to theĀ Walabot. I initially tried to integrate theĀ Walabot APIĀ directly into my sketch usingĀ Processingā€˜sĀ Python Mode, but after experiencing difficulty with differingĀ PythonĀ versions and other compatibility issues, I realized I should abstract theĀ Walabotā€˜s sensors via aĀ RESTful API, which Processing (and any other network-enabled client!) could consume. I started putting together aĀ Flask-based server, then somehow stumbled uponĀ @TheArtOfPourā€™s walabot-web-apiĀ which was pretty much exactly what I was in the process of creating, although intended for use withĀ WindowsĀ and theĀ DeveloperĀ version ofĀ Walabot, while I was usingĀ Linuxand theĀ CreatorĀ version ā€“ but it was still quicker to modify it to work with my OS/hardware than create my own from scratch! With a workingĀ RESTful APIservingĀ WalabotĀ target data on my Raspberry Pi, I then switched over to theĀ generative artĀ portion of the project usingĀ Processing. ? ?

I had been using the bookĀ GenerativeĀ ArtĀ by Matt PearsonĀ as a guide for harnessingĀ ProcessingĀ to create generative art, but in searching for examples I happened uponĀ @hypeā€™s HYPE Processing Library, which despite not being updated for over two years still worked perfectly, and provided exactly the kind of help I needed to create something that looked spectacular! I combined the generative functionality ofĀ HYPEĀ with theĀ JSONĀ sensor data provided by theĀ Flask-basedĀ RESTfulĀ API server to create beautiful representations ofĀ WalabotĀ targets:

Walabasquiat swarming around three Walabot targets

SinceĀ WalabasquiatĀ is intended as an art installation, with theĀ Processingsketch being displayed on a large screen, or projected, I thought it would be fun to provide a ā€œsouvenirā€ that would allow visitors to continue to enjoy the project even after they left. I createdĀ Walabasquiandroid, anĀ Android live wallpaper, again usingĀ ProcessingĀ for visuals and the sameĀ RESTful APIĀ to obtain theĀ WalabotĀ sensor values. The visualization is more simplistic in the Android app, as not to use unreasonable amounts of CPU just to provide a pretty background, but it presents an attractive, generative display of the same targets that are informing the main piece, which can be enjoyed long after viewing the primary installation:

Walabasquiat Live Wallpaper

Walabasquiat Live Wallpaper

Steps to Repro ? ?

To recreate this project, simply connectĀ WalabotĀ to theĀ Raspberry PiĀ and install theĀ APIĀ as outlined inĀ Getting StartedĀ above, then, on theĀ Raspberry Pi, usingĀ Terminal, download and run the server:

cd /usr/share/doc/walabot/examples/python
sudo wget https://raw.githubusercontent.com/ishotjr/walabot-web-api/rpi/app.py
python3 app.py

You can useĀ curlĀ to ensure that everythingā€™s working:

curl ā€“include http://192.168.1.69:5000/walabot/api/v1.0/sensortargets
HTTP/1.0 200 OK
Content-Type: application/json
Access-Control-Allow-Origin: *
Content-Length: 527
Server: Werkzeug/0.11.15 Python/3.5.3
Date: Tue, 11 Sep 2018 04:06:12 GMT
{
ā€œsensortargetsā€: [
{
ā€œamplitudeā€: 0.0026219950401443343,
ā€œxPosCmā€: -0.5432446316758038,
ā€œyPosCmā€: 10.355883874986088,
ā€œzPosCmā€: 8.265291199116765
},
{
ā€œamplitudeā€: 0.0018395134981517656,
ā€œxPosCmā€: 10.506637221750935,
ā€œyPosCmā€: -3.1108099532967013,
ā€œzPosCmā€: 10.035551162938308
},
{
ā€œamplitudeā€: 0.0015859160772638584,
ā€œxPosCmā€: -12.981743742198365,
ā€œyPosCmā€: -8.162094824811618,
ā€œzPosCmā€: 10.094844162189423
}
]
}

In this example, the local IP address of the Raspberry Pi on my network isĀ 192.168.1.69Ā ā€“ you can find yours usingĀ ip addr show.

Now for the art! ? If you donā€™t already haveĀ ProcessingĀ installed on yourĀ Raspberry Pi, grab that first (again, I like using theĀ CLI, but thereā€™sĀ an easierway if thatā€™s not your thing!):

cd ~
curl https://processing.org/download/install-arm.sh | sudo sh

Next, clone theĀ WalabasquiatĀ andĀ HYPEĀ library repos, and install the latter by unzipping it into theĀ librariesĀ folder in your sketchbook:

cd ~/sketchbook
git clone https://github.com/ishotjr/Walabasquiat.git
git clone https://github.com/hype/HYPE_Processing.git
unzip HYPE_Processing/distribution/HYPE.zip -d ~/sketchbook/libraries/HYPE

OpenĀ ProcessingĀ from underĀ GraphicsĀ in theĀ Raspberry Piā€˜s application menu, and useĀ File > OpenĀ to load theĀ sketchĀ from yourĀ sketchbook:

 

Read More DetailĀ  :Walabasquiat: An Interactive Generative Art Installation!


About The Author

Muhammad Bilal

I am highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top