Skip to content

Commit fe8b702

Browse files
committed
Tutorial formatting updates
1 parent 547bea0 commit fe8b702

13 files changed

Lines changed: 173 additions & 110 deletions

File tree

content/static/tutorials/2darray/index.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ <h1>Two-Dimensional Arrays</h1>
44
<table width="656">
55
<tr>
66

7-
<p>Portions of this work are from the book, <a href="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 <a href="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <a href="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>&nbsp;</p>
810

9-
<p class="ref-notice">This tutorial is for Processing version 1.0+. <em>If you see any errors or have comments, please <a href="http://processing.org/discourse/yabb_beta/YaBB.cgi?board=WebsiteBugs">let us know</a>.</em></p>
1011

1112
An <a href="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.
1213
<br /><br />
@@ -165,9 +166,10 @@ <h1>Two-Dimensional Arrays</h1>
165166
}
166167
</pre>
167168

169+
<p>&nbsp;</p>
168170

169-
<p>
170-
</p>
171+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <a href="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <a href="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>
172+
171173
</td>
172174
</tr>
173175
</table>

content/static/tutorials/anatomy/index.html

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ <h1>Anatomy of a Program</h1>
88
<tr>
99
<td>
1010

11+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <a href="http://code.google.com/p/processing/issues/list">let us know</a>.</p>
12+
13+
<p>
14+
You can <a href="code/polystar.zip">download the files from this tutorial</a>.
15+
</p>
1116

12-
13-
<p class="ref-notice">This tutorial is for Processing version 1.0+. <em>If you see any errors or have comments, please <a href="http://processing.org/discourse/yabb_beta/YaBB.cgi?board=WebsiteBugs">let us know</a>.</em></p>
17+
<p>&nbsp;</p>
1418

1519
<p>
1620
Many of the tutorials for Processing concentrate on what the language
@@ -37,7 +41,7 @@ <h1>Anatomy of a Program</h1>
3741
the programs at <a href="http://openprocessing.org/">openProcessing.org</a>.
3842
</p>
3943

40-
<h5>Drawing Regular Polygons</h5>
44+
<h3>Drawing Regular Polygons</h3>
4145

4246
<p>
4347
You wouldn&rsquo;t think of building a house without a blueprint, and you
@@ -47,7 +51,7 @@ <h5>Drawing Regular Polygons</h5>
4751
keyboard. So that&rsquo;s where I started.
4852
</p>
4953

50-
<h5>Step 1: Planning on paper</h5>
54+
<h3>Step 1: Planning on paper</h3>
5155

5256
<p>
5357
The first step was to draw a crude diagram to dredge up old memories of how regular
@@ -75,7 +79,7 @@ <h5>Step 1: Planning on paper</h5>
7579
</p>
7680
</blockquote>
7781

78-
<h5>Step 2: Some basic trigonometry</h5>
82+
<h3>Step 2: Some basic trigonometry</h3>
7983
<p>
8084
So, if you have a line of length <em>r</em> starting at (0,0) at an angle theta (&theta;),
8185
what are its coordinates in terms of <em>x</em> and <em>y</em>? If you know a little bit of
@@ -95,7 +99,7 @@ <h5>Step 2: Some basic trigonometry</h5>
9599
<p><img src="imgs/sketch2.jpg" alt="Diagram of angle showing relationship of cosine and sine"
96100
width="250" height="164" /></p>
97101

98-
<h5>Step 3: Design Decisions</h5>
102+
<h3>Step 3: Design Decisions</h3>
99103
<p>
100104
It looks like this is a job for a <code>for</code> loop that runs from 0 to
101105
<em>n</em> (the number of sides), calculating the points for each vertex and drawing
@@ -158,7 +162,7 @@ <h5>Step 3: Design Decisions</h5>
158162

159163
</pre>
160164

161-
<h5>Two Steps Forward, One Step Back</h5>
165+
<h3>Two Steps Forward, One Step Back</h3>
162166
<p>
163167
The program works, so it&rsquo;s time to see if there are things that
164168
could be added or changed. First, the triangle and pentagon seem
@@ -277,7 +281,7 @@ <h5>Two Steps Forward, One Step Back</h5>
277281
the vertices were within the proper area.
278282
</p>
279283

280-
<h5>Too Many Parameters</h5>
284+
<h3>Too Many Parameters</h3>
281285
<p>
282286
I now had a much more flexible function for drawing polygons, but
283287
it came at the expense of more parameters. It would be nice to be
@@ -334,7 +338,7 @@ <h5>Too Many Parameters</h5>
334338

335339
</pre>
336340

337-
<h5>Safe Computing</h5>
341+
<h3>Safe Computing</h3>
338342
<p>
339343
What happens if someone tries to draw a polygon with 2 sides, 1 side,
340344
or worse, 0 sides? The first two will generate a line and a point,
@@ -364,7 +368,7 @@ <h5>Safe Computing</h5>
364368

