8

Two Drawing Programs

In Project 5, you stamped shapes based on your mouse’s position, and in Project 7, you created a simple program to display typed text. Both projects relied on user input, and for the next few chapters, we’ll explore more input options, organized by the types of peripherals you can use with your computer and their level of difficulty.

In this project, I’ll introduce you to two more mouse input variables, after which we’ll cover event functions. Event functions will launch you to the next level in Processing, as they allow you to create much more robust functionality while reducing the amount of code you have to write. Finally, you’ll learn to harness mouse clicks to create two simple drawing programs that work a lot more ...

Get The SparkFun Guide to Processing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.