We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsWebsite,  Documentation,  Book Bugs › Corners in quad() function
Page Index Toggle Pages: 1
Corners in quad() function (Read 725 times)
Corners in quad() function
Jun 17th, 2007, 11:33am
 
It takes a little time to understand that the first corner (x1, y1) is the upper left corner; the second corner (x2, y2) is the upper right corner, the third one (x3, y3) is the lower right corner and that the fourth one (x4, y4) is the lower left.

It’s not a big deal, but it would be better to put something that is more eloquent or a schema…

Ok folks, see you all…
Re: Corners in quad() function
Reply #1 - Jul 2nd, 2007, 10:12pm
 
It doesn't work like that.

For example, shift the values from the reference example:

quad(38, 31, 86, 20, 69, 63, 30, 76);

to

quad(86, 20, 30, 76, 69, 63, 38, 31);

Now the first two parameters set the upper-right corner.


I've added this sentence to the reference to clarify:
The first pair of parameters (x1,y1) sets the first vertex and the subsequent pairs should proceed clockwise or counter-clockwise around the defined shape.
Page Index Toggle Pages: 1