365369
</pre>
366370

367-
<h5>Drawing Stars</h5>
371+
<h3>Drawing Stars</h3>
368372
<p>
369373
Now that I was satisfied with the <code>polygon()</code> function, it was time
370374
to move on to drawing stars. From some playing around with a crude sketch, I
@@ -486,7 +490,7 @@ <h5>Drawing Stars</h5>
486490

487491
</pre>
488492

489-
<h5>What Went Wrong?</h5>
493+
<h3>What Went Wrong?</h3>
490494
<p>
491495
When I ran this program, I just freaked out. Everything looked great,
492496
except for the three-sided star. How come I didn&rsquo;t
@@ -573,7 +577,7 @@ <h5>What Went Wrong?</h5>
573577

574578
</pre>
575579

576-
<h5>Using the Functions</h5>
580+
<h3>Using the Functions</h3>
577581
<p>
578582
Finally, in order to use the functions in something other
579583
than a test, I decided to write a program that
@@ -647,7 +651,7 @@ <h5>Using the Functions</h5>
647651

648652
</pre>
649653

650-
<h5>Polygons and Stars as Objects</h5>
654+
<h3>Polygons and Stars as Objects</h3>
651655
<p>
652656
Now that I have working functions for polygons and stars, it might
653657
be useful to make a <code>Polygon</code> and <code>Star</code> class
@@ -658,7 +662,7 @@ <h5>Polygons and Stars as Objects</h5>
658662
a tutorial about objects in Processing.</a>
659663
</p>
660664

661-
<h5>Summing Up</h5>
665+
<h3>Summing Up</h3>
662666
<p>
663667
This tutorial has shown you the things you never see in books.
664668
In a book, all the diagrams are
@@ -679,6 +683,12 @@ <h5>Summing Up</h5>
679683
You can <a href="code/polystar.zip">download the files from this tutorial</a>.
680684
</p>
681685

686+
<p>&nbsp;</p>
687+
688+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <a href="http://code.google.com/p/processing/issues/list">let us know</a>.</p>
689+
690+
691+
682692
</td>
683693
</tr>
684694
</table>

content/static/tutorials/basics/index.html

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ <h1>Coordinate System and Shapes</h1>
44
<table width="656">
55
<tr>
66

7-
<p>Portions of this work are from the book, <a href="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-
<p class="ref-notice">This tutorial is for Processing version 1.0+. <em>If you see any errors or have comments, please <a href="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 <a href="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <a href="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>&nbsp;</p>
1010

11-
<h5>Coordinate Space</h5>
11+
<h3>Coordinate Space</h3>
1212
<p>
1313
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.
1414
<br /><br />
@@ -24,13 +24,13 @@ <h5>Coordinate Space</h5>
2424
<br /><br />
2525
<img src="imgs/1.2.jpg">
2626
<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.
2828
<br /><br />
2929
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.
3030
<br /><br />
3131
<img src="imgs/1.3.jpg">
3232
</p>
33-
<h5>Simple Shapes</h5>
33+
<h3>Simple Shapes</h3>
3434
<p>
3535
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.
3636
<br /><br />
@@ -81,6 +81,11 @@ <h5>Simple Shapes</h5>
8181
line(110,150,120,160);
8282
</pre>
8383
</p>
84+
85+
<p>&nbsp;</p>
86+
87+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <a href="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <a href="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>
88+
8489
</td>
8590
</tr>
8691
</table>

content/static/tutorials/color/index.html

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ <h1>Color</h1>
44
<table width="656">
55
<tr>
66

7-
<p>Portions of this work are from the book, <a href="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-
<p class="ref-notice">This tutorial is for Processing version 1.0+. <em>If you see any errors or have comments, please <a href="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 <a href="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <a href="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>&nbsp;</p>
1010

1111

12-
<h5>Grayscale Color</h5>
12+
<h3>Grayscale Color</h3>
1313

1414
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
1515
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>
4747
<br /><br />
4848
<img src="imgs/order.jpg" border="1">
4949

50-
<h5>RGB Color</h5>
50+
<h3>RGB Color</h3>
5151
<p>
5252
<img src="imgs/rgb.png" width = 200><br />
5353
<br />
@@ -93,7 +93,7 @@ <h5>RGB Color</h5>
9393
<br /><br />
9494
<img src="imgs/selector.jpg" border=1>
9595
</p>
96-
<h5>Color Transparency</h5>
96+
<h3>Color Transparency</h3>
9797
<p>
9898
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.
9999
<br /><br />
@@ -130,7 +130,7 @@ <h5>Color Transparency</h5>
130130
rect(0,150,200,40);
131131
</pre>
132132

