Computer graphics programming in OpenGL with C 2nd Edition V Scott Gordon instant download
Computer graphics programming in OpenGL with C 2nd Edition V Scott Gordon instant download
https://ebookmeta.com/product/computer-graphics-programming-in-
opengl-with-c-2nd-edition-v-scott-gordon/
https://ebookmeta.com/product/computer-graphics-programming-in-
opengl-with-java-3rd-edition-v-scott-gordon/
https://ebookmeta.com/product/opengl-foundations-taking-your-
first-steps-in-graphics-programming-kameron-hussain/
https://ebookmeta.com/product/introduction-to-computer-graphics-
using-opengl-and-java-3rd-edition-karsten-lehn/
https://ebookmeta.com/product/the-code-breaker-jennifer-doudna-
gene-editing-and-the-future-of-the-human-race-1st-edition-walter-
isaacson/
Metaheuristics for Finding Multiple Solutions 1st
Edition Mike Preuss Michael G Epitropakis Xiaodong Li
Jonathan E Fieldsend
https://ebookmeta.com/product/metaheuristics-for-finding-
multiple-solutions-1st-edition-mike-preuss-michael-g-epitropakis-
xiaodong-li-jonathan-e-fieldsend/
https://ebookmeta.com/product/power-transition-in-the-anarchical-
society-rising-powers-institutional-change-and-the-new-world-
order-tonny-brems-knudsen/
Pro JSF and HTML5 2nd Edition Hazem Saleh Allan Lykke
Christensen Zubin Wadia
https://ebookmeta.com/product/pro-jsf-and-html5-2nd-edition-
hazem-saleh-allan-lykke-christensen-zubin-wadia/
https://ebookmeta.com/product/marxist-politics-1st-edition-md-
ayub-mallick/
https://ebookmeta.com/product/nistisima-the-secret-to-delicious-
vegan-cooking-from-the-mediterranean-and-beyond-1st-edition-
georgina-hayden/
The Bloomsbury Handbook to Sylvia Plath 1st Edition
Anita Helle
https://ebookmeta.com/product/the-bloomsbury-handbook-to-sylvia-
plath-1st-edition-anita-helle/
Computer Graphics
Programming in OpenGL
with C++
Second Edition
By purchasing or using this book and its companion files (the “Work”), you
agree that this license grants permission to use the contents contained herein,
including the companion files, but does not give you the right of ownership to any
of the textual content in the book / files or ownership to any of the information
or products contained in it. This license does not permit uploading of the Work
onto the Internet or on a network (of any kind) without the written consent of the
Publisher. Duplication or dissemination of any text, code, simulations, images,
etc. contained herein is limited to and subject to licensing terms for the respective
products, and permission must be obtained from the Publisher or the owner of the
content, etc., in order to reproduce or network any portion of the textual material
(in any media) that is contained in the Work.
The sole remedy in the event of a claim of any kind is expressly limited to
replacement of the book and/or companion files, and only at the discretion of the
Publisher. The use of “implied warranty” and certain “exclusions” vary from state
to state and might not apply to the purchaser of this product.
The companion files are available for downloading by writing to the publisher at
info@merclearning.com.
This publication, portions of it, or any accompanying software may not be reproduced in any way,
stored in a retrieval system of any type, or transmitted by any means, media, electronic display or
mechanical display, including, but not limited to, photocopy, recording, Internet postings, or scan
ning, without prior permission in writing from the publisher.
The publisher recognizes and respects all marks used by companies, manufacturers, and
developers as a means to distinguish their products. All brand names and product names mentioned
in this book are trademarks or service marks of their respective companies. Any omission or misuse
(of any kind) of service marks or trademarks, etc. is not an attempt to infringe on the property
of others.
Our titles are available for adoption, license, or bulk purchase by institutions, corporations, etc.
For additional information, please contact the Customer Service Dept. at 800-232-0223 (toll free).
Digital versions of our titles are available at: www.academiccourseware.com and other e-vendors. All
companion files are available by writing to the publisher at info@merclearning.com.
The sole obligation of Mercury Learning and Information to the purchaser is to replace
the book and/or disc, based on defective materials or faulty workmanship, but not based on the
operation or functionality of the product.
2.1.5 Rasterization 19
2.1.6 Fragment Shader 20
2.1.7 Pixel Operations 21
2.2 Detecting OpenGL and GLSL Errors 22
2.3 Reading GLSL Source Code from Files 26
2.4 Building Objects from Vertices 27
2.5 Animating a Scene 28
2.6 Organizing the C++ Code Files 31
Index 503
One of the things that we hope is unique about this book is that we have strived to
make it accessible to someone new to 3D graphics programming. While there is by no
means a lack of information available on the topic—quite the contrary—many students
are initially overwhelmed. This text is our attempt to write the book we wish we had had
when we were starting out, with step-by-step explanations of the basics, progressing in
an organized manner up through advanced topics. We considered titling the book “shader
programming made easy”; however, we don’t think that there really is any way of making
shader programming “easy.” We hope that we have come close.
This book teaches OpenGL programming in C++. There are several advantages to
learning graphics programming in C++:
• OpenGL’s native language is C, so a C++ program can make direct OpenGL
function calls.
• OpenGL applications written in C++ typically exhibit very high performance.
• C++ offers modern programming constructs (classes, polymorphism, etc.) not
available in C.
• C++ is a popular language choice for using OpenGL, and a large number of
instructional resources for OpenGL are available in C++.
It is worth mentioning that there do exist other language bindings for OpenGL.
Popular alternatives exist for Java, C#, Python, and many others. This textbook focuses
only on C++.
Another thing that makes this book unique is that it has a “sister” textbook: Computer
Graphics Programming in OpenGL with Java 2/E. The two books are organized in lock-
step, with the same chapter and section numbers and topics, figures, exercises, and theo-
retical descriptions. Wherever possible, the code is organized similarly. Of course, the
use of C++ versus Java leads to considerable programming differences (although all of
the shader code is identical). Still, we believe that we have provided virtually identical
learning paths, even allowing a student to choose either option within a single classroom.
Yet another variant of OpenGL is called “WebGL.” Based on OpenGL ES, WebGL is
designed to support the use of OpenGL in web browsers. WebGL allows an application to
use JavaScript1 to invoke OpenGL ES operations, which makes it easy to embed OpenGL
graphics into standard HTML (web) documents. Most modern web browsers support
WebGL, including Apple Safari, Google Chrome, Microsoft Edge, Microsoft Internet
Explorer, Mozilla Firefox, and Opera. Since web programming is outside the scope of this
book, we will not cover any WebGL specifics. Note however that because WebGL is based
on OpenGL ES, which in turn is based on standard OpenGL, much of what is covered in
this book can be transferred directly to learning about these OpenGL variants.
The very topic of 3D graphics lends itself to impressive, even beautiful images.
Indeed, many popular textbooks on the topic are filled with breathtaking scenes, and it
is enticing to leaf through their galleries. While we acknowledge the motivational utility
of such examples, our aim is to teach, not to impress. The images in this book are simply
1
JavaScript is a scripting language that can be used to embed code in webpages. It has strong
similarities to Java, but also many important differences.
the outputs of the example programs, and since this is an introductory text, the resulting
scenes are unlikely to impress an expert. However, the techniques presented do constitute
the foundational elements for producing today’s stunning 3D effects.
Ray tracing in particular has become “hot” recently, so we are especially excited that
it is now included in our book. It is also a huge topic, so even though our coverage is just
a basic introduction, Chapter 16 is now the longest chapter in the book. Chapter 16 also
includes an introduction to compute shaders, which were introduced in OpenGL 4.3, and
an introduction to additive and subtractive color blending, which expands on a topic that
was introduced in Section 14.2.
For years, our own students have repeatedly expressed an interest in simulating
water. However, water takes so many forms that writing an introductory section on the
topic is challenging. Ultimately, we decided to present water in a way that would comple-
ment related topics in the book such as terrain, sky, etc., and so in Chapter 15 we focus on
utilizing our noise maps from Chapter 14 to generate water surfaces such as are seen in
lakes and oceans.
As a result of these additions, this 2nd edition is larger than the previous edition.
Besides the new material, there are important revisions throughout the book. For
example, we fixed bugs in our Torus class in Chapter 6 and made significant improve-
ments to our noise map functions in Chapter 14. We expanded our Utils.cpp utility class
to handle the loading of compute shaders. We also helped identify a bug in SOIL2 (now
fixed) that affected Macintosh users attempting to load cubemaps.
There are dozens of small changes in every chapter that the reader might not even
notice: fixing typos, cleaning up code inconsistencies, updating the installation instruc-
tions, making slight wording changes, sprucing up figures, updating references, etc.
Completely eliminating typos is virtually impossible in a book that covers an ever-
changing technology-rich topic, but we really have tried hard.
Intended Audience
This book is targeted at students of computer science. This could mean undergraduates
pursuing a BS degree, but it could also mean anyone who studies computer science. As
such, we are assuming that the reader has at least a solid background in object-oriented
programming, at the level of someone who is, say, a computer science major at the junior
or senior level.
There are also some specific things that we use in this book that we don’t cover,
because we assume the reader already has sufficient background. In particular, these are:
• C++ and its most commonly used libraries, such as the Standard Template
Library;
• familiarity with using an Integrated Development Environment (IDE), such as
Visual Studio;
• basic data structures and algorithms, such as linked lists, stacks, and queues, etc.
• recursion;
• event-driven programming concepts;
• basic matrix algebra and trigonometry; and
• awareness of color models, such as RGB, RGBA, etc.
It is hoped that the potential audience for this new book is further bolstered by the
existence of its “sister” textbook, Computer Graphics Programming in OpenGL with
Java. In particular, we envision a learning environment where students are free to utilize
either C++ or Java in the same classroom, selecting one or the other book. The two texts
cover the material sufficiently in lockstep that we have been able to conduct a graphics
programming course successfully in this manner.
After casting on
the stitches, hold the
pin with the stitches
on it in the left hand,
and with the thread
turned round the
little finger of the
right hand pass it
under the second
and third fingers, and
over the forefinger;
take the other pin in
the right hand; put
this pin into the first loop on the left pin, and with the forefinger of
the right hand pass the thread between the pins, bring the thread
through, which forms one stitch; then take the loop off the left pin
and repeat.
TO MAKE A STITCH
Bring the thread forward between the pins; when this stitch is
worked in the next row it will form an open stitch.
TO MAKE TWO, THREE, OR MORE STITCHES.
To pass a stitch from the left pin to the right without working it. In
all knitting the first stitch of every row should be slipped to make a
firm and even selvedge; this is not mentioned in the receipts, as it
would much lengthen the description, but is to be observed as a
fixed rule; for example, when a row commences thus; knit 2
together, work as follows:—slip the 1st stitch, knit the 2d, and turn
the slipped stitch over the knitted one.
TO KNIT TWO STITCHES TOGETHER.
Take two stitches with the right hand pin, and knit as 1 stitch.
TO KNIT THREE STITCHES TOGETHER.
Slip 1 stitch, knit 2 stitches together, and with the point of the left
hand pin turn the slipped stitch over the 2 knitted together, leaving
but 1 stitch.
PEARL, ALSO CALLED SEAM, BACK, AND RIB
KNITTING.
Commence the
row with the thread
in front of the pin,
pass the point of the
pin down the stitch,
turn the thread
round the pin, and
take it off as in plain
knitting; repeat,
always keeping the
thread in front.
PEARL AND PLAIN STITCHES IN THE SAME ROW.
Pass the thread to the back of the work before knitting plain
stitches, and to the front before pearling stitches.
TO PEARL TWO OR THREE STITCHES TOGETHER
Keep the thread in front of the pin, pass the point of the right pin
down 2 or 3 stitches, and pearl them together.
TO MAKE A STITCH IN PEARL KNITTING.
Having the thread in front of the pin, turn the thread completely
round the pin, so as to bring it in front again.
TO FORM A ROUND.
4 or 5 pins are
required; cast on the
required number of
stitches on one pin,
and divide them
equally on the other
3 or 4 pins, keeping
the 4th or 5th pin to
knit with, and with
this pin knit the 1st
stitch that was cast;
on knitting off the 3
or 4 pins form one
round.
TO RAISE STITCHES.
As in the Berthe
and Collar, place the
two pins containing
the work together,
the deepest at the
back, and with a
third pin put it
through one stitch of
each pin, as I and K,
and knit them as one stitch.
THE STITCHES BETWEEN A PARENTHESIS ( ).
(Knit 2 together, and knit 1 three times), are worked thus, knit 2
together, knit 1; knit 2 together, knit 1; knit 2 together, knit 1; this
prevents useless repetition.
A MARK *.
When this mark (*) occurs in a row, the stitches before it are not
to be repeated in the row, being merely the edge stitches to prevent
the work from decreasing; thus when knit 3 together, is in a row, the
row generally begins with knit 2 together and ends the same.
TO CAST OFF.
Taylor’s Crochet or Knitting Thread, No. 8; Pins No. 19, or Fine Black
Netting Silk.
This Berthe is composed of two rows of lace, with open rows
between them for ribbon. In this pattern, the pearl stitch is the half
of the 2 made stitches in the row before. Cast on 49 stitches with
one pin.
1st row.—Knit 2 together, make 2, knit 3 together, make 1, knit 2
together, knit 2, knit 2 together, make 1, knit 3, make 1, knit 3
together, make 1, knit 3, make 1, knit 3 together, make 1, knit 3,
make 1, knit 2 together, knit 2, knit 2 together, make 1, knit 1,
make 1, knit 2 together, knit 14.
2d.—Make 1, knit 2 together, knit 12, knit 2 together, make 1, knit 1,
make 1, knit 2 together, knit 3, make 1, knit 2 together, knit 1, knit
2 together, make 1, knit 1, make 1, knit 2 together, knit 1, knit 2
together, make 1, knit 1, make 1, knit 2 together, knit 1, knit 2
together, make 1, knit 3, knit 2 together, make 1, knit 2, pearl half
a stitch, knit 1.
3d.—Knit 2 together, make 2, knit 2 together, make 1, knit 1, make
1, knit 2 together, knit 3, make 1, knit 3 together, make 1, knit 3,
make 1, knit 3 together, make 1, knit 3, make 1, knit 3 together,
make 1, knit 2 together, knit 2, knit 2 together, make 1, knit 1,
make 1, knit 2 together, knit 14.
4th.—Make 1, knit 2 together, knit 11, knit 2 together, make 1, knit
3, make 1, knit 2 together, knit 4, make 1, knit 2 together, knit 1,
knit 2 together, make 1, knit 1, make 1, knit 2 together, knit 1, knit
2 together, make 1, knit 4, knit 2 together, make 1, knit 3, make 1,
knit 2, pearl 1, knit 1.
5th.—Knit 2 together, make 2, knit 2 together, make 1, knit 5, make
1, knit 2 together, knit 4, make 1, knit 3 together, make 1, knit 3,
make 1, knit 3 together, make 1, knit 4, knit 2 together, make 1,
knit 5, make 1, knit 2 together, knit 12.
6th.—Make 1, knit 2 together, knit 9, knit 2 together, make 1, knit 7,
make 1, knit 2 together, knit 5, make 1, knit 2 together, knit 1, knit
2 together, make 1, knit 5, knit 2 together, make 1, knit 7, make 1,
knit 2, pearl 1, knit 1.
7th.—Knit 2 together, make 2, knit 2 together, make 1, knit 2, knit 2
together, make 1, knit 1, make 1, knit 2 together, knit 2, make 1,
knit 2 together, knit 5, make 1, knit 3 together, make 1, knit 5, knit
2 together, make 1, knit 2, knit 2 together, make 1, knit 1, make 1,
knit 2 together, knit 2, make 1, knit 2 together, knit 10.
8th.—Make 1, knit 2 together, knit 7, knit 2 together, make 1, knit 2,
knit 2 together, make 1, knit 3, make 1, knit 2 together, knit 2,
make 1, knit 2 together, knit 11, knit 2 together, make 1, knit 2,
knit 2 together, make 1, knit 3, make 1, knit 2 together, knit 2,
make 1, knit 2, pearl 1, knit 1.
9th.—Knit 2 together, make 2 *, knit 2 together, make 1, knit 1,
make 1, knit 2 together, knit 1, make 1, knit 2 together, knit 1, knit
2 together, make 1, knit 1, knit 2 together, make 1, knit 1, make 1,
knit 2 together, knit 9, repeat from * once more; end with 8 plain
instead of 9.
10th.—Make 1, knit 2 together, knit 5, knit 2 together, make 1, knit
3, make 1, knit 2 together, knit 1, make 1, knit three together,
make 1, knit 1, knit 2 together, make 1, knit 3, make 1, knit 2
together, knit 7, knit 2 together, make 1, knit 3, make 1, knit 2
together, knit 1, make 1, knit 3 together, make 1, knit 1, knit 2
together, make 1, knit 3, make 1, knit 2, pearl 1, knit 1.
11th.—Knit 2 together, make 2 *, knit 2 together, make 1, knit 5,
make 1, knit 2 together, knit 3, knit 2 together, make 1, knit 5,
make 1, knit 2 together, knit 5; repeat from * once more, and end
with 1 plain.
12th.—Make 1, knit 2 together, knit 3, knit 2 together, make 1, knit
7, make 1, knit 2 together, knit 1, knit 2 together, make 1, knit 7;
repeat once more, and end with make 1, knit 2, pearl 1, knit 1.
13th.—Knit 2 together, make 2 *, knit 2 together, make 1, knit 2,
knit 2 together, make 1, knit 1, make 1, knit 2 together, knit 2,
make 1, knit 3 together, make 1, knit 2, knit 2 together, make 1,
knit 1, make 1, knit 2 together, knit 2, make 1, knit 2 together, knit
1; repeat from * once more, and end with knit 3.
14th.—Make 1, knit 2 together, knit 3 *, make 1, knit 2, knit 2
together, make 1, knit 3, make 1, knit 2 together, knit 2, make 1,
knit 1, make 1, knit 2 together, knit 2, make 1, knit 3, make 1, knit
2 together, knit 2, make 1, knit 3 together; repeat from * once
more, and end with knit 2 together instead of three together, pearl
1, knit 1.
15th.—Knit 2 together, make 2, knit 2 together *, make 1, knit 2
together, knit 1, make 1, knit 2 together, knit 1, knit 2 together,
make 1, knit 1, knit 2 together, make 1, knit 3; repeat from * 3
times more, and end with knit 3.
16th.—Make 1, knit 2 together *, knit 5, make 1, knit 2 together, knit
1, make 1, knit 3 together, make 1, knit 1, knit 2 together, make 1;
repeat from * 3 times more, and end with knit 2 together, knit 1,
pearl 1, knit 1.
17th.—Knit 2 together, make 2, knit 3 together *, make 1, knit 2
together, knit 3, knit 2 together, make 1, knit 7; repeat from * 3
times more, and end with one plain.
18th.—Make 1, knit 2 together *, knit 7, make 1, knit 2 together, knit
1, knit 2 together, make 1, knit 2, knit 2 together, make 1, knit 1,
make 1, knit 2 together, knit 2, make 1, knit 2 together, knit 1, knit
2 together, make 1, knit 2; repeat from * once more, and end with
knit 3 together instead of 2 plain, pearl 1, knit 1.
19th.—Knit 2 together, make 2, knit 2 together *, make 1, knit 3
together, make 1, knit 2, knit 2 together, make 1, knit 3, make 1,
knit 2 together, knit 2, make 1, knit 3 together, make 1, knit 11;
repeat from * once more, and end with 10 plain instead of 11.
20th.—Make 1, knit 2 together, knit 8, knit 3 together, make 1, knit 2
together, knit 1, make 1, knit 2 together, knit 1, knit 2 together,
make 1, knit 1, knit 2 together, make 1, knit 6, knit 2 together,
make 1, knit 1, make 1, knit 2 together, knit 6, make 1, knit 2
together, knit 1, make 1, knit 2 together, knit 1, knit 2 together,
make 1, knit 1, knit 2 together, make 1, knit 3 together, knit 2
together, pearl 1, knit 1.
21st.—Knit 2 together, make 2, knit 3 together, make 1, knit 2
together, knit 1, make 1, knit 3 together, make 1, knit 1, knit 2
together, make 1, knit 6, knit 2 together, make 1, knit 3, make 1,
knit 2 together, knit 6, make 1, knit 2 together, knit 1, make 1, knit
3 together, make 1, knit 1, knit 2 together, make 1, knit 12.
22d.—Make 1, knit 2 together, knit 11, make 1, knit 2 together, knit
3, knit 2 together, make 1, knit 5, knit 2 together, make 1, knit 1,
make 1, knit 2 together, knit 1, knit 2 together, make 1, knit 1,
make 1, knit 2 together, knit 5, make 1, knit 2 together, knit 3, knit
2 together, make 1, knit 2 together, knit 1, pearl 1, knit 1.
23d.—Knit 2 together, make 2, knit 3 together, make 1, knit 2
together, knit 1, knit 2 together, make 1, knit 5, knit 2 together,
make 1, knit 3, make 1, knit 3 together, make 1, knit 3, make 1,
knit 2 together, knit 5, make 1, knit 2 together, knit 1, knit 2
together, make 1, knit 14.
24th.—Make 1, knit 2 together, knit 13, make 1, knit 3 together,
make 1, knit 4, knit 2 together, make 1, knit 1, make 1, knit 2
together, knit 1, knit 2 together, make 1, knit 1, make 1, knit 2
together, knit 1, knit 2 together, make 1, knit 1, make 1, knit 2
together, knit 4, make 1, knit 3 together, make 1, knit 3 together,
pearl 1, knit 1.
Repeat from 1st row—and when sufficient is made, cast off. For the
ribbon raise the loops at the selvedge and knit 6 rows plain.
7th.—Knit 3 plain *, make 6, knit 3 together, knit 1, knit 3 together;
repeat from * to the end.
8th.—Knit 3 together, pearl 1, knit 1, pearl 1, knit 1, pearl 1, knit 1;
these last 6 stitches are the made stitches in last row, taking off
one turn of the thread each stitch; knit 6 rows plain.
15th.—Knit 6 plain, and then work the same as the 7th row from the
*.
16th.—Same as 8th, and then knit 6 rows plain.
25th.—Same as 7th.
26th.—Same as 8th, and then knit 6 rows plain. This finishes the 1st
part of the Berthe, and leaving it on the pins, work the 2d part,
and when as many patterns are completed as the 1st part, raise
the loops of the selvedge on the pin, place the two parts together,
the narrowest in front, and with a third pin knit 1 stitch off each
together, and knit 2 rows plain and cast off.—See “Explanation of
Terms, to Join.”
CHANTILLY LACE EDGING.
Taylor’s Crochet or Knitting Thread, No. 12; Pins No. 21, Ball Gauge.
Cast on 81 stitches with 2 pins.
1st row, pearl; 2d row, plain; 3d row, pearl; 4th row, plain; 5th row,
pearl.
6th.—Make 4, knit 3 together, knit 3 together; repeat.
7th.—Pearl 3, knit 1, pearl 1, knit 1; the last 4 stitches are those
made on 6th row; repeat.
8th, plain; 9th, pearl; 10th, plain; 11th, pearl.
12th.—Make 1, knit 2; repeat.
13th.—Pearl. There will now be 121 stitches on the pin; these 13
rows form the band, and now commence the pattern.
1st row.—Knit 1, knit 2 together, make 1, knit 1, make 1, knit 2
together; repeat at the end of the row, knit 1.
2d.—Make 1, knit 3 together, make 1, knit 1, make 1, knit 2
together; repeat, and end with knit 1.
3d.—Knit 1, knit 2 together, make 1, knit 1, make 1, knit 2 together;
repeat, and end with knit 1.
4th.—Knit 2 together *, make 1, knit 3, make 1, knit 3 together;
repeat from *, and end with knit 2 together.
5th.—Knit 1, make 1, knit 2 together, knit 1, knit 2 together, make 1;
repeat, and end with knit 1.
6th.—Knit 1, make 1, knit 2 together, make 1, knit 3 together, make
1; repeat, and end with knit 1.
7th.—Same as 5th.
8th.—Knit 2, make 1, knit 3 together, make 1, knit 1; repeat, at the
end, knit 1. Repeat this pattern 3 times more, then knit a row, knit
1, knit 2 together, and repeat to the end, which will bring the
manchette to the original 84 stitches; commence again at the 1st
row, and work the band and the pattern once more, then work the
band, and cast off; finish with the point lace edging working 9
scollops for each manchette, and trim with ribbon in each open
row of the band.
POINT LACE EDGING.
Taylor’s Crochet or Knitting Thread, No. 12; Pins No. 21, Bell
Gauge. Cast on 12 stitches.
1st row.—Knit 2, make 1, (knit 2 together twice), make 1, knit 3,
make 1, knit 3.
2d.—Make 1, knit 2 together, knit 1, make 1, knit 2 together, knit
1, knit 2 together, make 1, knit 3, make 1, knit 2 together.
3d.—Knit 2, make 1, knit 2 together, knit 1, make 1, knit 2
together, make 1, knit 3 together, make 1, knit 3.
4th.—Make 1, knit 2 together, knit 1, make 1, knit 1, make 1, knit
2, knit 2 together, make 1, knit 3, make 1, knit 2 together.
5th.—Knit 2, make 1, knit 2 together, knit 2, make 1, knit 3
together, make 1, knit 3, make 1, knit 3.
6th.—Make 1, knit 2 together, knit 1, make 1, knit 2 together, knit
1, knit 2 together, make 1, knit 1, make 1, knit 2 together, knit 3,
make 1, knit 2 together.
7th.—Knit 2, make 1, knit 2 together, knit 1, knit 2 together, make
1, knit 1, make 1, knit 2 together, make 1, knit 3 together, make
1, knit 3.
8th.—Make 1, knit 2 together, knit 1, make 1, knit 1, make 1, knit
2, knit 2 together, make 1, knit 1, make 1, knit 2 together, knit 3,
make 1, knit 2 together.
9th.—Knit 2, make 1, (knit 2 together twice), make 1, knit 3, make
1, knit 3 together, make 1, knit 3, make 1, knit 3.
10th.—Make 1, knit 2 together, knit 1, make 1, knit 2 together, knit
1, knit 2 together, make 1, knit 1, make 1, knit, 2 together, knit
1, knit 2 together, make 1, knit 3, make 1, knit 2 together.
11th.—Knit 2, make 1, knit 2 together, knit 1, make 1, knit 2
together, make 1, knit 3 together, make 1, knit 1, make 1, knit 2
together, make 1, knit 3 together, make 1, knit 3.
12th.—Make 1, knit 2 together, knit 1, make 1, knit 1, make 1, knit
2, knit 2 together, make 1, knit 1, make 1, knit 2 together, knit 1,
knit 2 together, make 1, knit 3, make 1, knit 2 together.
13th.—Knit 2, make 1, (knit, 2 together twice), make 1, knit 3
together, make 1, knit 3, make 1, knit 3 together, make 1, knit 3,
make 1, knit 3.
14th.—Make 1, knit 2 together, knit 1, make 1, knit 2 together, knit
1, knit 2 together, make 1, knit 1, make 1, knit 2 together, knit 1,
knit 2 together, make 1, knit 1, make 1, knit 2 together, knit 2,
make 1, knit 2 together.
15th.—Knit 2, make 1, (knit 2 together twice), make 1, knit 1,
make 1, knit 2 together, make 1, knit 3 together, make 1, knit 1,
make 1, knit 2 together, make 1, knit 3 together, make 1, knit 3.
16th.—Same as 14th.
17th.—Knit 2, make 1, knit 2 together, knit 1, make 1, knit 3, make
1, knit 3 together, make 1, knit 3, make 1, knit 3 together, make
1, knit 2 together, knit 2.
18th.—Make 1, knit 2 together, knit 1, knit 2 together, make 1, knit
2 together, knit 1, knit 2 together, make 1, knit 1, make 1, knit 2
together, knit 1, knit 2 together, make 1, knit 2 together, knit 1,
make 1, knit 2 together.
19th.—Knit 2, make 1, knit 2 together, make 1, knit 2, make 1, knit
3 together, make 1, knit 1, make 1, knit 2 together, make 1, knit
3 together, make 1, knit 2 together, knit 2.
20th.—Same as 10th.