~pvigo/+junk/processing-3.1.2

« back to all changes in this revision

Viewing changes to debian/processing/usr/share/processing-3.1.2/modes/java/examples/Basics/Form/Bezier/Bezier.pde

  • Committer: Pablo Vigo
  • Date: 2016-08-16 10:54:55 UTC
  • Revision ID: pvigo@xtec.cat-20160816105455-4y3x00r4w5anrpr4
2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * Bezier. 
 
3
 * 
 
4
 * The first two parameters for the bezier() function specify the 
 
5
 * first point in the curve and the last two parameters specify 
 
6
 * the last point. The middle parameters set the control points
 
7
 * that define the shape of the curve. 
 
8
 */
 
9
 
 
10
void setup() {
 
11
  size(640, 360); 
 
12
  stroke(255);
 
13
  noFill();
 
14
}
 
15
 
 
16
void draw() {
 
17
  background(0);
 
18
  for (int i = 0; i < 200; i += 20) {
 
19
    bezier(mouseX-(i/2.0), 40+i, 410, 20, 440, 300, 240-(i/16.0), 300+(i/8.0));
 
20
  }
 
21
}
 
22