Drawing quadrangles


show more Drawing quadrangles provides you with in-depth training on Developer. Taught by Barton Poulson as part of the Interactive Data Visualization with Processing show less
please wait ...

Drawing quadrangles

The next primitive shape that we're going to use in Processing, not a very common one, is the quadrangle, and the idea here as you can draw four-sided shapes that are not rectangle or squares, for instance. In this example I'll use diamonds. The first thing I'm going to do is put a comment with the name of this file and then I'm going to put the size of the window, turn on anti-aliasing, then I'm going to give it a nice dark blue background, I'm going to use hex codes for this, and let's Save it and make sure that gets where we want, there we go.

Also, I'm going to thicken up the outlines of these things by taking strokeWeight and change it into 5 pixels. Then I'm going to start drawing my diamonds with a quadrangle function. Now there are a lot of arguments to it, but it's very simple, all it is is four pairs of X and Y coordinates, one pair for each point or each corner on the quadrangle. The function is called quad and then you start putting in...

Drawing quadrangles
Video duration: 3m 25s 7h 43m Beginner

Viewers:

Drawing quadrangles provides you with in-depth training on Developer. Taught by Barton Poulson as part of the Interactive Data Visualization with Processing

Subjects:
Developer IT
Software:
Processing
Author:
please wait ...