You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/static/tutorials/2darray/index.html
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,10 @@ <h1>Two-Dimensional Arrays</h1>
4
4
<tablewidth="656">
5
5
<tr>
6
6
7
-
<p>Portions of this work are from the book, <ahref="http://www.learningprocessing.com">Learning Processing</a>, by Daniel Shiffman, published by Morgan Kaufmann Publishers, Copyright 2008 Elsevier Inc. All rights reserved.</p>
7
+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <ahref="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <ahref="http://www.processing.org/learning/books/#shiffman">Learning Processing</a>, by Daniel Shiffman, published by Morgan Kaufmann Publishers, Copyright 2008 Elsevier Inc. All rights reserved.</em></p>
8
+
9
+
<p> </p>
8
10
9
-
<pclass="ref-notice">This tutorial is for Processing version 1.0+. <em>If you see any errors or have comments, please <ahref="http://processing.org/discourse/yabb_beta/YaBB.cgi?board=WebsiteBugs">let us know</a>.</em></p>
10
11
11
12
An <ahref="http://www.processing.org/reference/Array.html">array</a> keeps track of multiple pieces of information in linear order, a one-dimensional list. However, the data associated with certain systems (a digital image, a board game, etc.) lives in two dimensions. To visualize this data, we need a multi-dimensional data structure, that is, a multi-dimensional array.
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <ahref="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <ahref="http://www.processing.org/learning/books/#shiffman">Learning Processing</a>, by Daniel Shiffman, published by Morgan Kaufmann Publishers, Copyright 2008 Elsevier Inc. All rights reserved.</em></p>
Copy file name to clipboardExpand all lines: content/static/tutorials/anatomy/index.html
+24-14Lines changed: 24 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,13 @@ <h1>Anatomy of a Program</h1>
8
8
<tr>
9
9
<td>
10
10
11
+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <ahref="http://code.google.com/p/processing/issues/list">let us know</a>.</p>
12
+
13
+
<p>
14
+
You can <ahref="code/polystar.zip">download the files from this tutorial</a>.
15
+
</p>
11
16
12
-
13
-
<pclass="ref-notice">This tutorial is for Processing version 1.0+. <em>If you see any errors or have comments, please <ahref="http://processing.org/discourse/yabb_beta/YaBB.cgi?board=WebsiteBugs">let us know</a>.</em></p>
17
+
<p> </p>
14
18
15
19
<p>
16
20
Many of the tutorials for Processing concentrate on what the language
@@ -37,7 +41,7 @@ <h1>Anatomy of a Program</h1>
37
41
the programs at <ahref="http://openprocessing.org/">openProcessing.org</a>.
38
42
</p>
39
43
40
-
<h5>Drawing Regular Polygons</h5>
44
+
<h3>Drawing Regular Polygons</h3>
41
45
42
46
<p>
43
47
You wouldn’t think of building a house without a blueprint, and you
The program works, so it’s time to see if there are things that
164
168
could be added or changed. First, the triangle and pentagon seem
@@ -277,7 +281,7 @@ <h5>Two Steps Forward, One Step Back</h5>
277
281
the vertices were within the proper area.
278
282
</p>
279
283
280
-
<h5>Too Many Parameters</h5>
284
+
<h3>Too Many Parameters</h3>
281
285
<p>
282
286
I now had a much more flexible function for drawing polygons, but
283
287
it came at the expense of more parameters. It would be nice to be
@@ -334,7 +338,7 @@ <h5>Too Many Parameters</h5>
334
338
335
339
</pre>
336
340
337
-
<h5>Safe Computing</h5>
341
+
<h3>Safe Computing</h3>
338
342
<p>
339
343
What happens if someone tries to draw a polygon with 2 sides, 1 side,
340
344
or worse, 0 sides? The first two will generate a line and a point,
@@ -364,7 +368,7 @@ <h5>Safe Computing</h5>
364
368
365
369
</pre>
366
370
367
-
<h5>Drawing Stars</h5>
371
+
<h3>Drawing Stars</h3>
368
372
<p>
369
373
Now that I was satisfied with the <code>polygon()</code> function, it was time
370
374
to move on to drawing stars. From some playing around with a crude sketch, I
@@ -486,7 +490,7 @@ <h5>Drawing Stars</h5>
486
490
487
491
</pre>
488
492
489
-
<h5>What Went Wrong?</h5>
493
+
<h3>What Went Wrong?</h3>
490
494
<p>
491
495
When I ran this program, I just freaked out. Everything looked great,
492
496
except for the three-sided star. How come I didn’t
@@ -573,7 +577,7 @@ <h5>What Went Wrong?</h5>
573
577
574
578
</pre>
575
579
576
-
<h5>Using the Functions</h5>
580
+
<h3>Using the Functions</h3>
577
581
<p>
578
582
Finally, in order to use the functions in something other
579
583
than a test, I decided to write a program that
@@ -647,7 +651,7 @@ <h5>Using the Functions</h5>
647
651
648
652
</pre>
649
653
650
-
<h5>Polygons and Stars as Objects</h5>
654
+
<h3>Polygons and Stars as Objects</h3>
651
655
<p>
652
656
Now that I have working functions for polygons and stars, it might
653
657
be useful to make a <code>Polygon</code> and <code>Star</code> class
@@ -658,7 +662,7 @@ <h5>Polygons and Stars as Objects</h5>
658
662
a tutorial about objects in Processing.</a>
659
663
</p>
660
664
661
-
<h5>Summing Up</h5>
665
+
<h3>Summing Up</h3>
662
666
<p>
663
667
This tutorial has shown you the things you never see in books.
664
668
In a book, all the diagrams are
@@ -679,6 +683,12 @@ <h5>Summing Up</h5>
679
683
You can <ahref="code/polystar.zip">download the files from this tutorial</a>.
680
684
</p>
681
685
686
+
<p> </p>
687
+
688
+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <ahref="http://code.google.com/p/processing/issues/list">let us know</a>.</p>
Copy file name to clipboardExpand all lines: content/static/tutorials/basics/index.html
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ <h1>Coordinate System and Shapes</h1>
4
4
<tablewidth="656">
5
5
<tr>
6
6
7
-
<p>Portions of this work are from the book, <ahref="http://www.learningprocessing.com">Learning Processing</a>, by Daniel Shiffman, published by Morgan Kaufmann Publishers, Copyright 2008 Elsevier Inc. All rights reserved.</p>
8
-
9
-
<pclass="ref-notice">This tutorial is for Processing version 1.0+. <em>If you see any errors or have comments, please <ahref="http://processing.org/discourse/yabb_beta/YaBB.cgi?board=WebsiteBugs">let us know</a>.</em></p>
7
+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <ahref="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <ahref="http://www.processing.org/learning/books/#shiffman">Learning Processing</a>, by Daniel Shiffman, published by Morgan Kaufmann Publishers, Copyright 2008 Elsevier Inc. All rights reserved.</em></p>
8
+
9
+
<p> </p>
10
10
11
-
<h5>Coordinate Space</h5>
11
+
<h3>Coordinate Space</h3>
12
12
<p>
13
13
Before we begin programming with Processing, we must first channel our eighth grade selves, pull out a piece of graph paper, and draw a line. The shortest distance between two points is a good old fashioned line, and this is where we begin, with two points on that graph paper.
14
14
<br/><br/>
@@ -24,13 +24,13 @@ <h5>Coordinate Space</h5>
24
24
<br/><br/>
25
25
<imgsrc="imgs/1.2.jpg">
26
26
<br/><br/>
27
-
The key here is to realize that the computer screen is nothing more than a fancier piece of graph paper. Each pixel of the screen is a coordinate Ñ two numbers, an "x" (horizontal) and a "y" (vertical) Ñ that determines the location of a point in space. And it is our job to specify what shapes and colors should appear at these pixel coordinates.
27
+
The key here is to realize that the computer screen is nothing more than a fancier piece of graph paper. Each pixel of the screen is a coordinate Ñ two numbers, an "x" (horizontal) and a "y" (vertical) Ñ that determines the location of a point in space. And it is our job to specify what shapes and colors should appear at these pixel coordinates.
28
28
<br/><br/>
29
29
Nevertheless, there is a catch here. The graph paper from eighth grade ("Cartesian coordinate system") placed (0,0) in the center with the y-axis pointing up and the x-axis pointing to the right (in the positive direction, negative down and to the left). Th e coordinate system for pixels in a computer window, however, is reversed along the y-axis. (0,0) can be found at the top left with the positive direction to the right horizontally and down vertically.
30
30
<br/><br/>
31
31
<imgsrc="imgs/1.3.jpg">
32
32
</p>
33
-
<h5>Simple Shapes</h5>
33
+
<h3>Simple Shapes</h3>
34
34
<p>
35
35
The vast majority of the programming examples you'll see with Processing are visual in nature. These examples, at their core, involve drawing shapes and setting pixels. Let's begin by looking at four primitive shapes.
36
36
<br/><br/>
@@ -81,6 +81,11 @@ <h5>Simple Shapes</h5>
81
81
line(110,150,120,160);
82
82
</pre>
83
83
</p>
84
+
85
+
<p> </p>
86
+
87
+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <ahref="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <ahref="http://www.processing.org/learning/books/#shiffman">Learning Processing</a>, by Daniel Shiffman, published by Morgan Kaufmann Publishers, Copyright 2008 Elsevier Inc. All rights reserved.</em></p>
Copy file name to clipboardExpand all lines: content/static/tutorials/color/index.html
+12-7Lines changed: 12 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,12 @@ <h1>Color</h1>
4
4
<tablewidth="656">
5
5
<tr>
6
6
7
-
<p>Portions of this work are from the book, <ahref="http://www.learningprocessing.com">Learning Processing</a>, by Daniel Shiffman, published by Morgan Kaufmann Publishers, Copyright 2008 Elsevier Inc. All rights reserved.</p>
8
-
9
-
<pclass="ref-notice">This tutorial is for Processing version 1.0+. <em>If you see any errors or have comments, please <ahref="http://processing.org/discourse/yabb_beta/YaBB.cgi?board=WebsiteBugs">let us know</a>.</em></p>
7
+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <ahref="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <ahref="http://www.processing.org/learning/books/#shiffman">Learning Processing</a>, by Daniel Shiffman, published by Morgan Kaufmann Publishers, Copyright 2008 Elsevier Inc. All rights reserved.</em></p>
8
+
9
+
<p> </p>
10
10
11
11
12
-
<h5>Grayscale Color</h5>
12
+
<h3>Grayscale Color</h3>
13
13
14
14
In the digital world, when we want to talk about a color, precision is required. Saying "Hey, can you make that circle bluish-green?" will not do. Color, rather, is defined as a
15
15
range of numbers. Let's start with the simplest case: black & white or grayscale. 0 means black, 255 means white. In between, every other number - 50, 87, 162, 209, and so on - is a
@@ -47,7 +47,7 @@ <h5>Grayscale Color</h5>
47
47
<br/><br/>
48
48
<imgsrc="imgs/order.jpg" border="1">
49
49
50
-
<h5>RGB Color</h5>
50
+
<h3>RGB Color</h3>
51
51
<p>
52
52
<imgsrc="imgs/rgb.png" width = 200><br/>
53
53
<br/>
@@ -93,7 +93,7 @@ <h5>RGB Color</h5>
93
93
<br/><br/>
94
94
<imgsrc="imgs/selector.jpg" border=1>
95
95
</p>
96
-
<h5>Color Transparency</h5>
96
+
<h3>Color Transparency</h3>
97
97
<p>
98
98
In addition to the red, green, and blue components of each color, there is an additional optional fourth component, referred to as the color's "alpha." Alpha means transparency and is particularly useful when you want to draw elements that appear partially see-through on top of one another. Th e alpha values for an image are sometimes referred to collectively as the "alpha channel" of an image.
99
99
<br/><br/>
@@ -130,7 +130,7 @@ <h5>Color Transparency</h5>
130
130
rect(0,150,200,40);
131
131
</pre>
132
132
133
-
<h5>Custom Color Ranges</h5>
133
+
<h3>Custom Color Ranges</h3>
134
134
<p>
135
135
RGB color with ranges of 0 to 255 is not the only way you can handle color in Processing. Behind the scenes in the computer's memory, color is always
136
136
talked about as a series of 24 bits (or 32 in the case of colors with an alpha). However, Processing will let us think about color any way we like, and
@@ -164,6 +164,11 @@ <h5>Custom Color Ranges</h5>
164
164
<br/>
165
165
With <ahref="http://processing.org/reference/colorMode_.html"><strong>colorMode()</strong></a> you can set your own color range.
166
166
</p>
167
+
168
+
<p> </p>
169
+
170
+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <ahref="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <ahref="http://www.processing.org/learning/books/#shiffman">Learning Processing</a>, by Daniel Shiffman, published by Morgan Kaufmann Publishers, Copyright 2008 Elsevier Inc. All rights reserved.</em></p>
Copy file name to clipboardExpand all lines: content/static/tutorials/curves/index.html
+14-8Lines changed: 14 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,16 @@ <h1>Drawing Curves</h1>
8
8
<tr>
9
9
<td>
10
10
11
+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <ahref="http://code.google.com/p/processing/issues/list">let us know</a>.</p>
11
12
12
-
13
-
<pclass="ref-notice">This tutorial is for Processing version 1.0+. <em>If you see any errors or have comments, please <ahref="http://processing.org/discourse/yabb_beta/YaBB.cgi?board=WebsiteBugs">let us know</a>.</em></p>
13
+
<p> </p>
14
14
15
15
<p>
16
16
This tutorial introduces you to the three types of curves in Processing:
17
17
arcs, spline curves, and Bézier curves.
18
18
</p>
19
19
20
-
<h5>Arcs</h5>
20
+
<h3>Arcs</h3>
21
21
22
22
<p>
23
23
Arcs are the simplest curves to draw. Processing defines an arc as a section of an ellipse.
@@ -60,7 +60,7 @@ <h5>Arcs</h5>
60
60
61
61
</pre>
62
62
63
-
<h5>Spline Curves</h5>
63
+
<h3>Spline Curves</h3>
64
64
<p>
65
65
Arcs are fine, but they’re plain. The next function,
66
66
<code>curve()</code>, lets you draw curves that aren’t
@@ -144,7 +144,7 @@ <h5>Spline Curves</h5>
144
144
lets you do just that.</a>
145
145
</p>
146
146
147
-
<h5>Continous Spline Curves</h5>
147
+
<h3>Continous Spline Curves</h3>
148
148
<p>
149
149
In isolation, a single <code>curve()</code> is not particularly appealing. To draw a
150
150
continuous curve through several points, you are better off using
<li>Use <code>arc()</code> when you need a segment of a circle
@@ -386,6 +386,12 @@ <h5>Summary</h5>
386
386
</ul>
387
387
388
388
<!-- end of page stuff here -->
389
+
390
+
<p> </p>
391
+
392
+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <ahref="http://code.google.com/p/processing/issues/list">let us know</a>.</p>
Copy file name to clipboardExpand all lines: content/static/tutorials/drawing/index.html
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ <h1>Coordinate System and Shapes</h1>
4
4
<tablewidth="656">
5
5
<tr>
6
6
7
-
<p>Portions of this work are from the book, <ahref="http://www.learningprocessing.com">Learning Processing</a>, by Daniel Shiffman, published by Morgan Kaufmann Publishers, Copyright 2008 Elsevier Inc. All rights reserved.</p>
8
-
9
-
<pclass="ref-notice">This tutorial is for Processing version 1.0+. <em>If you see any errors or have comments, please <ahref="http://processing.org/discourse/yabb_beta/YaBB.cgi?board=WebsiteBugs">let us know</a>.</em></p>
7
+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <ahref="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <ahref="http://www.processing.org/learning/books/#shiffman">Learning Processing</a>, by Daniel Shiffman, published by Morgan Kaufmann Publishers, Copyright 2008 Elsevier Inc. All rights reserved.</em></p>
8
+
9
+
<p> </p>
10
10
11
-
<h5>Coordinate Space</h5>
11
+
<h3>Coordinate Space</h3>
12
12
<p>
13
13
Before we begin programming with Processing, we must first channel our eighth grade selves, pull out a piece of graph paper, and draw a line. The shortest distance between two points is a good old fashioned line, and this is where we begin, with two points on that graph paper.
14
14
<br/><br/>
@@ -30,7 +30,7 @@ <h5>Coordinate Space</h5>
30
30
<br/><br/>
31
31
<imgsrc="imgs/1.3.jpg">
32
32
</p>
33
-
<h5>Simple Shapes</h5>
33
+
<h3>Simple Shapes</h3>
34
34
<p>
35
35
The vast majority of the programming examples you'll see with Processing are visual in nature. These examples, at their core, involve drawing shapes and setting pixels. Let's begin by looking at four primitive shapes.
36
36
<br/><br/>
@@ -81,6 +81,11 @@ <h5>Simple Shapes</h5>
81
81
line(110,150,120,160);
82
82
</pre>
83
83
</p>
84
+
85
+
<p> </p>
86
+
87
+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <ahref="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <ahref="http://www.processing.org/learning/books/#shiffman">Learning Processing</a>, by Daniel Shiffman, published by Morgan Kaufmann Publishers, Copyright 2008 Elsevier Inc. All rights reserved.</em></p>
0 commit comments