133-
<h5>Custom Color Ranges</h5>
133+
<h3>Custom Color Ranges</h3>
134134
<p>
135135
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
136136
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>
164164
<br />
165165
With <a href="http://processing.org/reference/colorMode_.html"><strong>colorMode()</strong></a> you can set your own color range.
166166
</p>
167+
168+
<p>&nbsp;</p>
169+
170+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <a href="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <a href="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>
171+
167172
</td>
168173
</tr>
169174
</table>

content/static/tutorials/curves/index.html

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ <h1>Drawing Curves</h1>
88
<tr>
99
<td>
1010

11+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <a href="http://code.google.com/p/processing/issues/list">let us know</a>.</p>
1112

12-
13-
<p class="ref-notice">This tutorial is for Processing version 1.0+. <em>If you see any errors or have comments, please <a href="http://processing.org/discourse/yabb_beta/YaBB.cgi?board=WebsiteBugs">let us know</a>.</em></p>
13+
<p>&nbsp;</p>
1414

1515
<p>
1616
This tutorial introduces you to the three types of curves in Processing:
1717
arcs, spline curves, and B&eacute;zier curves.
1818
</p>
1919

20-
<h5>Arcs</h5>
20+
<h3>Arcs</h3>
2121

2222
<p>
2323
Arcs are the simplest curves to draw. Processing defines an arc as a section of an ellipse.
@@ -60,7 +60,7 @@ <h5>Arcs</h5>
6060

6161
</pre>
6262

63-
<h5>Spline Curves</h5>
63+
<h3>Spline Curves</h3>
6464
<p>
6565
Arcs are fine, but they&rsquo;re plain. The next function,
6666
<code>curve()</code>, lets you draw curves that aren&rsquo;t
@@ -144,7 +144,7 @@ <h5>Spline Curves</h5>
144144
lets you do just that.</a>
145145
</p>
146146

147-
<h5>Continous Spline Curves</h5>
147+
<h3>Continous Spline Curves</h3>
148148
<p>
149149
In isolation, a single <code>curve()</code> is not particularly appealing. To draw a
150150
continuous curve through several points, you are better off using
@@ -204,7 +204,7 @@ <h5>Continous Spline Curves</h5>
204204

205205
</pre>
206206

207-
<h5>B&eacute;zier Curves</h5>
207+
<h3>B&eacute;zier Curves</h3>
208208
<p>
209209
Though better than arcs, spline curves don&rsquo;t seem to have those
210210
graceful, swooping curves that say &ldquo;art.&rdquo; For those,
@@ -283,7 +283,7 @@ <h5>B&eacute;zier Curves</h5>
283283
lets you do just that.</a>
284284
</p>
285285

286-
<h5>Continous B&eacute;zier Curves</h5>
286+
<h3>Continous B&eacute;zier Curves</h3>
287287
<p>
288288
Just as <code>curveVertex()</code> allows you to make continuous
289289
spline curves, <code>bezierVertex()</code> lets you make continuous
@@ -370,7 +370,7 @@ <h5>Continous B&eacute;zier Curves</h5>
370370
endShape();
371371
</pre>
372372

373-
<h5>Summary</h5>
373+
<h3>Summary</h3>
374374

375375
<ul>
376376
<li>Use <code>arc()</code> when you need a segment of a circle
@@ -386,6 +386,12 @@ <h5>Summary</h5>
386386
</ul>
387387

388388
<!-- end of page stuff here -->
389+
390+
<p>&nbsp;</p>
391+
392+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <a href="http://code.google.com/p/processing/issues/list">let us know</a>.</p>
393+
394+
389395
</td>
390396
</tr>
391397
</table>

content/static/tutorials/drawing/index.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ <h1>Coordinate System and Shapes</h1>
44
<table width="656">
55
<tr>
66

7-
<p>Portions of this work are from the book, <a href="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-
<p class="ref-notice">This tutorial is for Processing version 1.0+. <em>If you see any errors or have comments, please <a href="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 <a href="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <a href="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>&nbsp;</p>
1010

11-
<h5>Coordinate Space</h5>
11+
<h3>Coordinate Space</h3>
1212
<p>
1313
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.
1414
<br /><br />
@@ -30,7 +30,7 @@ <h5>Coordinate Space</h5>
3030
<br /><br />
3131
<img src="imgs/1.3.jpg">
3232
</p>
33-
<h5>Simple Shapes</h5>
33+
<h3>Simple Shapes</h3>
3434
<p>
3535
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.
3636
<br /><br />
@@ -81,6 +81,11 @@ <h5>Simple Shapes</h5>
8181
line(110,150,120,160);
8282
</pre>
8383
</p>
84+
85+
<p>&nbsp;</p>
86+
87+
<p><em>This tutorial is for Processing version 1.1+. If you see any errors or have comments, please <a href="http://code.google.com/p/processing/issues/list">let us know</a>. This tutorials is from the book, <a href="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>
88+
8489
</td>
8590
</tr>
8691
</table>

0 commit comments

Comments
 (0)