From the course: Processing: Interactive Data Visualization
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Creating spirals - Processing Tutorial
From the course: Processing: Interactive Data Visualization
Creating spirals
One interesting shape that shows up in a number of sketches in Processing and in data visualizations is a spiral. Now unfortunately, there is no built- in function for spirals in Processing, so we actually have to get down to some bit-by-bit coding. But it turns out it gives you some extra flexibility, and there's a lot of fun that could be had with this. Let me start by simply putting a comment with the file name, and then let me insert a color palette. I'm going to use this one up here, from the palettes text file that's in the exercise files. I'll paste that in, and there we have that. So we have our palette all determined. I need to create a couple of variables to make this work. The first thing I need to do is I actually need to show how to draw a circle without using the ellipse function. What I'm going to do is I'm going to draw-- I need x and y coordinates and I need a variable to indicate the radius of the circle. I'm going to put 100, and now I'll draw the box. And this…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.