Interview: Cameron Adams & DrawPad

Share this article

At the Ignite Sydney event earlier this year, attendees were asked to use an iPad app to draw “What inspires you?”. Cameron Adams aka The Man in Blue is the developer of the DrawPad iPad app and has kindly agreed to talk to BuildMobile about it.

Hello Cameron, for the benefit of the few people out there who don’t already know you and your work, could you please tell us who you are and what you do?

Hi Paul,

I’ve been running my website, The Man in Blue for a little under 10 years now and for most of that time I’ve been a freelance designer & coder. I normally find it hard to decide whether I’m more of a designer or a coder, so I’ve carved out a niche for myself by working on projects that combine the two into unique experiences – things that you couldn’t achieve with just a designer or a coder alone.

This has also helped me stay on the forefront of web technologies and I was lucky enough to ride the incoming wave of JavaScript popularity around 2005, ending up writing two books on JavaScript and contributing to a couple of CSS ones as well.

Today, I work in whatever technology is going to help me realise my imagination the best, whether that’s JavaScript, Flash, Processing, or something more emergent, like WebGL.

Sounds like a cool niche. So which side of this niche played the greater role in DrawPad, designer or coder? Although we could watch the video or read your post, perhaps you could answer that question by also telling us what DrawPad is, exactly?

Drawpad was definitely more from the coding side, as it drew from some existing projects created by other people, so the idea was already fairly well formed. It was mainly a matter of coding towards the outcome and using my aesthetic judgments to guide me along the way. That, plus the always tight deadlines on these sorts of projects mean you just have to code hell for leather in order to get it ready on the night.

Ever since seeing the work by the Grafitti Analysis team I wanted to create a version with more readily available technologies, i.e. something you could run in a web browser, and see how people would use it at a live event. The form factor of the iPad was also attractive, as people could reach out and touch the “canvas” and draw with their fingers, so it’s easy to get people to interact with it at a nightclub/bar-type venue.

I’ve got a good relationship with the people who run Ignite Sydney, and they use my Visible Tweets application to display realtime tweets throughout the night via a projector. After talking to the organisers and deciding we wanted to get the crowd even more involved on the night, it seemed like the perfect venue for me to deploy Drawpad, so I got cracking on it about two weeks before the event was going to happen.

There’s really two parts to Drawpad – the drawing interface and the display interface. For the drawing interface we basically had two really friendly people wandering through the crowd with iPads, talking to people and getting them to draw what inspires them (as Ignite is quite an inspiring night). The data from the iPads was fed to a web server and a laptop connected to a projector took that 2D drawing data and turned it into a funky-looking 3D visualisation, with the Z-axis being time. This way you get a representation of what people drew, but extruded over time. When you move a virtual camera through this 3D object you get some nice abstract shapes that resolve into what people drew.

In short, it’s a great way to get people involved and have some eye candy on the wall at a big event.

Wow, lots of inspirational things to go and look at there, thanks. Diving into the code a little deeper then, most of the action goes down in the draw.js file containing the touchStart, touchMove and touchEnd methods. Can you tell us a little about how it all hangs together?

Sure. Pretty much the only HTML element on the page is a <canvas> that fills the entire screen. I track people’s finger movements across the page and then use those co-ordinates to draw a path.

As the user places their finger on the screen, the canvas element receives a touchStart event. This is the signal for DrawPad to start a new path. What’s most interesting about the touch events in a browser is that normally (in a browser) we’re used to receiving an event that represents one point of interaction – say, a mouse click or a keystroke – but with multi-touch devices like the iPad there’s actually an infinite numbers of points that the user could be interacting with (well, 20, if you count fingers and toes) and the event object in touchStart/touchMove/touchEnd contains information for all of them.

That means you have to be careful about which component of the touch event that you’re dealing with. You don’t want to get them mixed up and start thinking that someone’s little finger is their index finger. A few canvas drawing apps that I’ve seen for iPad just discard any touches after the first one, so you don’t get a true multi-touch drawing experience. I wanted to make sure that DrawPad gave you that.

In the event object passed to touchStart there is an event.touches property that lists all the currently tracked touch points (as an array). If you want to handle multi-touch you have to iterate through the array and handle each point individually. In the touchStart handler I do just this, creating a new path object for every new touch point that I see. Luckily, each touch point has a unique identifier attached to it, so as that point/finger moves around you can keep track of it and not get it confused with any other points.

Once the start of the path has been created I then listen out for any touchMove events. When those are triggered I check the identifier of the touch and the new location of the point, then add it to the appropriate path.

Again, for touchEnd, I identify the touch and then close the path for it. One thing you have to look out for with touchEnd is that event.touches will contain no data (because the touch has finished) so you instead have to look in event.changedTouches.

Very cool, and I can almost keep up. The second part of the experience, wherein the data feeds into a 3D visualisation with the z-axis being time, is mind boggling. Please tell us a something about that, and what it means in the context of the question: in which direction are web technologies heading?

The 3D visualisation that is produced from people’s iPad scribblings serves a number of purposes: A) It looks cool B) It produces something unique from each person’s drawing (adding something that they themselves cannot do) C) It provides a sense of mystery & curiosity to the whole experience – these flowing 3D forms are unrecognisable until the last few seconds when they coalesce into someone’s drawing.

In public projections A is always mandatory. For me, B is also necessary, as that’s one of the key parts that I play as digital artist. I am both facilitator of people’s creations and creator of my own creations. It’s kind of like a dance between me and the participants – they give something to me and I respond with my own moves.

People are drawing on the iPads in 2D, so to turn them into 3-dimensional objects I use the time taken to draw their drawings as the third dimension. This way each of their strokes has a depth to it, corresponding to how long it takes to draw. By giving each drawing a 3D structure I can then do a series of camera effects that makes it look like you’re flying through each drawing.

To do the 3D I used a library called Three.js and it uses WebGL to draw 3D objects in the browser. I didn’t quite have enough time to nail down the exact geometry required to draw strokes in 3D, so I faked it using spheres – each 3D stroke consists of a bunch of spheres, positioned according to the x, y & time or a particular stroke. Kind of like 3D pixels.

With a project like this, you can quickly see web technologies becoming the de facto process by which any digital experience can be delivered. Traditionally, installations like this require native frameworks like Processing, Cinder or OpenFrameworks to be achieved. Now we’re beginning to see the same sorts of things being done in the browser. This is great for portability and accessibility – anyone can see it on the web without downloading a special program and I can simply co-opt whatever computer is onsite with an Internet connection and use it to display my visualisation. Laptop, desktop, Windows, Mac; it doesn’t matter.

There are also already a bunch of people that are already familiar with JavaScript and browser technologies, so when this type of interaction and graphics capability becomes available to them it creates a huge and entirely open community of digital artists. That generally leads to really exciting results!

This has been awesome, thanks so very much Cameron. I could go on and on asking questions, but one last quick one. Music is a big part of your life, no doubt, and that seems to be true for most people who write code. So, most played track since we have been doing this interview?

My most played track over the past month has been a little skewed, because I was working on the opening titles for Web Directions 2011, which is set to Magnetic Man’s “I Need Air”. I think I must have listened to it literally one hundred times in the space of three weeks. Thankfully, I’m not totally sick of it, as it’s a great song.

For my actual listening pleasure, I’ve been listening to Foster The People’s album “Torches”, Nero’s “Welcome Reality” and Bonobo’s “Black Sands”.

Paul BridgestockPaul Bridgestock
View Author

Paul will suggest that it’s all about HTML5 & CSS3 to anybody who stands still for long enough, though he will defer to talking about building for mobile in the context of iOS, Android and Windows Phone. Paul offers all manner of web development services out of 3Easy Web Org and is the Editor in Chief of BuildMobile.com.

Share this article
Read Next
Automating Vultr Cloud Infrastructure with Terraform
Automating Vultr Cloud Infrastructure with Terraform
Vultr
Advanced Web Deployment With Plesk on Vultr
Advanced Web Deployment With Plesk on Vultr
Vultr
Building A 300 Channel Video Encoding Server
Building A 300 Channel Video Encoding Server
John O’Neill
Five Ways to Lazy Load Images for Better Website Performance
Five Ways to Lazy Load Images for Better Website Performance
Maria Antonietta Perna
Building a Telemedicine Platform with AI-Powered Diagnostics Using Vultr
Building a Telemedicine Platform with AI-Powered Diagnostics Using Vultr
Vultr
Create a Toggle Switch in React as a Reusable Component
Create a Toggle Switch in React as a Reusable Component
Praveen KumarMichael Wanyoike
Comparing Docker and Podman: A Guide to Container Management Tools
Comparing Docker and Podman: A Guide to Container Management Tools
Vultr
How to Deploy Flask Applications on Vultr
How to Deploy Flask Applications on Vultr
Vultr
A Comprehensive Guide to Understanding TypeScript Record Type
A Comprehensive Guide to Understanding TypeScript Record Type
Emmanuel Onyeyaforo
Top 7 High-Paying Affiliate Programs for Developers and Content Creators
Top 7 High-Paying Affiliate Programs for Developers and Content Creators
SitePoint Sponsors
How to integrate artificial intelligence into office software: the ONLYOFFICE Docs case study
How to integrate artificial intelligence into office software: the ONLYOFFICE Docs case study
SitePoint Sponsors
Momento Migrates Object Cache as a Service to Ampere Altra
Momento Migrates Object Cache as a Service to Ampere Altra
Dave Neary
Dev Hackathon: Reusable Creativity on Wix Studio
Dev Hackathon: Reusable Creativity on Wix Studio
SitePoint Sponsors
10 Amazing Web Developer Resume Examples for Different Web Dev Specializations
10 Amazing Web Developer Resume Examples for Different Web Dev Specializations
SitePoint Sponsors
How to Build Lightning Fast Surveys with Next.js and SurveyJS
How to Build Lightning Fast Surveys with Next.js and SurveyJS
Gavin Henderson
45 Visual Studio Code Shortcuts for Boosting Your Productivity
45 Visual Studio Code Shortcuts for Boosting Your Productivity
Shahed Nasser
Google Cloud Is the New Way to the Cloud
Google Cloud Is the New Way to the Cloud
SitePoint Sponsors
Understanding Vultr Content Delivery Networks (CDNs)
Understanding Vultr Content Delivery Networks (CDNs)
Vultr
Effortless Content Publishing: A Developer’s Guide to Adobe Experience Manager
Effortless Content Publishing: A Developer’s Guide to Adobe Experience Manager
SitePoint Sponsors
From Idea to Prototype in Minutes: Claude Sonnet 3.5
From Idea to Prototype in Minutes: Claude Sonnet 3.5
Zain Zaidi
Essential Plugins for WordPress Developers: Top Picks for 2024
Essential Plugins for WordPress Developers: Top Picks for 2024
SitePoint Sponsors
WebAssembly vs JavaScript: A Comparison
WebAssembly vs JavaScript: A Comparison
Kaan Güner
The Functional Depth of Docker and Docker Compose
The Functional Depth of Docker and Docker Compose
Vultr
How Top HR Agencies Build Trust Through Logo Designs
How Top HR Agencies Build Trust Through Logo Designs
Evan Brown
Leveraging Progressive Web Apps (PWAs) for Enhanced Mobile User Engagement
Leveraging Progressive Web Apps (PWAs) for Enhanced Mobile User Engagement
SitePoint Sponsors
10 Artificial Intelligence APIs for Developers
10 Artificial Intelligence APIs for Developers
SitePoint Sponsors
The Ultimate Guide to Navigating SQL Server With SQLCMD
The Ultimate Guide to Navigating SQL Server With SQLCMD
Nisarg Upadhyay
Retrieval-augmented Generation: Revolution or Overpromise?
Retrieval-augmented Generation: Revolution or Overpromise?
Kateryna ReshetiloOlexandr Moklyak
How to Deploy Apache Airflow on Vultr Using Anaconda
How to Deploy Apache Airflow on Vultr Using Anaconda
Vultr
Cloud Native: How Ampere Is Improving Nightly Arm64 Builds
Cloud Native: How Ampere Is Improving Nightly Arm64 Builds
Dave NearyAaron Williams
How to Create Content in WordPress with AI
How to Create Content in WordPress with AI
Çağdaş Dağ
A Beginner’s Guide to Setting Up a Project in Laravel
A Beginner’s Guide to Setting Up a Project in Laravel
Claudio Ribeiro
Enhancing DevSecOps Workflows with Generative AI: A Comprehensive Guide
Enhancing DevSecOps Workflows with Generative AI: A Comprehensive Guide
Gitlab
Creating Fluid Typography with the CSS clamp() Function
Creating Fluid Typography with the CSS clamp() Function
Daine Mawer
Comparing Full Stack and Headless CMS Platforms
Comparing Full Stack and Headless CMS Platforms
Vultr
7 Easy Ways to Make a Magento 2 Website Faster
7 Easy Ways to Make a Magento 2 Website Faster
Konstantin Gerasimov
Powerful React Form Builders to Consider in 2024
Powerful React Form Builders to Consider in 2024
Femi Akinyemi
Quick Tip: How to Animate Text Gradients and Patterns in CSS
Quick Tip: How to Animate Text Gradients and Patterns in CSS
Ralph Mason
Sending Email Using Node.js
Sending Email Using Node.js
Craig Buckler
Creating a Navbar in React
Creating a Navbar in React
Vidura Senevirathne
A Complete Guide to CSS Logical Properties, with Cheat Sheet
A Complete Guide to CSS Logical Properties, with Cheat Sheet
Ralph Mason
Using JSON Web Tokens with Node.js
Using JSON Web Tokens with Node.js
Lakindu Hewawasam
How to Build a Simple Web Server with Node.js
How to Build a Simple Web Server with Node.js
Chameera Dulanga
Building a Digital Fortress: How to Strengthen DNS Against DDoS Attacks?
Building a Digital Fortress: How to Strengthen DNS Against DDoS Attacks?
Beloslava Petrova
Crafting Interactive Scatter Plots with Plotly
Crafting Interactive Scatter Plots with Plotly
Binara Prabhanga
GenAI: How to Reduce Cost with Prompt Compression Techniques
GenAI: How to Reduce Cost with Prompt Compression Techniques
Suvoraj Biswas
How to Use jQuery’s ajax() Function for Asynchronous HTTP Requests
How to Use jQuery’s ajax() Function for Asynchronous HTTP Requests
Aurelio De RosaMaria Antonietta Perna
Quick Tip: How to Align Column Rows with CSS Subgrid
Quick Tip: How to Align Column Rows with CSS Subgrid
Ralph Mason
15 Top Web Design Tools & Resources To Try in 2024
15 Top Web Design Tools & Resources To Try in 2024
SitePoint Sponsors
7 Simple Rules for Better Data Visualization
7 Simple Rules for Better Data Visualization
Mariia Merkulova
Cloudways Autonomous: Fully-Managed Scalable WordPress Hosting
Cloudways Autonomous: Fully-Managed Scalable WordPress Hosting
SitePoint Team
Best Programming Language for AI
Best Programming Language for AI
Lucero del Alba
Quick Tip: How to Add Gradient Effects and Patterns to Text
Quick Tip: How to Add Gradient Effects and Patterns to Text
Ralph Mason
Logging Made Easy: A Beginner’s Guide to Winston in Node.js
Logging Made Easy: A Beginner’s Guide to Winston in Node.js
Vultr
How to Optimize Website Content for Featured Snippets
How to Optimize Website Content for Featured Snippets
Dipen Visavadiya
Psychology and UX: Decoding the Science Behind User Clicks
Psychology and UX: Decoding the Science Behind User Clicks
Tanya Kumari
Build a Full-stack App with Node.js and htmx
Build a Full-stack App with Node.js and htmx
James Hibbard
Digital Transformation with AI: The Benefits and Challenges
Digital Transformation with AI: The Benefits and Challenges
Priyanka Prajapat
Quick Tip: Creating a Date Picker in React
Quick Tip: Creating a Date Picker in React
Dianne Pena
How to Create Interactive Animations Using React Spring
How to Create Interactive Animations Using React Spring
Yemi Ojedapo
10 Reasons to Love Google Docs
10 Reasons to Love Google Docs
Joshua KrausZain Zaidi
How to Use Magento 2 for International Ecommerce Success
How to Use Magento 2 for International Ecommerce Success
Mitul Patel
5 Exciting New JavaScript Features in 2024
5 Exciting New JavaScript Features in 2024
Olivia GibsonDarren Jones
Tools and Strategies for Efficient Web Project Management
Tools and Strategies for Efficient Web Project Management
Juliet Ofoegbu
Choosing the Best WordPress CRM Plugin for Your Business
Choosing the Best WordPress CRM Plugin for Your Business
Neve Wilkinson
ChatGPT Plugins for Marketing Success
ChatGPT Plugins for Marketing Success
Neil Jordan
Managing Static Files in Django: A Comprehensive Guide
Managing Static Files in Django: A Comprehensive Guide
Kabaki Antony
The Ultimate Guide to Choosing the Best React Website Builder
The Ultimate Guide to Choosing the Best React Website Builder
Dianne Pena
Exploring the Creative Power of CSS Filters and Blending
Exploring the Creative Power of CSS Filters and Blending
Joan Ayebola
How to Use WebSockets in Node.js to Create Real-time Apps
How to Use WebSockets in Node.js to Create Real-time Apps
Craig Buckler
Best Node.js Framework Choices for Modern App Development
Best Node.js Framework Choices for Modern App Development
Dianne Pena
SaaS Boilerplates: What They Are, And 10 of the Best
SaaS Boilerplates: What They Are, And 10 of the Best
Zain Zaidi
Understanding Cookies and Sessions in React
Understanding Cookies and Sessions in React
Blessing Ene Anyebe
Enhanced Internationalization (i18n) in Next.js 14
Enhanced Internationalization (i18n) in Next.js 14
Emmanuel Onyeyaforo
Essential React Native Performance Tips and Tricks
Essential React Native Performance Tips and Tricks
Shaik Mukthahar
How to Use Server-sent Events in Node.js
How to Use Server-sent Events in Node.js
Craig Buckler
Five Simple Ways to Boost a WooCommerce Site’s Performance
Five Simple Ways to Boost a WooCommerce Site’s Performance
Palash Ghosh
Elevate Your Online Store with Top WooCommerce Plugins
Elevate Your Online Store with Top WooCommerce Plugins
Dianne Pena
Unleash Your Website’s Potential: Top 5 SEO Tools of 2024
Unleash Your Website’s Potential: Top 5 SEO Tools of 2024
Dianne Pena
How to Build a Chat Interface using Gradio & Vultr Cloud GPU
How to Build a Chat Interface using Gradio & Vultr Cloud GPU
Vultr
Enhance Your React Apps with ShadCn Utilities and Components
Enhance Your React Apps with ShadCn Utilities and Components
David Jaja
10 Best Create React App Alternatives for Different Use Cases
10 Best Create React App Alternatives for Different Use Cases
Zain Zaidi
Control Lazy Load, Infinite Scroll and Animations in React
Control Lazy Load, Infinite Scroll and Animations in React
Blessing Ene Anyebe
Building a Research Assistant Tool with AI and JavaScript
Building a Research Assistant Tool with AI and JavaScript
Mahmud Adeleye
Understanding React useEffect
Understanding React useEffect
Dianne Pena
Web Design Trends to Watch in 2024
Web Design Trends to Watch in 2024
Juliet Ofoegbu
Building a 3D Card Flip Animation with CSS Houdini
Building a 3D Card Flip Animation with CSS Houdini
Fred Zugs
How to Use ChatGPT in an Unavailable Country
How to Use ChatGPT in an Unavailable Country
Dianne Pena
An Introduction to Node.js Multithreading
An Introduction to Node.js Multithreading
Craig Buckler
How to Boost WordPress Security and Protect Your SEO Ranking
How to Boost WordPress Security and Protect Your SEO Ranking
Jaya Iyer
Understanding How ChatGPT Maintains Context
Understanding How ChatGPT Maintains Context
Dianne Pena
Building Interactive Data Visualizations with D3.js and React
Building Interactive Data Visualizations with D3.js and React
Oluwabusayo Jacobs
JavaScript vs Python: Which One Should You Learn First?
JavaScript vs Python: Which One Should You Learn First?
Olivia GibsonDarren Jones
13 Best Books, Courses and Communities for Learning React
13 Best Books, Courses and Communities for Learning React
Zain Zaidi
5 jQuery.each() Function Examples
5 jQuery.each() Function Examples
Florian RapplJames Hibbard
Implementing User Authentication in React Apps with Appwrite
Implementing User Authentication in React Apps with Appwrite
Yemi Ojedapo
AI-Powered Search Engine With Milvus Vector Database on Vultr
AI-Powered Search Engine With Milvus Vector Database on Vultr
Vultr
Understanding Signals in Django
Understanding Signals in Django
Kabaki Antony
Why React Icons May Be the Only Icon Library You Need
Why React Icons May Be the Only Icon Library You Need
Zain Zaidi
View Transitions in Astro
View Transitions in Astro
Tamas Piros
Get the freshest news and resources for developers, designers and digital creators in your inbox each week
Loading form