You are on page 1of 883

Exploring Analytic Geometry

with Mathematica
R

LIMITED WARRANTY AND DISCLAIMER OF LIABILITY
ACADEMIC PRESS (“AP”) AND ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION OR
PRODUCTION OF THE ACCOMPANYING CODE (“THE PRODUCT”) CANNOT AND DO NOT WARRANT THE PERFORMANCE OR RESULTS THAT MAY BE OBTAINED BY USING THE PRODUCT.
THE PRODUCT IS SOLD “AS IS” WITHOUT WARRANTY OF ANY KIND (EXCEPT AS HEREAFTER
DESCRIBED), EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF PERFORMANCE OR ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE. AP WARRANTS ONLY THAT THE CD-ROM ON WHICH THE
CODE IS RECORDED IS FREE FROM DEFECTS IN MATERIAL AND FAULTY WORKMANSHIP UNDER THE NORMAL USE AND SERVICE FOR A PERIOD OF NINETY (90) DAYS FROM THE DATE
THE PRODUCT IS DELIVERED. THE PURCHASER’S SOLE AND EXCLUSIVE REMEDY IN THE
EVENT OF A DEFECT IS EXPRESSLY LIMITED TO EITHER REPLACEMENT OF THE CD-ROM
OR REFUND OF THE PURCHASE PRICE, AT AP’S SOLE DISCRETION.
IN NO EVENT, WHETHER AS A RESULT OF BREACH OF CONTRACT, WARRANTY, OR TORT
(INCLUDING NEGLIGENCE), WILL AP OR ANYONE WHO HAS BEEN INVOLVED IN THE CREATION OR PRODUCTION OF THE PRODUCT BE LIABLE TO PURCHASER FOR ANY DAMAGES,
INCLUDING ANY LOST PROFITS, LOST SAVINGS OR OTHER INCIDENTAL OR CONSEQUENTIAL
DAMAGES ARISING OUT OF THE USE OF INABILITY TO USE THE PRODUCT OR ANY MODIFICATIONS THEREOF, OR DUE TO THE CONTENTS OF THE CODE, EVEN IF AP HAS BEEN ADVISED
OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
Any request for replacement of a defective CD-ROM must be postage prepaid and must be accompanied by
the original defective CD-ROM, your mailing address and telephone number, and proof of date of purchase
and purchase price. Send such requests, stating the nature of the problem, to Academic Press Customer
Service, 6277 Sea Harbor Drive, Orlando, FL 32887, 1-800-321-5068. AP shall have no obligation to refund the
purchase price or to replace a CD-ROM based on claims of defects in the nature or operation of the Product.
Some states do not allow limitation on how long an implied warranty lasts, nor exclusions or limitations of
incidental or consequential damages, so the above limitations and exclusions may not apply to you. This
warranty gives you specific legal rights, and you may also have other rights which vary from jurisdiction to
jurisdiction.
THE RE-EXPORT OF UNITED STATES ORIGIN SOFTWARE IS SUBJECT TO UNITED STATES LAWS
UNDER THE EXPORT ADMINISTRATION ACT OF 1969 AS AMENDED. ANY FURTHER SALE OF
THE PRODUCT SHALL BE IN COMPLIANCE WITH THE UNITED STATES DEPARTMENT OF COMMERCE ADMINISTRATION REGULATIONS. COMPLIANCE WITH SUCH REGULATIONS IS YOUR
RESPONSIBILITY AND NOT THE RESPONSIBILITY OF AP.
Mathematica and MathReader are registered trademarks of Wolfram Research, Inc.
Acrobat Reader is a registered trademark of Adobe Systems, Inc.

Exploring Analytic Geometry
with Mathematica
R

Donald L. Vossler
BME, Kettering University, 1978
MM, Aquinas College, 1981

ACADEMIC PRESS
San Diego London Boston
New York Sydney Tokyo Toronto

Preface
The study of two-dimensional analytic geometry has gone in and out of fashion several times
over the past century, however this classic field of mathematics has once again become popular
due to the growing power of personal computers and the availability of powerful mathematical
software systems, such as Mathematica, that can provide an interactive environment for studying the field. By combining the power of Mathematica with an analytic geometry software
system called Descarta2D, the author has succeeded in meshing an ancient field of study with
modern computational tools, the result being a simple, yet powerful, approach to studying
analytic geometry. Students, engineers and mathematicians alike who are interested in analytic geometry can use this book and software for the study, research or just plain enjoyment
of analytic geometry.
Mathematica provides an attractive environment for studying analytic geometry. Mathematica supports both numeric and symbolic computations, meaning that geometry problems
can be solved numerically, producing approximate or exact answers, as well as producing general formulas with variables. Mathematica also has good facilities for producing graphical
plots which are useful for visualizing the graphs of two-dimensional geometry.

Features
Exploring Analytic Geometry with Mathematica, Mathematica and Descarta2D provide the
following outstanding features:
• The book can serve as classical analytic geometry textbook with in-line Mathematica
dialogs to illustrate key concepts.
• A large number of examples with solutions and graphics is keyed to the textual development of each topic.
• Hints are provided for improving the reader’s use and understanding of Mathematica
and Descarta2D.
• More advanced topics are covered in explorations provided with each chapter, and full
solutions are illustrated using Mathematica.

v

vi

Preface
• A detailed reference manual provides complete documentation for Descarta2D, with complete syntax for over 100 new commands.
• Complete source code for Descarta2D is provided in 30 well-documented Mathematica
notebooks.
• The complete book is integrated into the Mathematica Help Browser for easy access and
reading.
• A CD-ROM is included for convenient, permanent storage of the Descarta2D software.
• A complete software system and mathematical reference is packaged as an affordable
book.

Classical Analytic Geometry
Exploring Analytic Geometry with Mathematica begins with a traditional development of analytic geometry that has been modernized with in-line chapter dialogs using Descarta2D and
Mathematica to illustrate the underlying concepts. The following topics are covered in 21
chapters:
Coordinates • Points • Equations • Graphs • Lines • Line Segments • Circles • Arcs • Triangles • Parabolas • Ellipses • Hyperbolas • General Conics •
Conic Arcs • Medial Curves • Transformations • Arc Length • Area • Tangent Lines • Tangent Circles • Tangent Conics • Biarcs.
Each chapter begins with definitions of underlying mathematical terminology and develops
the topic with more detailed derivations and proofs of important concepts.

Explorations
Each chapter in Exploring Analytic Geometry with Mathematica concludes with more advanced
topics in the form of exploration problems to more fully develop the topics presented in each
chapter. There are more than 100 of these more challenging explorations, and the full solutions
are provided on the CD-ROM as Mathematica notebooks as well as printed in Part VIII of the
book. Sample explorations include some of the more famous theorems from analytic geometry:
Carlyle’s Circle • Castillon’s Problem • Euler’s Triangle Formula • Eyeball Theorem • Gergonne’s Point • Heron’s Formula • Inversion • Monge’s Theorem •
Reciprocal Polars • Reflection in a Point • Stewart’s Theorem • plus many more.

Preface

vii

Descarta2D
Descarta2D provides a full-scale Mathematica implementation of the concepts developed in
Exploring Analytic Geometry with Mathematica. A reference manual section explains in detail
the usage of over 100 new commands that are provided by Descarta2D for creating, manipulating and querying geometric objects in Mathematica. To support the study and enhancement
of the Descarta2D algorithms, the complete source code for Descarta2D is provided, both in
printed form in the book and as Mathematica notebook files on the CD-ROM.

CD-ROM
The CD-ROM provides the complete text of the book in Abode Portable Document Format
(PDF) for interactive reading. In addition, the CD-ROM provides the following Mathematica
notebooks:
• Chapters with Mathematica dialogs, 24 interactive notebooks
• Reference material for Descarta2D, three notebooks
• Complete Descarta2D source code, 30 notebooks
• Descarta2D packages, 30 loadable files
• Exploration solutions, 125 notebooks.
These notebooks have been thoroughly tested and are compatible with Mathematica Version
3.0.1 and Version 4.0. Maximum benefit of the book and software is gained by using it in
conjunction with Mathematica, but a passive reading and viewing of the book and notebook
files can be accomplished without using Mathematica itself.

Organization of the Book
Exploring Analytic Geometry with Mathematica is a 900-page volume divided into nine parts:
• Introduction (Getting Started and Descarta2D Tour)
• Elementary Geometry (Points, Lines, Circles, Arcs, Triangles)
• Conics (Parabolas, Ellipses, Hyperbolas, Conics, Medial Curves)
• Geometric Functions (Transformations, Arc Length, Area)
• Tangent Curves (Lines, Circles, Conics, Biarcs)
• Descarta2D Reference (philosophy and command descriptions)
• Descarta2D Packages (complete source code)

viii

Preface
• Explorations (solution notebooks)
• Epilogue (Installation Instructions, Bibliography and a detailed index).

About the Author
Donald L. Vossler is a mechanical engineer and computer software designer with more than
20 years experience in computer aided design and geometric modeling. He has been involved
in solid modeling since its inception in the early 1980’s and has contributed to the theoretical
foundation of the subject through several published papers. He has managed the development
of a number of commercial computer aided design systems and holds a US Patent involving
the underlying data representations of geometric models.

Contents
I

Introduction

1

1 Getting Started
1.1 Introduction . . . . . . .
1.2 Historical Background .
1.3 What’s on the CD-ROM
1.4 Mathematica . . . . . .
1.5 Starting Descarta2D . .
1.6 Outline of the Book . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

3
3
3
4
5
6
7

2 Descarta2D Tour
2.1 Points . . . . . . . .
2.2 Equations . . . . . .
2.3 Lines . . . . . . . . .
2.4 Line Segments . . .
2.5 Circles . . . . . . . .
2.6 Arcs . . . . . . . . .
2.7 Triangles . . . . . .
2.8 Parabolas . . . . . .
2.9 Ellipses . . . . . . .
2.10 Hyperbolas . . . . .
2.11 Transformations . .
2.12 Area and Arc Length
2.13 Tangent Curves . . .
2.14 Symbolic Proofs . .
2.15 Next Steps . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

9
9
10
12
13
14
15
16
17
18
19
20
20
21
22
23

II

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

Elementary Geometry

25

3 Coordinates and Points
27
3.1 Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.2 Rectangular Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

ix

x

Contents
3.3
3.4
3.5
3.6
3.7

Line Segments and Distance . .
Midpoint between Two Points .
Point of Division of Two Points
Collinear Points . . . . . . . . .
Explorations . . . . . . . . . .

4 Equations and Graphs
4.1 Variables and Functions
4.2 Polynomials . . . . . . .
4.3 Equations . . . . . . . .
4.4 Solving Equations . . .
4.5 Graphs . . . . . . . . . .
4.6 Parametric Equations .
4.7 Explorations . . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

30
33
33
36
37

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

39
. 39
. 39
. 41
. 42
. 46
. 47
. 48

5 Lines and Line Segments
5.1 General Equation . . . . . . . . . . .
5.2 Parallel and Perpendicular Lines . .
5.3 Angle between Lines . . . . . . . . .
5.4 Two–Point Form . . . . . . . . . . .
5.5 Point–Slope Form . . . . . . . . . . .
5.6 Slope–Intercept Form . . . . . . . .
5.7 Intercept Form . . . . . . . . . . . .
5.8 Normal Form . . . . . . . . . . . . .
5.9 Intersection Point of Two Lines . . .
5.10 Point Projected Onto a Line . . . . .
5.11 Line Perpendicular to Line Segment
5.12 Angle Bisector Lines . . . . . . . . .
5.13 Concurrent Lines . . . . . . . . . . .
5.14 Pencils of Lines . . . . . . . . . . . .
5.15 Parametric Equations . . . . . . . .
5.16 Explorations . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

51
51
54
55
56
58
62
64
65
69
70
72
73
74
75
78
81

6 Circles
6.1 Definitions and Standard Equation
6.2 General Equation of a Circle . . .
6.3 Circle from Diameter . . . . . . . .
6.4 Circle Through Three Points . . .
6.5 Intersection of a Line and a Circle
6.6 Intersection of Two Circles . . . .
6.7 Distance from a Point to a Circle .
6.8 Coaxial Circles . . . . . . . . . . .
6.9 Radical Axis . . . . . . . . . . . .
6.10 Parametric Equations . . . . . . .

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

85
85
88
89
90
91
92
95
96
97
99

.
.
.
.
.
.
.
.
.
.

Contents

xi

6.11 Explorations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
7 Arcs
7.1 Definitions . . . . . . . . . . . . .
7.2 Bulge Factor Arc . . . . . . . . .
7.3 Three–Point Arc . . . . . . . . .
7.4 Parametric Equations . . . . . .
7.5 Points and Angles at Parameters
7.6 Arcs from Ray Points . . . . . .
7.7 Explorations . . . . . . . . . . .
8 Triangles
8.1 Definitions . . . . . . .
8.2 Centroid of a Triangle
8.3 Circumscribed Circle .
8.4 Inscribed Circle . . . .
8.5 Solving Triangles . . .
8.6 Cevian Lengths . . . .
8.7 Explorations . . . . .

III

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

117
. 117
. 120
. 122
. 123
. 124
. 128
. 128

Conics

9 Parabolas
9.1 Definitions . . . . . . . . . . . . . .
9.2 General Equation of a Parabola . .
9.3 Standard Forms of a Parabola . . .
9.4 Reduction to Standard Form . . .
9.5 Parabola from Focus and Directrix
9.6 Parametric Equations . . . . . . .
9.7 Explorations . . . . . . . . . . . .

105
105
107
110
111
112
113
114

.
.
.
.
.
.
.

133
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

135
. 135
. 135
. 136
. 139
. 140
. 141
. 142

10 Ellipses
10.1 Definitions . . . . . . . . . . . . . . . .
10.2 General Equation of an Ellipse . . . .
10.3 Standard Forms of an Ellipse . . . . .
10.4 Reduction to Standard Form . . . . .
10.5 Ellipse from Vertices and Eccentricity
10.6 Ellipse from Foci and Eccentricity . .
10.7 Ellipse from Focus and Directrix . . .
10.8 Parametric Equations . . . . . . . . .
10.9 Explorations . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

145
145
147
147
150
151
153
153
155
156

xii

Contents

11 Hyperbolas
11.1 Definitions . . . . . . . . . . . . . . . . . .
11.2 General Equation of a Hyperbola . . . . .
11.3 Standard Forms of a Hyperbola . . . . . .
11.4 Reduction to Standard Form . . . . . . .
11.5 Hyperbola from Vertices and Eccentricity
11.6 Hyperbola from Foci and Eccentricity . .
11.7 Hyperbola from Focus and Directrix . . .
11.8 Parametric Equations . . . . . . . . . . .
11.9 Explorations . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

159
159
161
161
166
167
168
169
170
173

12 General Conics
12.1 Conic from Quadratic Equation . . . . .
12.2 Classification of Conics . . . . . . . . . .
12.3 Center Point of a Conic . . . . . . . . .
12.4 Conic from Point, Line and Eccentricity
12.5 Common Vertex Equation . . . . . . . .
12.6 Conic Intersections . . . . . . . . . . . .
12.7 Explorations . . . . . . . . . . . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

175
175
184
184
185
186
189
190

13 Conic Arcs
13.1 Definition of a Conic Arc
13.2 Equation of a Conic Arc .
13.3 Projective Discriminant .
13.4 Conic Characteristics . . .
13.5 Parametric Equations . .
13.6 Explorations . . . . . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

193
193
194
196
196
198
199

14 Medial Curves
14.1 Point–Point .
14.2 Point–Line . .
14.3 Point–Circle .
14.4 Line–Line . .
14.5 Line–Circle .
14.6 Circle–Circle
14.7 Explorations

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

201
201
202
204
206
207
210
212

IV

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

Geometric Functions

215

15 Transformations
217
15.1 Translations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
15.2 Rotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
15.3 Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

Contents

xiii

15.4 Reflections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
15.5 Explorations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
16 Arc
16.1
16.2
16.3
16.4
16.5
16.6
16.7
16.8
16.9

Length
Lines and Line Segments . . . . . .
Perimeter of a Triangle . . . . . . .
Polygons Approximating Curves .
Circles and Arcs . . . . . . . . . .
Ellipses and Hyperbolas . . . . . .
Parabolas . . . . . . . . . . . . . .
Chord Parameters . . . . . . . . .
Summary of Arc Length Functions
Explorations . . . . . . . . . . . .

17 Area
17.1 Areas of Geometric Figures
17.2 Curved Areas . . . . . . . .
17.3 Circular Areas . . . . . . .
17.4 Elliptic Areas . . . . . . . .
17.5 Hyperbolic Areas . . . . . .
17.6 Parabolic Areas . . . . . . .
17.7 Conic Arc Area . . . . . . .
17.8 Summary of Area Functions
17.9 Explorations . . . . . . . .

V

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

229
229
230
231
231
233
234
235
236
236

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

237
237
240
240
242
245
246
248
249
249

Tangent Curves

18 Tangent Lines
18.1 Lines Tangent
18.2 Lines Tangent
18.3 Lines Tangent
18.4 Explorations

253
.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

255
255
266
273
280

19 Tangent Circles
19.1 Tangent Object, Center Point . . . . . . . .
19.2 Tangent Object, Center on Object, Radius .
19.3 Two Tangent Objects, Center on Object . .
19.4 Two Tangent Objects, Radius . . . . . . . .
19.5 Three Tangent Objects . . . . . . . . . . . .
19.6 Explorations . . . . . . . . . . . . . . . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

283
283
285
286
287
288
289

to a Circle . . . . .
to Conics . . . . . .
to Standard Conics
. . . . . . . . . . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

xiv

Contents

20 Tangent Conics
20.1 Constraint Equations . . . . . . .
20.2 Systems of Quadratics . . . . . .
20.3 Validity Conditions . . . . . . . .
20.4 Five Points . . . . . . . . . . . .
20.5 Four Points, One Tangent Line .
20.6 Three Points, Two Tangent Lines
20.7 Conics by Reciprocal Polars . . .
20.8 Explorations . . . . . . . . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

293
293
294
296
296
298
301
306
310

21 Biarcs
21.1 Biarc Carrier Circles . . . . .
21.2 Knot Point . . . . . . . . . .
21.3 Knot Circles . . . . . . . . . .
21.4 Biarc Programming Examples
21.5 Explorations . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

311
311
314
316
317
322

VI

.
.
.
.
.

.
.
.
.
.

Reference

323

22 Technical Notes
22.1 Computation Levels . . . .
22.2 Names . . . . . . . . . . . .
22.3 Descarta2D Objects . . . .
22.4 Descarta2D Packages . . . .
22.5 Descarta2D Functions . . .
22.6 Descarta2D Documentation

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

325
325
326
326
337
338
339

23 Command Browser

341

24 Error Messages

367

VII

Packages

D2DArc2D . . . . .
D2DArcLength2D .
D2DArea2D . . . .
D2DCircle2D . . .
D2DConic2D . . . .
D2DConicArc2D . .
D2DEllipse2D . .
D2DEquations2D .
D2DExpressions2D
D2DGeometry2D . .

385
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

387
395
399
405
411
415
421
427
429
437

Contents
D2DHyperbola2D . . .
D2DIntersect2D . . .
D2DLine2D . . . . . .
D2DLoci2D . . . . . .
D2DMaster2D . . . . .
D2DMedial2D . . . . .
D2DNumbers2D . . . .
D2DParabola2D . . . .
D2DPencil2D . . . . .
D2DPoint2D . . . . . .
D2DQuadratic2D . . .
D2DSegment2D . . . .
D2DSketch2D . . . . .
D2DSolve2D . . . . . .
D2DTangentCircles2D
D2DTangentConics2D
D2DTangentLines2D .
D2DTangentPoints2D
D2DTransform2D . . .
D2DTriangle2D . . . .

xv
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

apollon.nb, Circle of Apollonius . . . . . . . . . . . . . . .
arccent.nb, Centroid of Semicircular Arc . . . . . . . . . .
arcentry.nb, Arc from Bounding Points and Entry Direction
arcexit.nb, Arc from Bounding Points and Exit Direction .
archimed.nb, Archimedes’ Circles . . . . . . . . . . . . . . .
arcmidpt.nb, Midpoint of an Arc . . . . . . . . . . . . . . .
caarclen.nb, Arc Length of a Parabolic Conic Arc . . . . . .
caarea1.nb, Area of a Conic Arc (General) . . . . . . . . .
caarea2.nb, Area of a Conic Arc (Parabola) . . . . . . . . .
cacenter.nb, Center of a Conic Arc . . . . . . . . . . . . . .
cacircle.nb, Circular Conic Arc . . . . . . . . . . . . . . . .
camedian.nb, Shoulder Point on Median . . . . . . . . . . . .
caparam.nb, Parametric Equations of a Conic Arc . . . . .
carlyle.nb, Carlyle Circle . . . . . . . . . . . . . . . . . . .
castill.nb, Castillon’s Problem . . . . . . . . . . . . . . .
catnln.nb, Tangent Line at Shoulder Point . . . . . . . . .
center.nb, Center of a Quadratic . . . . . . . . . . . . . .
chdlen.nb, Chord Length of Intersecting Circles . . . . . .
cir3pts.nb, Circle Through Three Points . . . . . . . . . .
circarea.nb, One-Third of a Circle’s Area . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

VIII

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

Explorations

445
453
457
465
469
473
477
479
485
489
497
505
511
515
519
523
531
537
539
545

555
557
559
561
563
565
567
569
571
573
575
577
579
581
583
585
589
591
593
595
597

xvi

Contents
cirptmid.nb, Circle–Point Midpoint Theorem . . . . . . . .
cramer2.nb, Cramer’s Rule (Two Equations) . . . . . . . .
cramer3.nb, Cramer’s Rule (Three Equations) . . . . . . .
deter.nb,
Determinants . . . . . . . . . . . . . . . . . . .
elfocdir.nb, Focus of Ellipse is Pole of Directrix . . . . . .
elimlin.nb, Eliminate Linear Terms . . . . . . . . . . . . .
elimxy1.nb, Eliminate Cross-Term by Rotation . . . . . . .
elimxy2.nb, Eliminate Cross-Term by Change in Variables
elimxy3.nb, Eliminate Cross-Term by Change in Variables
elldist.nb, Ellipse Locus, Distance from Two Lines . . . .
ellfd.nb,
Ellipse from Focus and Directrix . . . . . . . .
ellips2a.nb, Sum of Focal Distances of an Ellipse . . . . . .
elllen.nb, Length of Ellipse Focal Chord . . . . . . . . .
ellrad.nb, Apoapsis and Periapsis of an Ellipse . . . . . .
ellsim.nb, Similar Ellipses . . . . . . . . . . . . . . . . . .
ellslp.nb, Tangent to an Ellipse with Slope . . . . . . . .
eqarea.nb, Equal Areas Point . . . . . . . . . . . . . . . .
eyeball.nb, Eyeball Theorem . . . . . . . . . . . . . . . . .
gergonne.nb, Gergonne Point of a Triangle . . . . . . . . . .
heron.nb,
Heron’s Formula . . . . . . . . . . . . . . . . .
hyp2a.nb,
Focal Distances of a Hyperbola . . . . . . . . .
hyp4pts.nb, Equilateral Hyperbolas . . . . . . . . . . . . .
hyparea.nb, Areas Related to Hyperbolas . . . . . . . . . .
hypeccen.nb, Eccentricities of Conjugate Hyperbolas . . . .
hypfd.nb,
Hyperbola from Focus and Directrix . . . . . .
hypinv.nb, Rectangular Hyperbola Distances . . . . . . .
hyplen.nb, Length of Hyperbola Focal Chord . . . . . . .
hypslp.nb, Tangent to a Hyperbola with Given Slope . . .
hyptrig.nb, Trigonometric Parametric Equations . . . . . .
intrsct.nb, Intersection of Lines in Intercept Form . . . . .
inverse.nb, Inversion . . . . . . . . . . . . . . . . . . . . .
johnson.nb, Johnson’s Congruent Circle Theorem . . . . .
knotin.nb, Incenter on Knot Circle . . . . . . . . . . . . .
lndet.nb,
Line General Equation Determinant . . . . . .
lndist.nb, Vertical/Horizontal Distance to a Line . . . . .
lnlndist.nb, Line Segment Cut by Two Lines . . . . . . . .
lnquad.nb, Line Normal to a Quadratic . . . . . . . . . . .
lnsdst.nb, Distance Between Parallel Lines . . . . . . . .
lnsegint.nb, Intersection Parameters of Two Line Segments
lnsegpt.nb, Intersection Point of Two Line Segments . . .
lnsperp.nb, Equations of Perpendicular Lines . . . . . . . .
lntancir.nb, Line Tangent to a Circle . . . . . . . . . . . . .
lntancon.nb, Line Tangent to a Conic . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

599
601
603
605
607
609
611
613
615
617
619
623
625
627
629
631
633
637
639
641
643
645
647
651
653
657
659
661
663
665
667
671
675
677
679
681
685
687
689
691
693
695
697

Contents
mdcircir.nb, Medial Curve, Circle–Circle . . . . . . . . .
mdlncir.nb, Medial Curve, Line–Circle . . . . . . . . . .
mdlnln.nb, Medial Curve, Line–Line . . . . . . . . . .
mdptcir.nb, Medial Curve, Point–Circle . . . . . . . . .
mdptln.nb, Medial Curve, Point–Line . . . . . . . . . .
mdptpt.nb, Medial Curve, Point–Point . . . . . . . . .
mdtype.nb, Medial Curve Type . . . . . . . . . . . . .
monge.nb,
Monge’s Theorem . . . . . . . . . . . . . .
narclen.nb, Approximate Arc Length of a Curve . . . .
normal.nb, Normals and Minimum Distance . . . . . .
pb3pts.nb, Parabola Through Three Points . . . . . .
pb4pts.nb, Parabola Through Four Points . . . . . . .
pbang.nb,
Parabola Intersection Angle . . . . . . . . .
pbarch.nb, Parabolic Arch . . . . . . . . . . . . . . . .
pbarclen.nb, Arc Length of a Parabola . . . . . . . . . .
pbdet.nb,
Parabola Determinant . . . . . . . . . . . .
pbfocchd.nb, Length of Parabola Focal Chord . . . . . .
pbslp.nb,
Tangent to a Parabola with a Given Slope .
pbtancir.nb, Circle Tangent to a Parabola . . . . . . . .
pbtnlns.nb, Perpendicular Tangents to a Parabola . . .
polarcir.nb, Polar Equation of a Circle . . . . . . . . . .
polarcol.nb, Collinear Polar Coordinates . . . . . . . . .
polarcon.nb, Polar Equation of a Conic . . . . . . . . . .
polardis.nb, Distance Using Polar Coordinates . . . . .
polarell.nb, Polar Equation of an Ellipse . . . . . . . .
polareqn.nb, Polar Equations . . . . . . . . . . . . . . .
polarhyp.nb, Polar Equation of a Hyperbola . . . . . . .
polarpb.nb, Polar Equation of a Parabola . . . . . . . .
polarunq.nb, Non-uniqueness of Polar Coordinates . . .
pquad.nb,
Parameterization of a Quadratic . . . . . .
ptscol.nb, Collinear Points . . . . . . . . . . . . . . .
radaxis.nb, Radical Axis of Two Circles . . . . . . . . .
radcntr.nb, Radical Center . . . . . . . . . . . . . . . .
raratio.nb, Radical Axis Ratio . . . . . . . . . . . . . .
reccir.nb, Reciprocal of a Circle . . . . . . . . . . . .
recptln.nb, Reciprocals of Points and Lines . . . . . . .
recquad.nb, Reciprocal of a Quadratic . . . . . . . . . .
reflctpt.nb, Reflection in a Point . . . . . . . . . . . . .
rtangcir.nb, Angle Inscribed in a Semicircle . . . . . . .
rttricir.nb, Circle Inscribed in a Right Triangle . . . .
shoulder.nb, Coordinates of Shoulder Point . . . . . . .
stewart.nb, Stewart’s Theorem . . . . . . . . . . . . . .
tancir1.nb, Circle Tangent to Circle, Given Center . . .

xvii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

699
703
705
707
711
713
715
717
719
721
723
725
727
729
731
733
735
737
739
743
745
747
749
751
753
755
757
759
761
763
765
767
769
771
773
775
777
779
781
783
785
787
789

. triarea. .nb. . . . . . . . . . . . . . . . . . . . . . . . . . . . . triarlns. . . . . . . Triangle Altitude Length . . .nb. . . . . . . . . . . . . . . . . . . . tridist. . . . . . . . . . . . . trieuler. . . . . . . . . . . .nb. . . .nb. . . . . Triangle Side Lengths from Altitudes . . . Construction of Two Related Circles .nb. . . . . . . Area of Triangle Bounded by Lines . . . . . tancirpt. . . . . . . Hypotenuse Midpoint Distance . . Altitude of a Triangle . . . . . Triangle Radii . . . . . . . . . . Circle Through Two Points. . . . . . . . . . . . . . . . . tnlncir. . . . . . . . . . . . . . . . . . . . . . . .nb. . . . . . . . . . . . . . . . . . . . Area of a Tetrahedron’s Base . . . . . tancir5. . Center on Circle. . . . . . tetra. . . . . . . . . . .nb. . . . tricent. . . . . tncirtri. .nb.nb. . . . . . . . . . . . . Radius . . . . . . . . Circle Tangent to Two Lines. . . triconn. . .nb. . . . . . . . . . . . .nb. . . . . . . . . IX Epilogue . . . . . . . . Circle Tangent to Circle. . . . . . . . . . . Center on Circle . . . . . . . . . . 791 793 795 797 799 801 803 807 809 811 813 815 817 819 823 827 829 833 835 837 Installation Instructions 839 Bibliography 843 Index 845 . . . trialt. . . . . . . . . . . . .nb. . . . . . . Concurrent Triangle Altitudes . . . . tricev. . Euler’s Triangle Formula . . . . . . Radius tancir3. . . . . . . . . Tangency Point on a Circle . . trirad. .nb. . . . . . triallen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .nb. . .nb.xviii Contents tancir2. . . . . tancir4. . . . . . . . . . . . . . . . . . . . Triangle Cevian Lengths . . trisides. . .nb. Circle Tangent to Three Lines .nb. .nb. . . .nb. . . . Area of Triangle Configurations . Circles Tangent to an Isosceles Triangle . Centroid of a Triangle . . . . . . . . . . .

Part I Introduction .

.

By providing the full source code for the Descarta2D system.1 Introduction The purpose of this book is to provide a broad introduction to analytic geometry using the Mathematica and Descarta2D computer programs to enhance the numerical.2 Historical Background The word geometry is derived from the Greek words for “earth measure. analytic or coordinate geometry is often referred to as Cartesian geometry. Due to the nature of the Mathematica environment in which Descarta2D was written. angles and other planar figures. after his name. modular packaging and good overall system design. It is essentially a method of studying geometry by means of algebra. nor included in mathematical handbooks. • To provide a large-scale Mathematica programming tutorial that is instructive in the techniques of object oriented programming. 1. Analytic geometry was introduced by Ren´e Descartes in his La G´eom´etrie published in 1637.” Early geometers considered measurements of line segments. The book has the following objectives: • To provide a computer-based alternative to a traditional course in analytic geometry. Accordingly.Chapter 1 Getting Started 1. • To provide a geometric research tool that can be used to explore numerically and symbolically various theorems and relationships of two-dimensional analytic geometry. Earlier mathematicians had 3 . symbolic and graphical nature of the subject. • To provide a reference of geometric formulas from analytic geometry that are not generally provided in more broad-based mathematical textbooks. the system can be easily enhanced and extended. students and researchers can modify and enhance the system for their own purposes.

pdf files) and the folder MathReader contains Wolfram Research’s MathReader (used to view *. There are four folders at the highest directory level on the CD. Mathematica provides a programmable environment.installation files Figure 1. 1. The correct placement of these files on your computer’s hard drive is described in the “Installation Instructions” chapter.txt on the CD contains essentially the same information as the “Installation Instructions” chapter. which is essentially an extension of the capabilities of Mathematica cast into the world of analytic geometry.2.3 What’s on the CD-ROM The CD-ROM supplied with this book is organized as shown in Figure 1. The folder Descarta2D contains the software described in this book as shown in Figure 1. such as Mathematica. The file readme. The tremendous advances made in the study of geometry since the time of Descartes are largely due to his introduction of the coordinate system and the associated algebraic or analytic methods. The folder AcrobatReader contains Adobe’s Acrobat Reader (used to view *. This notion of expandability serves as the basis for the implementation of the Descarta2D system. These files are organized so that they can easily be installed for usage by Mathematica. allowing comfortable exploration of the subject even by amateur mathematicians. continued to resort to the conventional methods of geometric reasoning as set forth in great detail by Euclid and his school some 2000 years before.* .Descarta2D files MathReader . Detailed instructions for installing the software can be found in the chapter entitled “Installation Instructions” near the end of the book.installation files Book .nb files). The folder Book contains a complete copy of the book in Adobe Portable Document Format (PFD). meaning that the user can extend and expand the capabilities of the system including the addition of completely new concepts not covered by the kernel Mathematica system. txt AcrobatReader. . With the advent of powerful mathematical computer software. much of the tedious algebraic manipulation has been removed from the study of analytic geometry.1: Organization of the CD-ROM.1.4 Chapter 1 Getting Started CD readme . pdf files Descarta2D .

m. Due to the portability of Mathematica.* . nb files Figure 1. init .4 Mathematica In this book an assumption is made that you have at least a rudimentary understanding of how to run the Mathematica program. m Table_of_Contents.0. See Wolfram’s Mathematica book for more detailed descriptions of the syntax.0 of the Windows NT operating system and Mathematica version 3. The Adobe pdf files on the CD are also portable and should be readable on a variety of operating systems. A sufficient introduction to Mathematica would be gained by reading the “Tour of Mathematica” in Stephen Wolfram’s book Mathematica: A System for Doing Mathematics by Computer.1. nb Explorations . Macintoshes and a wide range of Unix workstations. and how to arrange files on a computer disk so that programs can locate them.* . nb Chapters . 1.* . how to enter commands and receive results.Descarta2D files Documentation English BrowserCategories. m . nb files Packages .2: Organization of the Descarta2D folder.1.4 Mathematica 5 Descarta2D warranty. Once you become familiar with Mathematica you will begin to appreciate the consistency and predictability of the system. Since Descarta2D is implemented in the Mathematica programming language it follows all the syntactic conventions of the Mathematica system. the software should operate identically on other computer systems. The syntax Mathematica uses for mathematical operations differs somewhat from traditional mathematical notation. . All of the software packages and explorations in this book were developed on a Pentium Pro computer system using version 4. txt * . including other Intel-based personal computers.

In order to avoid loading all the packages at one time. You must load this file at the beginning of any Mathematica session that will make use of the Descarta2D packages. Depending on the speed of your computer this may take a few seconds or several minutes. Once you become more familiar with Mathematica and Descarta2D. At the end of each chapter a section entitled “Explorations” provides more realistic applications of Descarta2D. There are also specialized commands such as ImplicitPlot and PolarPlot. All of the examples in this book were generated by running an actual copy of Mathematica version 3. Plot and ParametricPlot. This will insure that you obtain the same results as printed in the text. you may notice a delay in computing results. rather than to correspond to significant calculations in analytic geometry. These Mathematica commands can also be used to plot Descarta2D objects. giving the user detailed control over the plotted output. all of the additional packages will be loaded automatically when they are needed.1. so very little typing is required to replicate the output and plots in each chapter. Sketch2D. and then the declarations will be loaded. After the initial start-up. If you choose to enter the commands yourself instead of using the notebook on the CD. The examples in this book that illustrate the usage of Descarta2D were chosen primarily for their simplicity. and. the figures found in this book were generated using the Mathematica plotting commands named above. However. you will learn what deviations from the printed text are acceptable. Plotting Descarta2D Objects Graphically rendering (plotting) the geometric objects encountered in a study of analytic geometry greatly enhances the intuitive understanding of the subject. Descarta2D consists of a number of Mathematica programs (called packages) that provide a rich environment for the study of analytic geometry. The interactive dialogs of each Mathematica session are provided in the corresponding chapter notebook on the CD. in fact. Mathematica provides a wide variety of commands for plotting objects including Graphics. you should enter the commands exactly as they are printed (including all spaces and line breaks). When a package is first loaded.5 Chapter 1 Getting Started Starting Descarta2D All of the underlying concepts of analytic geometry presented in this book are implemented in a Mathematica program called Descarta2D.0. a master file of package declarations has been provided. the Mathematica kernel will be loaded first. results are computed immediately and the time taken depends on the complexity of the computation. . Once the package declarations have been loaded.6 1. The Sketch2D command has a very simple syntax as illustrated in the following example. To load the Descarta2D package declarations from the file init. packages will load at automatically as new Descarta2D functions are used for the first time. the Descarta2D system provides another command. for plotting Descarta2D objects. after the package is loaded. Each of these commands has a wide variety of options.m use the command In[1]: << Descarta2D‘ If this is the first command in the Mathematica session.

parabolas. ellipses and hyperbolas. 2]. 0<. . In[2]: Sketch2D@8Point2D@8−1. equations and graphs. The Descarta2D function Sketch2D[objList] plots a list of geometric objects. a line and a circle. Part I of the book serves as an introduction and begins with the material in this chapter aimed at getting started with the subject. the next chapter continues the introduction by providing a high-level tour of Descarta2D.) Solution. scaling and reflection) and the computation of areas and arc lengths. arcs and triangles.1. 2D<D. −3. Part II introduces the basic geometric objects studied in analytic geometry. Part III continues by studying second-degree curves. Part IV covers geometric functions including transformations (translation.6 -2 0 2 4 Outline of the Book The book is divided into nine sections. 1] and Circle2D[{1. -3. lines. The final chapter in Part V is an overview of biarc circles. including points and coordinates. the remaining sections provide a reference manual for the use of the Descarta2D computer program and a listing of the source code for the packages that implement Descarta2D. The subject of tangent curves is covered in Part V with specific chapters dedicated to tangent lines. The first five sections deal with the subject matter of analytic geometry. as well as the solutions to the explorations. (The meaning of these geometric objects will be explained in subsequent chapters. Plot these objects using the Sketch2D command: Point2D[{-1. rotation. 1D. In addition. conic arcs and medial curves. which are a special form of tangent circles. line segments. 2}]. Part III provides a more general study of conic curves by examining general conics. Line2D[2. tangent circles and tangent conics. 0}.6 Outline of the Book 7 Example. Circle2D@81. The intent of this chapter is to illustrate how new capabilities can be added to Descarta2D. Line2D@2. circles. for now it is sufficient to understand that we are plotting a point. 3 2 1 0 -1 -2 -4 1. 2<D.

Part VII provides a complete listing. of all the packages comprising Descarta2D. Parts VI and VII serve as a reference manual for the Descarta2D system. Each chapter ends with an “Explorations” section containing several more challenging problems in analytic geometry. The reference manual includes a description of the geometric objects provided by Descarta2D.8 Chapter 1 Getting Started Generally. The solutions for the explorations are provided as Mathematica notebooks on the CD. . a browser for quickly finding command syntax and options. Part IX contains the instructions for installing Descarta2D on your computer system as well as a Bibliography and a detailed index. Part VIII of the book contains reproductions of the notebooks which provide the solutions to the explorations found at the end of each chapter. as well as being listed alphabetically in Part VIII. with comments. The exploration notebook files may also be reviewed directly off the CD using Mathematica or MathReader. the chapters comprising Parts I through V present material in sections with simple examples. The examples are sometimes supplemented with Descarta2D and Mathematica Hints that illustrate the more subtle usages of the commands. The notebooks are listed in alphabetical order by their file names. and a listing of the error messages that may be generated.

y}]. 2. In Mathematica and Descarta2D point coordinates are enclosed in curly braces as {x. Point2D@8−2.and y-coordinates of the point and is written as (x. −4) and (−2. −4<D. The tour is not intended to be a complete overview of Descarta2D. y). 3 2 1 0 -1 -2 -3 -4 -2 -1 0 1 2 3 Mathematica allows us to assign symbolic names to expressions. The commands 9 .1 Points The simplest geometric object is a point in the plane. In Descarta2D a point with coordinates (x. y) is represented as Point2D[{x. The following commands are used to plot the points (1. 3<D<D. (3. but just a sampling of a few of the capabilities provided by Descarta2D. 2). y}.Chapter 2 Descarta2D Tour The purpose of this chapter is to provide a tour consisting of examples to show a few of the things Descarta2D can do. Concepts introduced informally in this chapter will be studied in detail in subsequent chapters. 2<D. 3): In[1]: Sketch2D@8Point2D@81. Point2D@83. The location of a point is specified by a pair of numbers called the x.

that is the midpoint of two other points named p1 and p2.10 Chapter 2 Descarta2D Tour In[2]: p1 = Point2D@81. . to represent Ÿ Mathematica the equality in an equation. −4<D. 2<D. Point2D@8−2. Equations are represented in Mathematica and Descarta2D in a manner that is very similar to standard algebra. These commands have the name Point2D followed by a sequence of arguments. 2<D. 2. There are two fundamental problems studied in analytic geometry: (1) given the equation of a curve determine its shape. and (2) given a description of the plot of a curve (its locus) determine the equation of the curve. the linear equation 2x + 3y − 4 = 0 is entered using the following command: In[5]: Clear@x. p3< Out[3] 8Point2D@81. named p3. − €€€€€ =E constructs a point. −2<D. p2 and p3 to the points sketched previously. After a name is assigned. the single equals sign. assign the names p1. 3<D< Descarta2D provides numerous commands for constructing points. The left side of the equation above is called a linear polynomial in two unknowns. is used to assign names. 2 ∗ x + 3 ∗ y − 4 == 0 Out[5] −4 + 2 x + 3 y == 0 Hint. we can refer to the object by using its name. Mathematica uses the double equals sign. =. 1<DD 1 2 1 2 Out[4] Point2DA9− €€€€€ . the command In[4]: p3 = Point2D@p1 = Point2D@8−3. separated by commas and enclosed in square brackets. Also. 3<D. For example. yD. ==. For example. notice that Mathematica sorts all output into a standard order that may be different than the order you typed. Point2D@83. as has already been shown. In[3]: 8p1. The general form of a linear polynomial in two unknowns is given by Ax + By + C. p2 = Point2D@83. p2. p3 = Point2D@8−2. −4<D. location and other geometric characteristics. p2 = Point2D@82.2 Equations The underlying principle of analytic geometry is to link algebra to the study of geometry.

the Solve command can be used to find the solutions to the equation given above. The algebraic form of a quadratic equation is Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0. −3D Equations are often constructed so that they may be solved for numbers that make the equality true. C] where A is the coefficient of the x term. hyperbolas and parabolas. 3. 8x. Mathematica provides powerful functions for solving equations. In[10]: Polynomial2D@q1. l1 = Line2D@2. −5. xD Out[12] 88x → 2<. 3. In[6]: Clear@x. −4. the quadratic equation in one unknown. 3.2 Equations 11 Since linear polynomials occur frequently in the study of analytic geometry. y<D Out[7] −4 + 2 x + 3 y In[8]: Line2D@poly1. In[7]: Polynomial2D@l1. F] and functions for converting between polynomials and Quadratic2D objects. B. B the coefficient of the y term and C is the constant term.2. We will often need to solve equations in order find the solutions to geometric problems. x2 − 7x + 10 = 0 is solved when x = 2 or x = 5. poly1 = 2 ∗ x + 3 ∗ y − 4. C. y<D Out[8] Line2D@2. Descarta2D provides a special form for representing a quadratic polynomial which is Quadratic2D[A. For example. 8x. yD. 8x. 3. −4D. 3. D. Descarta2D provides a special format for linear polynomials which is of the form Line2D[A. 3. In[12]: Clear@xD. 8x → 5<< The Solve command returns solutions in the form of Mathematica rules which are useful in subsequent computations. y<D Out[10] −3 − 4 x + 2 x2 − 5 y + 3 x y + 3 y2 In[11]: Quadratic2D@poly1. Descarta2D also provides functions for converting between linear polynomials and Line2D objects. yD. For example. 8x. −5. −4D Frequently we will also be interested in quadratic equations which represent such curves as circles. In[9]: Clear@x. poly1 = 2 ∗ x ^ 2 + 3 ∗ x ∗ y + 3 ∗ y ^ 2 − 4 ∗ x − 5 ∗ y − 3. −3D. B. q1 = Quadratic2D@2. Solve@x ^ 2 − 7 ∗ x + 10 == 0. E. −4. y<D Out[11] Quadratic2D@2. . ellipses.

463648 radians. . We often think of a line as the shortest path connecting two points. 2 1 0 -1 -4 -2 0 2 4 We might be interested in the angle a line makes measured from the horizontal. -2. Dividing an angle in radians by Degree converts the angle from radians to degrees. For example.463648.2958 degrees). in Descarta2D the line x − 2y + 4 = 0 is represented as Line2D[1. B and C are called the coefficients of the line and determine its position and direction. in fact. 8a1. In mathematics. p2 = Point2D@83.3 Chapter 2 Descarta2D Tour Lines Intuitively. a line is represented as a linear equation of the form Ax + By + C = 0 where A. 6. 2<DD Out[13] Line2D@−3. l1<D. p2. In[13]: l1 = Line2D@p1 = Point2D@8−3. or about 26. Mathematically.5651 degrees. 26. measured from the horizontal. We can plot the points and the line to get graphical verification that the line passes through the two points. The angle can be determined using In[15]: a1 = Angle2D@l1D êê N. The Mathematica constant Degree has the value π/180. A radian is an angular measure equal to 180/π degrees (about 57. In[14]: Sketch2D@8p1. −1<D. 4]. a2< Out[15] 80. Descarta2D Hint.5651< which indicates that the line makes an angle of approximately 0. a straight line is a curve we might draw with a straightedge ruler. −3D This is the line −3x + 6y − 3 = 0. a2 = a1 ê Degree.12 2. this is one of the many methods provided by Descarta2D for constructing a line. a line is considered to be infinite in length extending in both directions. All angles in Descarta2D are expressed in radians. The following command constructs a line from two points. and.

Parallel2DD. −1. l2.4 Line Segments 13 We may want to construct lines with certain relationships to another line. In[18]: Sketch2D@8l1 = Segment2D@8−2. 8l2 = Line2D@p1. Such a line is called a line segment and is represented in Descarta2D as Segment2D[{x0. of the line segment. In[16]: p1 = Point2D@82.5 -2 -2 -1 0 1 2 3 . y0 }.2. 83. 7D. −2<D<D.5 -1 -1.4 -4 -2 0 2 4 Line Segments Perhaps it is more familiar to us that a line has a definite start point and end point. 1<. Line2D@1. l3<D. the following commands construct lines parallel and perpendicular to a given line through a given point. l3 = Line2D@p1. 1 0.5 0 -0. Perpendicular2DD< Out[16] 8Line2D@−3. 1D< In[17]: Sketch2D@8p1. −2D. 1<D. y1 }] where (x0 . −3. respectively. l1. y1 ) are the coordinates of the start and end points. {x1 . 4 2 0 -2 -4 -6 2. For example. l1. l1 = Line2D@3. l1. y0 ) and (x1 . 1.

4 3 2 1 0 -1 0 1 2 3 . r]. 2D. In[21]: c1 = Circle2D@81. point] function to do so. and r is the radius of the circle. In Descarta2D a circle is represented as Circle2D[{h.14 Chapter 2 Descarta2D Tour We might want to determine the midpoint of a line segment.5 -1 0 1 2 3 Circles A circle’s position is determined by its center point and its size is specified by its radius. k) are the coordinates of the center point. In[19]: p1 = Point2D@l1D 1 2 1 2 Out[19] Point2DA9 €€€€€ . The standard equation of a circle is (x − h)2 + (y − k)2 = r2 where (h.5 -1 -1. Sketch2D@8c1. but Descarta2D provides a more convenient function for directly constructing the midpoint of a line segment. p1<D. − €€€€€ =E In[20]: Sketch2D@8l1.5 -2 -2 2. and we could use the Point2D[point. 2<. 1 0. k}.5 0 -0. Point2D@c1D<D.

8Pi ê 6. 2 1 0 -1 -2 -2 2. p2. In Descarta2D an arc can be constructed using Arc2D[point. p3 = Point2D@80. c1 = Circle2D@p1. €€€€€ =. 1<D<D. the function Point2D[circle] constructs the center point of the circle. 3. −2<D.6 Arcs 15 As demonstrated by the example. {θ1 . The function Radius2D[circle] returns the radius of a circle. Point2D@82. p2 = Point2D@8−1. p3. We can specify the span of the arc in terms of the angles the arc’s sector sides make with the horizontal. c1<D.2. an arc is a portion of a circle. €€€€€€€€€ E In[24]: Sketch2D@8p1. 1<D. In[22]: Radius2D@c1D Out[22] 2 Descarta2D provides many functions for constructing circles. Sketch2D@8A1. we can construct a circle that passes through three given points. 2<D. For example. it is merely one of the ways Descarta2D provides for constructing an arc). In[25]: A1 = Arc2D@Point2D@82.6 -1 0 1 2 Arcs Just as a line segment is a portion of a line. p2. In[23]: p1 = Point2D@81. p3D 1 8 17 8 Out[23] Circle2DA90. θ2 }] (this is not the standard representation of an arc. r. 5 Pi ê 6<D. 2<D. .

In[26]: p1 = Point2D@82. {x2 . p3D Out[26] Arc2D@82. 1<. a1 = Arc2D@p1. 86. p3. 4<. 1D In[27]: Sketch2D@8p1. For example. Sketch2D@8t1<D. a1<D. 2<D. we can construct an arc passing through three points. y2 }. p3 = Point2D@8−2.5 1 0 1 2 3 4 As with a circle. p2 = Point2D@81. 8−2.5 -1 -2 2. In[28]: t1 = Triangle2D@81. we can construct an arc in many ways.5 2 1.7 -1 0 1 2 Triangles Triangles are defined by three line segments connecting three points called the vertices of the triangle. 8<.5 3 2. .5 1 0.16 Chapter 2 Descarta2D Tour 4 3. y1 }. −1<D. 1<D. {x3 . y3 }]. 2 1. 1<D. p2. p2. In Descarta2D a triangle is represented as Triangle2D[{x1. −1<.5 0 -0. 88.

8 4 6 8 Parabolas A parabola is the cross-sectional shape required for a reflective mirror to focus light to a single point.8 Parabolas 17 8 7 6 5 4 3 2 1 1 2 3 4 5 6 7 8 We can inscribe a circle inside a triangle. The standard equation of a parabola centered at (0.9364D. k}. c2 = Circle2D@t1. 3. θ.17369D. 4. but opening in a different direction.03659. 4. We can apply a rotation. p1<D. 0) and opening to the right is y 2 = 4f x.2. as well as circumscribe one about a triangle.83161.06098<. 8 6 4 2 2 2. Centroid2DD< êê N Out[29] 8Circle2D@84. . p1 = Point2D@t1. 1. c2. f. where f is the focal length. In[29]: 8c1 = Circle2D@t1. We can also compute properties such as its center of gravity.95924<. Circle2D@85. In Descarta2D the expression Parabola2D[{h. c1. the distance from the vertex point to the focus. θ] is used to represent a parabola.. Point2D@85. Inscribed2DD. Circumscribed2DD. to the parabola to produce a parabola of the same shape.33333<D< In[30]: Sketch2D@8t1. 5.

b. 0D. 1<. 1 − $%%%%% €€€€€% =E= . 1. Pi ê 2D. 4 3 2 1 0 -1 -2 -3 -4 2. 3 2 1 0 -1 -2 -1 0 1 2 4 3 An ellipse has two focus points that can also be plotted. 1 ê 2. 3.9 -2 2 0 4 Ellipses An ellipse is a shape of the path a planet makes as it orbits the sun. 2. Sketch2D@8p1. 2. e2<D. 0<. In[33]: pts = Foci2D@e2D 5 2 5 2 5 2 5 2 Out[33] 9Point2DA92 + $%%%%% €€€€€% . Sketch2D@8e1. 0D. The standard equation for an ellipse is given by y2 x2 + =1 a2 b2 where 2a is the length of the longer major axis. 0<. k}. 1 + $%%%%% €€€€€% =E. p2 = Parabola2D@8−1. Pi ê 4D. θ] is used to represent an ellipse. and 2b is the length of the minor axis. e2 = Ellipse2D@82.18 Chapter 2 Descarta2D Tour In[31]: p1 = Parabola2D@81. p2<D. Point2DA92 − $%%%%% €€€€€% . In Descarta2D the expression Ellipse2D[{h. 0<. Ellipses in other positions and orientations may be obtained by moving the center point or by rotating the ellipse. a. In[32]: e1 = Ellipse2D@80. 1 ê 2.

both extending to infinity in opposite directions. Sketch2D@8lns. The expression Hyperbola2D[{h. 2. 2 a b As with the ellipse. 0D.10 1 2 3 4 Hyperbolas A hyperbola in standard position has an equation similar to an ellipse that is given by y2 x2 − 2 = 1. Sketch2D@8lns. called branches. The hyperbola plot consists of two separate pieces. The lines bounding the extent of the hyperbola are called asymptotes. closely related to the first. Hyperbolas can also be rotated in the plane and moved by adjusting their center points. h2 = Hyperbola2D@h1. 2 1 0 -1 -2 -4 -2 0 2 4 . k}. a. A second hyperbola. 1. 0<. 3 2 1 0 -1 0 2. θ] is used to represent a hyperbola in Descarta2D. h1<D. b. Conjugate2DD. lns = Asymptotes2D@h1D. pts<D. h2<D. is bounded by the same asymptotes and is called the conjugate hyperbola.2. In[35]: h1 = Hyperbola2D@80. the constants a and b represent the lengths of certain axes of the hyperbola.10 Hyperbolas 19 In[34]: Sketch2D@8e2. Sketch2D@8lns<D.

0<. Scale2D@e1. 1. 0<. 2D. scaling and reflecting. size and orientation of an object by applying a transformation to the object. it may be of interest to compute the arc length of a portion of a curve or areas bounded by more than one curve. 83. 0<D. 0D. Circumference2D@c1D< Out[37] 84 π. Pi ê 2D. Line2D@0.12 -2 0 2 4 Area and Arc Length Curves possess certain properties of interest such as area and length. . A Descarta2D object can be transformed to produce a new object. Descarta2D has a variety of functions for performing such computations.11 2 1 0 -1 -2 0 2 4 6 -4 -2 0 2 4 Transformations We can change the position. 4 π< Additionally. 2D. In[37]: c1 = Circle2D@80. Rotate2D@e1. rotating. 2.20 Chapter 2 Descarta2D Tour 3 2 1 0 -1 -2 -3-6 -4 -2 2. These properties are independent of the position and orientation of the curve. Sketch2D@8e1. −1DD<D. Translate2D@e1. In[36]: e1 = Ellipse2D@80. Common transformations include translating. 1. 3 2 1 0 -1 -2 -4 2. Reflect2D@e1. 8Area2D@c1D.

t1 = TangentConics2D@8l1. 0<. 3<D. −1D. c2 = Circle2D@8−3. Descarta2D provides a wide variety of functions for computing tangent lines.13 Tangent Curves 2. c2D. 1D. This example produces the circles tangent to a line and a circle with a radius of 3/8. p1. p2<D êê N. t1<D. Sketch2D@8c1. the two curves are said to be tangent to each other. c1. In[40]: l1 = Line2D@1. The following example constructs four ellipses that are tangent to three lines and pass through two points. p2 = Point2D@84. l3. −1D. 3 ê 8D. 80. t1 = TangentCircles2D@8l1. In[39]: c1 = Circle2D@82. −1D. c2. 2 1 0 -1 -2 -4 -2 2 0 4 This example produces the four lines tangent to two given circles. 1. There are eight circles that satisfy these criteria. 0<.2. l3 = Line2D@810. l2 = Line2D@0. 0<. c1<. 1. p1 = Point2D@82. 2<D. 2D. . l2. c1 = Circle2D@80. Sketch2D@8l1. 3 2 1 0 -1 -2 -3 -4 -2 0 2 4 Conic curves (ellipses. 6<D. 2D. t1<D. parabolas and hyperbolas) can also be constructed passing through points or tangent to lines.13 21 Tangent Curves When two curves touch at a single point without crossing. t1 = TangentLines2D@c1. In[38]: l1 = Line2D@0. 0<. circles and other tangent curves. 0.

6<<. . l2. l3. Further. 0L x Figure 2. PlotRange −> 880. Without loss of generality. 6 5 4 3 2 1 0 2.1: Triangle altitudes theorem. Triangle Altitudes.14 2 4 6 8 10 Symbolic Proofs As a final exercise on our tour of Descarta2D we will use the symbolic capabilities of Mathematica to prove a theorem about the perpendicular bisectors of the sides of a triangle. One vertex is located at the origin. bL P2 Hd. we pick a convenient position for the triangle in the plane as shown in Figure 2. this point is the center of a circle that passes through the three vertices of the triangle.22 Chapter 2 Descarta2D Tour y P3 Ha. p1.1. t1<. 0L P1 H0. p2. In[41]: Sketch2D@8l1. the second on the +x-axis and the third is arbitrarily placed. The three perpendicular bisectors of the sides of a triangle are concurrent in one point. The symbolic capabilities of Mathematica allow us to derive and prove general assertions in analytic geometry. 80. 10<. Many of the built-in Descarta2D functions were derived using these capabilities. CurveLength2D −> 20D.

P2 = Point2D@8d. If you are curious about the form of lines L12. P3<D. Therefore. L13. In[45]: 8d1. The perpendicular bisectors of the sides of the triangle pass through the midpoint of each side and are perpendicular to the side. 0. L23 = Line2D@P2. Although many of the chapters can be studied independently. We now intersect these lines in pairs to determine the points of intersection using the Descarta2D function Point2D[line. d1 − d3< êê FullSimplify Out[45] 80. 8P1. L13 = Line2D@P1. L13D êê Simplify. €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ =E= By inspection. . dD. 0< Many of the explorations provided at the end of upcoming chapters were developed using techniques similar to the one outlined above. P3. which proves the first part of the theorem. €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ =E. the coordinates of these two points are identical. . 2. Many of the concepts introduced informally in this chapter will be studied in detail in subsequent chapters. b<D.15 Next Steps This completes our high-level tour of Descarta2D. we have no need at this point to examine the output. P2. The explorations provided at the end of each chapter provide additional insight into the subject matter and will give you an opportunity to learn the techniques for solving problems using Mathematica. Perpendicular2DD. Each of these lines is constructed using the Descarta2D command Line2D[point. at the end of each statement. P3 = Point2D@8a. a sequential reading and study of the book is recommended for best understanding and continuity. Perpendicular2DD. Using Mathematica and Descarta2D to prove general assertions in analytic geometry illustrates the power of these computer programs. P3. we instruct Mathematica to suppress the output from these statements. line] that constructs the point of intersection of two lines. P5 = Point2D@L12.15 Next Steps 23 In[42]: Clear@a. By including the semicolon. b. 0<D. P2. point. To prove the second part of the theorem we determine the distance from the intersection point to each of the vertex points and show that the distance is the same for all three vertex points. Since we are treating these lines symbolically. 0<D.. Point2DA9 €€€€€ . they can be examined by entering the command {L12. Perpendicular2D]. 8d1 − d2. In[44]: 8P4 = Point2D@L12. In[43]: L12 = Line2D@P1. d3< = Map@Distance2D@#. d2 − d3. the concepts introduced in earlier chapters are the underlying tools used in subsequent chapters. P4D&. L23}. Perpendicular2DD. d2. P1 = Point2D@80. L13 and L23.2. L23D êê Simplify< d 2 a2 + b2 − a d 2b d 2 a2 + b2 − a d 2b Out[44] 9Point2DA9 €€€€€ .

.

Part II Elementary Geometry .

.

2. 2.3. In general.25. 0. 3 Rational 7/5. Ratios of integers such as 1/2. both negative and positive. 4/1 and 23/15 are called rational numbers. 3.1: Numbers in Mathematica. Table 3. 3/4 Real 1. Examples are −8. A complex number is the sum of a real number a and a pure imaginary number bi.0 Complex 3 + 2 I. the expression a + bi is a complex number. this book deals with real numbers. The two complex numbers a + bi and a − bi are called conjugate complex numbers. 2. 1. -45. as well as zero. 5/3 and π.57 I 27 . y) coordinates. Mathematica provides a variety of ways to represent numbers as summarized in Table 3. but since we are using algebraic techniques to study geometry.1387. 0.0.1 Numbers Integers are the whole numbers used for counting.45 . This chapter introduces these concepts and develops some simple functions involving points. -2. √ If a and b represent real numbers and i = −1. 3.Chapter 3 Coordinates and Points The fundamental concept of analytic geometry is the one-to-one correspondence established between points in a plane and (x. 5/7. Numbers that can be plotted √ as distances from a fixed point on a line are called real numbers.1. Type Examples Integer -4. complex numbers naturally arise in the formulations.

Consider two perpendicular lines X 0 X and Y 0 Y intersecting in the point O. y). . B has the coordinates (−2. The fundamental principle of analytic geometric is that there exists a one-to-one correspondence between number pairs and points in the plane: to each pair of numbers there corresponds . but problems in analytic geometry often assume the units are equal on both axes.1. II. and the vertical line Y 0 Y the y-axis. C. but the one most commonly used is as follows. For example. 2) or simply (3. and it is customary to write A(3. . This correspondence may be established in many ways. When numerical scales are established on the axes. Similarly. by going out +3 units on the x-axis and +2 units on the y-axis a point labeled A is located as shown in Figure 3. .14159 Pi e ≈ 2. .2.2. The unit scales on the x-axis and the y-axis need not be the same. B. real or complex. Sometimes we do not wish to specify what the particular constant is and indicate a general constant by any one of the letters a. . The point A is said to have the pair of numbers 3 and 2 as its coordinates. c. Thus OX and OY have positive sense (or direction) while OX 0 and OY 0 have negative sense. III and IV as shown in Figure 3. 3. These axes divide the plane into four quadrants labeled I. rational. and together they form a rectangular coordinate system. negative abscissas are laid off to the left.2: Some common constants in Mathematica. The point O is called the origin. A.. integer. Clearly such a system of coordinates can be used to describe the positions of points in the plane. b. We will write P1 (x1 . is a constant. −1) and lies in the third quadrant.2 Rectangular Coordinates The basic idea in analytic geometry is to establish a one-to-one correspondence between the points of a plane and number pairs (x. The horizontal line X 0 X is called the x-axis.71828 E π/180 ≈ 0. positive distances x are laid off to the right of the origin and are called abscissas. Positive distances y are drawn upwards and are called ordinates. the x-coordinate is negative and the y-coordinate is positive. 2). negative ordinates are drawn downward. and such constants are referred to as parameters. Constant Mathematica π ≈ 3.28 Chapter 3 Coordinates and Points Table 3.. y1 ) as the general representation of a point P1 in the plane at coordinates x = x1 and y = y1 . .0174533 √ i = −1 Degree I Any given number. It is evident that for the point P1 pictured in the second quadrant. Mathematica provides symbols for some common numbers that are fixed value constants as shown in Table 3.

y AH3. .2: Coordinates specifying positions in the plane. y1 L x BH-2.1: Coordinate axes and quadrants.2 Rectangular Coordinates 29 y II I -x x O III IV -y Figure 3. -1L Figure 3.3. 2L P1 Hx1 .

In[2]: p1 = Point2D@−2. y]. (4. The function Sketch2D[objList] plots a list of objects. the line segment AB from point A to point B extends over a certain number of units of length used as the scale on the x-axis. y}]. If the direction from A to B points to the right. we say that AB is a positive . Point2D@84. 3D Out[2] Point2D@8−2. In[1]: Sketch2D@8Point2D@8−2. Point2D@8−4. or on a line parallel to the x-axis. conversely. 2<D. Solution. 3).3 Line Segments and Distance Given two points A and B on the x-axis. −1<D<D. 2) and (−4. and this name can be used later to refer to the point. Example. Descarta2D will automatically add the curly brackets when the point’s abscissa and ordinate are given as two arguments. 3 2 1 0 -1 -4 -2 0 2 4 The curly brackets surrounding the point’s coordinates are optional and may be omitted. −1). A symbolic name may be assigned to a point. Plot the points with the following coordinates: (−2. 3<D In[3]: p1 Out[3] Point2D@8−2. 3<D. Descarta2D represents a point (x. y) as Point2D[{x.30 Chapter 3 Coordinates and Points one and only one point and. as shown below. Point2D[x. to each point in the plane there corresponds one and only one pair of numbers. 3<D 3.

y2 L d P1 Hx1 . we say that AB is a negative segment. Then we can assign to the segment AB a positive or negative number indicating the direction and number of units of the This signed number is indicated . y1 L x2 .x1 y2 . if the direction from A to B points to the left.y1 Q x Figure 3.3 Line Segments and Distance 31 y P2 Hx2 . On the other hand. segment.3: Distance between points.3.

. segment.

indicated by . by AB. The absolute value of AB.

AB .

y1 ) and P2 (x2 . Thus AB = x2 − x1 and BA = x1 − x2 . or the length of the segment. the line segment AB. d. is a positive number called the length of the line segment. Let P1 (x1 . The same formula holds true regardless of the quadrants in which the points lie and regardless of the order in which the points are taken.3. We define BA to be the negative of segment AB. similarly subtracting ordinates. Thus CD = y2 − y1 and DC = y1 − y2 . is given by p d = (x2 − x1 )2 + (y2 − y1 )2 . let x2 be the abscissa of B and let x1 be the abscissa of A. y2 ) be two points lying in the first quadrant and draw line segments P1 Q and P2 Q parallel to the coordinate axes as shown in Figure 3. P1 Q = x2 − x1 . . When the context is clear the symbol AB may be used to represent the line containing the points A and B. the number of x-units in the segment AB is equal to x2 − x1 . In the same fashion we can define a directed segment CD on. By subtracting the abscissas. the y-axis. To calculate the number (positive or negative) of x-units in the segment AB. Making use of the Pythagorean Theorem on the right triangle P1 QP2 . to be positive or negative depending on whether the arrow from C to D points up (positive direction) or down (negative direction). if B is to the right of A. P2 Q = y2 − y1 . or parallel to. Then.. we have (P1 P2 )2 = (x2 − x1 )2 + (y2 − y1 )2 and the positive distance P1 P2 . |AB|.

Solution. The functions XCoordinate2D[point] and XCoordinate2D[coord] give the x-coordinate. p √ √ d = (3 − (−4))2 + (−1 − (−2))2 = 50 = 5 2. Taking the points in the given order. In[5]: Clear@x1. The Descarta2D function Distance2D[coord. p2D Out[5] "########################################## # Hx1 − x2L2 + Hy1 − y2L2 Mathematica Hint. Distance2D@p1. . y1<D. Coordinates2D[point] returns the (x. p1 = Point2D@8x1. 8−4.32 Chapter 3 Coordinates and Points Example. The function Distance2D[point. Descarta2D Hint. −2). and YCoordinate2D[point] and YCoordinate2D[coord] give the y-coordinate. Distance2D@Point2D@83. y1. y2<D. taking the points in the opposite order. coord] computes the distance between two locations given as coordinates. x2. y2D. There are several Descarta2D functions that are handy for working with points and coordinates. −1<D. we have p √ √ d = (−4 − 3)2 + (−2 − (−1))2 = 50 = 5 2. y}. Find the distance between the two points (3. Or. −2<DD< Out[4] 95 è!!! è!!! 2. The Mathematica function Clear is used in the previous Ÿ example and throughout other examples in this book to insure that variable names used in the examples are not set to some unintended value from a previous computation. p2 = Point2D@8x2. 5 2= The coordinates of the points may be symbolic and the points themselves may be named points. −1) and (−4. In[4]: 8Distance2D@83. −2<D. point] computes the distance between two points. Point2D@8−4. −1<. y) coordinates of a point as the list {x.

4. P12 . Alternatively. The function Point2D[point. has coordinates   x1 + x2 y1 + y2 . Find the midpoint between the points (−2. point] returns the midpoint of the two points. Solution. 2 2 Example.4 Midpoint between Two Points The midpoint between two points is the point bisecting the line segment connecting the two points. p2 = Point2D@83. . In[6]: p1 = Point2D@8−2. p12 = Point2D@p1. −2<D. −2). the function Point2D[lnseg] returns the midpoint of a line segment.5 Point of Division of Two Points Given a directed line segment such as P1 P2 . we wish to find the coordinates of the point P which divides P1 P2 into a given ratio r1 /r2 as illustrated in Figure 3.5. y1 ) and P2 (x2 . y2 ) as shown in Figure 3.4 Midpoint between Two Points 33 y P2 Hx2 . Let P have the . then the midpoint. 3.4: Midpoint between two points.3. p2D 1 2 1 2 Out[6] Point2DA9 €€€€€ . y1 L x Figure 3. y2 L P12 P1 Hx1 . − €€€€€ =E 3. 1<D. 1) and (3. If the coordinates of the two points are P1 (x1 .

2) specialize to x= y1 + y2 x1 + x2 and y = . P is an internal point of division. hence r1 = r2 and Equations (3. If this ratio is zero. the center of gravity lies halfway between them as indicated by (3. y) which are to be determined.3) also have useful physical interpretations.2) and (3. −1) into the ratio r1 /r2 = −2.1) and (3.5: Point of division. y2 L r2 PHx. P is an external point of division (in the direction of P1 P2 ). Solving this equation for x yields x1 r2 + x2 r1 .2). it follows that (x − x1 )/r1 = (x2 − x)/r2 . (3. y1 L Q x .2) y= r1 + r2 To find the midpoint of the segment P1 P2 the ratio r1 /r2 must be unity. Since 4P1 P Q and 4P SP2 are similar.x x Figure 3. and if this ratio is a positive number. 5) and P2 (4. then P coincides with P1 . coordinates (x.1). For −1 < r1 /r2 < 0. 2 2 (3. Sense is important here and P must be located so that P1 P/P P2 = r1 /r2 .1) x= r1 + r2 Similarly. As r1 /r2 → +∞. If the masses are equal. In (3.x1 R x2 . It is of further interest to note the positions of P for various values of the ratio r1 /r2 . respectively. (3. P is an external point in the opposite direction with P1 P negative and P2 P positive. yL S r1 P1 Hx1 . . Find the point that divides the line segment between the points P1 (−2. (3.3). For −∞ < r1 /r2 < −1. Example.34 Chapter 3 Coordinates and Points y P2 Hx2 . P → P1 .3) Equations (3. let x and y be the coordinates of the center of gravity of masses r1 and r2 placed at P1 and P2 . y1 r2 + y2 r1 .1) and (3.

1D Out[7] Point2D@810. d. y1<D.1) and (3.6: Point offset a distance towards a point. D12 − dD H−d + D12L x1 + d x2 D12 H−d + D12L y1 + d y2 D12 Out[8] Point2DA9 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . As shown in Figure 3. y1. −1<D. We can use the point of division formula from the previous section to determine the coordinates of the offset point. Point Offset a Distance Given two points P1 (x1 . y2 L PHx. d.2) as this would tend to generate a point at infinity. . y2 ) where r1 /r2 = d/(D12 − d) and D12 is the distance between P1 and P2 . Solution. In[7]: Point2D@Point2D@8−2. y2 ) we wish to find the point offset a distance. Using the point of division function from Descarta2D yields In[8]: Clear@x1. y1 + (y2 − y1 ) P x1 + D12 D12 (3. from P1 in the direction of P2 . The Descarta2D function Point2D[point. 5<D. −7<D Notice that it is invalid for r1 + r2 to equal zero in Equations (3. r2 ] returns the point that divides the line segment between the points into the ratio r1 /r2 . r1 . Point2D@8x2.5 Point of Division of Two Points 35 y D12 d P2 Hx2 . y1 L x Figure 3. €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ =E Rearranging and using standard mathematical notation produces   d d (x2 − x1 ). point. y2<D.3. D12D. x2. d. yL P1 Hx1 .4) where d is the (possibly negative) offset distance and D12 is the distance between the two points. y2.6 the desired point is a point of division between P1 (x1 . −2. y1 ) and P2 (x2 . Point2D@Point2D@8x1. Point2D@84. y1 ) and P2 (x2 .

y1 ).4). d] returns the point offset a distance d from the first point to the second point. Find the point offset a distance 2 from the point (3. 1<D. 1 + 3 $%%%%%%% €€€€€€€€€% =E 3. Now consider the value of the determinant . y3 ) are said to be collinear if they lie on the same straight line. The Descarta2D function Point2D[point. point.36 Chapter 3 Coordinates and Points Example. P3 . Solution. y2 ) and P3 (x3 . 4). Point2D@8−2. on the line P1 P2 by selecting an appropriate value for d and applying Equation (3. 4<D. 1) towards the point (−2. All such points P1 . We can construct any point. In[9]: Point2D@Point2D@83. P2 (x2 .6 Collinear Points Three distinct points P1 (x1 . 2D 2 17 2 17 Out[9] Point2DA93 − 5 $%%%%%%% €€€€€€€€€% . P2 and P3 are obviously collinear by construction.

.

x1 .

.

.

x2 .

.

x3 y1 y2 y3 .

.

.

.

.

. .

1 .

the determinant given is zero. In[10]: Clear@x1. Det@88x1. y2. 1<<D ê. 8x2. Therefore. y2. D12D. 1<. 1 1 Mathematica provides the Det command for expanding the value of such a determinant. the necessary and sufficient condition that three points lie on the same line is given by the determinant equation . y1. 1<. y1. d. y3. 8x3 −> x1 + Hx2 − x1L ∗ d ê D12. 8x3. x2. x3. y3. y3 −> y1 + Hy2 − y1L ∗ d ê D12< êê Simplify Out[10] 0 We see from Mathematica that for any value of d.

.

.

x1 y1 1 .

.

.

.

.

.

x2 y2 1 .

. = 0.

.

.

x3 y3 1 .

y2 ) and P3 (x3 . P2 (x2 . . y1 ). y3 ). where the coordinates of the points are P1 (x1 .

Point2D@84. point] returns True if the points are collinear. . Point2D@87. . 4<DD Out[12] True Descarta2D Hint. . In[12]: IsCollinear2D@Point2D@81. . 0). (0. . Point2D@87. 4<D<. . . . . . . PlotRange −> 88−1. 2b) are collinear. . 1<. 8<. . Solution. . 6. . . .3. . Using IsCollinear2D is preferable to using the Mathematica function Det for determining collinearity because IsCollinear2D accommodates slight round-off errors that may occur in the floating point arithmetic in the computer. . 1<<D Out[11] 0 Descarta2D provides a specific function for determining whether three points are collinear: IsCollinear2D[point. 2<D. otherwise. .nb Show that the three points (3a. .7 Explorations 37 Example. . 84. . . 1<. . 2. Point2D@84. . . In[13]: Sketch2D@8Point2D@81. . 87. . . . 6<D. . . . . 8 6 4 2 0 0 3. . . . 6) and (4.7 2 4 6 8 Explorations Collinear Points. . . . . ptscol. . . 4. . 3b) and (a. . point. 4) are collinear. . 2). . . . it returns False. 8−1. . (7. 6<D. . . —– . . . The Mathematica function Det[elemList] returns the determinant of the nested list of elements. Show that the three points (1. In[11]: Det@881. . . 2<D. . . 8<<D. .

.nb Show that the points P1 (r1 . tridist. . . Show that the distance.nb C b a d A B m AB = c D n Show that for any 4ABC as shown in the figure above the relationship between the lengths of the labeled line segments is given by a2 m + b2 n = c(d2 + mn). . . . . . . . . . . . .nb The location of a point in the plane may be specified using polar coordinates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .nb Prove that the midpoint of the hypotenuse of a right triangle is equidistant from the vertices. . . . . . . . . . . θ) are not unique as all points of the form (r. . . . . . . . . . . . —– . . . . . . . . . . . . . is q d = r12 + r22 − 2r1 r2 cos(θ1 − θ2 ). . . . . . . . . —– Stewart’s Theorem. . . . . . . . . . polardis. . . . . . —– Collinear Polar Coordinates . . . . . θ + 2kπ) and (−r. . . . .nb Show that the polar coordinates of a point (r. . . . . . . . . . . . . . . . . . . —– Hypotenuse Midpoint Distance. . . . . . . θ2 ). . . . . . between two points (r1 . . stewart. . . —– Non-uniqueness of Polar Coordinates . θ1 ). . . . . . . . . . . . . . . . . . . P2 (r2 . . . . . polarunq. . . . . . . . . . . . . . . . . . . . given in polar coordinates. . . . . . . θ2 ) and P3 (r3 . . . (r. . where r is the distance from the origin to the point. . θ + (2k + 1)π) represent the same position in the plane for integer values of k. . . θ). . . . . d. θ1 ) and (r2 . . . . . . .38 Chapter 3 Coordinates and Points Distance using Polar Coordinates. . . . . polarcol. . θ3 ) in polar coordinates are collinear if and only if −r1 r2 sin(θ1 − θ2 ) + r1 r3 sin(θ1 − θ3 ) − r2 r3 sin(θ2 − θ3 ) = 0. . . . and θ is the angle the ray to the point from the origin makes with the +x-axis. .

Chapter 4

Equations and Graphs
Using algebraic techniques to solve geometry problems is the difference in approach between
analytic geometry and planar geometry. Use of such techniques links the algebraic concept of
an equation to the graphical representation of geometry shown in a graph or plot. This chapter
introduces some of the simple algebraic techniques for solving equations that are heavily used
in analytic geometry.

4.1

Variables and Functions

A variable is a quantity to which arbitrary values may be assigned. Let x be a symbol
representing such a variable and let the quantity represented by the symbol y depend on x.
We call y a function of x and say that x is the independent variable, and y the dependent
variable. Using standard mathematical notation, these statements are written as y = f (x)
and is read “y is a function of x.” The value of the function at x = a is written f (a). These
definitions may be expanded so that a variable z depends on two independent quantities x
and y (as in solid analytic geometry), and relationships of this type are written z = f (x, y).
A function y = f (x) is real-valued if y is real when x is real. If there is but one value of
y for a given value of x, y is said to be a single-valued function. If, for a given value of x,
y has more than one value, y is said to be multiple-valued. The function f (x) is periodic if
f (x + P ) ≡ f (x) for some period, P . Usually it is assumed that P is the least number for
which this identity is true.

4.2

Polynomials

A mathematical expression consisting of a sum of various positive integer powers of a variable
is called a polynomial. The largest exponent that appears in a polynomial is called the degree
of the polynomial. Polynomials of low-degree have special names as shown in Table 4.1.
Polynomials can involve more than one variable. For example the polynomial x + 2y + 3 is
a linear polynomial in two unknowns and x2 + 3xy + 2y 2 − 2x + 4 is a quadratic polynomial in

39

40

Chapter 4 Equations and Graphs

Table 4.1: Low-degree polynomials.
Degree

Name

Example

0

Constant

3

1

Linear

x+1

2

Quadratic

ax2 + bx + c

3

Cubic

x3 − 2x + 7

4

Quartic

3t4 − 2t2 + 17

5

Quintic

s5 − 1

two unknowns. Descarta2D provides special objects, called equation objects, for representing
linear and quadratic polynomials in two unknowns (see Table 4.2).
Example. Convert the polynomials 4x − 2y + 1 and x2 − 3xy + 3x − 2y + 4 into
equivalent Line2D and Quadratic2D objects. Perform the inverse conversions.
Solution. Line2D[poly, {x, y}] and Quadratic2D[poly, {x, y}] convert linear
and quadratic polynomials into equivalent Line2D and Quadratic2D objects. The
functions Polynomial2D[line, {x, y}] and Polynomial2D[quad, {x, y}] convert
Line2D and Quadratic2D objects, respectively, into polynomials.
In[1]: Clear@x, yD;

8l1 = Line2D@4 ∗ x − 2 ∗ y + 1, 8x, y<D,
q1 = Quadratic2D@x ^ 2 − 3 ∗ x ∗ y + 3 ∗ x − 2 ∗ y + 4, 8x, y<D<
Out[1] 8Line2D@4, −2, 1D, Quadratic2D@1, −3, 0, 3, −2, 4D<
In[2]: 8Polynomial2D@l1, 8x, y<D, Polynomial2D@q1, 8x, y<D<
Out[2] 81 + 4 x − 2 y, 4 + 3 x + x2 − 2 y − 3 x y<

Table 4.2: Descarta2D equation objects.
Descarta2D Object

Polynomial
Ax + By + C
2

Line2D[A, B, C]
2

Ax + Bxy + Cy + Dx + Ey + F

Quadratic2D[A, B, C, D, E, F]

4.3 Equations

41
Objects
Line2D[a, b, c]
Quadratic2D[a, b, c, d, e, f]

1

,,,
,
,
,

2

3

I@@@ 4
@@@R

ax + by + c
ax2 + bxy + cy 2 + dx + ey + f

ax + by + c == 0
ax2 + bxy + cy 2 + dx + ey + f == 0

Polynomials

Equations

Figure 4.1: Descarta2D objects, polynomials and equations.

4.3

Equations

If a function of a single variable, f (x), is set equal to zero, the relation f (x) = 0 is called an
equation. This equation imposes a condition on the variable x which then can assume only
certain values. For example, if Ax + B = 0, then x can take on only one value, x = −B/A. If
the equation is sin x = 0, x can assume an unlimited number of values of the form kπ, where k
is any integer. The process of finding the values of x that satisfy the equation is called solving
the equation. The values of x which satisfy f (x) = 0 are called the solutions or roots of the
equation. All of the real solutions of f (x) = 0 may be represented by points on a line such as
the x-axis. These points constitute the graph of the equation in one dimension.
If a function of two variables, f (x, y), is set equal to zero the relation f (x, y) = 0 is also
an equation. But this equation permits one of the variables to be independent, while the
other is dependent and a function of the first. For example, f (x, y) = 0 might be solved for
y in terms of x, yielding y = g1 (x), indicating that x is the independent variable and y the
dependent variable. Or f (x, y) = 0 might be solved for x yielding x = g2 (y) interchanging the
independent and dependent variables.
In addition to representing polynomials, the Line2D and Quadratic2D objects may also
be used to represent equations (the implicit assumption is that they represent polynomials
set equal to zero). Figure 4.1 shows the relationships between polynomials, equations and
Descarta2D equation objects. Table 4.3 summarizes the Descarta2D functions that accomplish
the conversions labeled 1 to 4 in Figure 4.1.

Example. Convert the Descarta2D linear equation object Line2D[2, 3, -1] into
an equivalent Mathematica equation. Similarly, convert the Descarta2D quadratric
object Quadratic2D[1, -2, 2, 3, -3, 7] into a Mathematica equation.
Solution. The Descarta2D function Equation2D[line, {x, y}] converts a Line2D
object into a Mathematica equation. The function Equation2D[quad, {x, y}]
converts a Quadratic2D object into a Mathematica equation.

42

Chapter 4 Equations and Graphs

Table 4.3: Descarta2D conversion functions.
Descarta2D Function ⇒ Result
1

Line2D[ax + by + c, {x, y}] ⇒ Line2D[a, b, c]
Quadratic2D[ax2 + bxy + cy 2 + dx + ey + f , {x, y}] ⇒
Quadratic2D[a, b, c, d, e, f]

2

Polynomial2D[Line2D[a, b, c], {x, y}] ⇒ ax + by + c
Polynomial2D[Quadratic2D[a, b, c, d, e, f], {x, y}] ⇒
ax2 + bxy + cy 2 + dx + ey + f

3

Equation2D[Line2D[a, b, c], {x, y}] ⇒ ax + by + c == 0
Equation2D[Quadratic2D[a, b, c, d, e, f], {x, y}] ⇒
ax2 + bxy + cy 2 + dx + ey + f == 0

4

Line2D[ax + by + c == 0, {x, y}] ⇒ Line2D[a, b, c]
Quadratic2D[ax2 + bxy + cy 2 + dx + ey + f == 0, {x, y}] ⇒
Quadratic2D[a, b, c, d, e, f]

In[3]: Clear@x, yD;

8Equation2D@Line2D@2, 3, −1D, 8x, y<D,
Equation2D@Quadratic2D@1, −2, 2, 3, −3, 7D, 8x, y<D<
Out[3] 8−1 + 2 x + 3 y == 0, 7 + 3 x + x2 − 3 y − 2 x y + 2 y2 == 0<

4.4

Solving Equations

In our study of analytic geometry we will often need to solve linear and quadratic equations.
We will also need to solve systems of two or more equations. Mathematica provides functions
for solving individual equations and systems of equations, either exactly (the Solve function)
or numerically (the NSolve function). The following subsections illustrate the use of these
Mathematica functions.

One Linear, One Unknown
The equation ax + b = 0 is a linear equation in one unknown. By simple algebra, the solution
to this equation is x = −b/a. The equation is invalid (or trivial) and has no solution if a = 0.

4.4 Solving Equations

43

Example. Solve the equation 3x + 12 = 0.

Solution. The Mathematica function Solve[eqn, variable] returns a list of solutions for an equation in one unknown. The solution(s) are returned in the form of
Mathematica rules.
In[4]: Clear@xD;

Solve@3 x + 12 == 0, xD
Out[4] 88x → −4<<

One Quadratic, One Unknown
The quadratic equation ax2 + bx + c = 0 has two solutions

−b ± b2 − 4ac
.
x=
2a
The expression under the radical, D ≡ b2 − 4ac, is called the discriminant of the equation and
determines the type of solutions admitted by the equation. Assuming the coefficients are real
numbers, D > 0 indicates that the equation has two real and distinct solutions; if D = 0 the
equation has two real solutions that are equal; and if D < 0 the equation has two complex
solutions that are conjugates of each other.

Example. Find the solutions of the equation 3x2 − 4x − 5 = 0.

Solution. The Mathematica function Solve[eqn, variable] returns a list of solutions for an equation in one unknown. The solution(s) are returned in the form of
Mathematica rules.
In[5]: Clear@xD;

Solve@3 x ^ 2 − 4 x − 5 == 0, xD
1
3

Out[5] 99x → €€€€€ I2 −

1
è!!!!!
è!!!!!
19 M=, 9x → €€€€€ I2 + 19 M==
3

44

Chapter 4 Equations and Graphs

Two Linears, Two Unknowns
A list of two or more equations that are to be solved simultaneously is called a system of
equations. Consider the system of two linear equations
a1 x + b1 y + c1 = 0 and a2 x + b2 y + c2 = 0.
Simple algebra yields the formulas for x and y that solve the two equations:
x=

a 2 c1 − a 1 c2
b 1 c2 − b 2 c1
and y =
.
a1 b 2 − a2 b 1
a1 b 2 − a2 b 1

If the denominator, a1 b2 − a2 b1 , is equal to zero the equations have no solution and are called
inconsistent.
Example. Find the solution of the two linear equations x − 3y + 4 = 0 and
2x + 5y − 3 = 0.

Solution. The Mathematica function Solve[eqnList, varList] returns a list of
solutions for a system of equations in several variables. The solution(s) are returned
in the form of Mathematica rules.
In[6]: Clear@x, yD;

Solve@8x − 3 y + 4 == 0, 2 x + 5 y − 3 == 0<, 8x, y<D
Out[6] 88x → −1, y → 1<<

One Linear, One Quadratic, Two Unknowns
Consider the linear and quadratic equations
a1 x + b1 y + c1 = 0 and
a2 x + b2 xy + c2 y 2 + d2 x + e2 y + f2 = 0.
2

In the general case the system of these two equations can be solved by first solving the
linear equation for one of the variables, say x, in terms of the other, y. The expression for
x is then substituted into the quadratic equation, yielding a somewhat more complicated
quadratic equation in y alone. The quadratic equation in one variable is then solved yielding
two values for y which may then be substituted back into the linear equation to determine
the corresponding values of x. While this solution technique is straightforward, it produces
somewhat complicated expressions for x and y, and special cases must be handled individually
(for example, if the linear equation has no y term, then the procedure must be altered to solve
for x instead).

4.4 Solving Equations

45

Example. Solve the system of equations
3x + 4y − 1 = 0 and 2x2 + y 2 + 6x − 4y + 1 = 0
using the Mathematica Solve command.
Solution. The Mathematica function Solve[eqnList, varList] returns a list of
solutions for a system of equations in several variables. The solution(s) are returned
in the form of Mathematica rules.
In[7]: Clear@x, yD;

ans = Solve@83 x + 4 y − 1 == 0, 2 x ^ 2 + y ^ 2 + 6 x − 4 y + 1 == 0<, 8x, y<D
1
1
è!!!!!!!!
è!!!!!!!!
295 M, y → €€€€€€€€€ I62 + 3 295 M=,
41
41
1
1
è!!!!!!!!
è!!!!!!!!
9x → €€€€€€€€€ I−69 + 4 295 M, y → €€€€€€€€€ I62 − 3 295 M==
41
41

Out[7] 99x → €€€€€€€€€ I−69 − 4

These somewhat complicated solutions can be approximated by decimal numbers
using the Mathematica N function.
In[8]: N@ansD
Out[8] 88x → −3.35859, y → 2.76894<, 8x → −0.00726205, y → 0.255447<<

Two Quadratics, Two Unknowns
The system of two quadratic equations in two unknowns
a1 x2 + b1 xy + c1 y 2 + d1 x + e1 y + f1 = 0 and
a2 x2 + b2 xy + c2 y 2 + d2 x + e2 y + f2 = 0
can be solved algebraically using a technique involving a pencil of the two quadratic equations.
This technique will be discussed in more detail in later chapters. Even though the technique
can yield a symbolic formula for the solutions, such a formula is of no practical value, and is
riddled with special cases. In spite of these complications, Mathematica can solve such systems
of equations with numerical coefficients, both in exact form and approximated numerically.
These solutions are very useful in the study of conic curves introduced in later chapters.
Example. Find approximate numerical solutions for the system of equations
3x2 + 2xy − 4y 2 − 2x − 3y − 4 = 0
x2 − 4xy + y 2 + 3x + 4y + 1 = 0
using the Mathematica NSolve command.

46

Chapter 4 Equations and Graphs
Solution. The Mathematica function NSolve[eqnList, varList] returns a list of
numerical solutions for a system of equations in several variables. The solution(s)
are returned in the form of Mathematica rules. The results shown here were
computed using Mathematica Version 3.0.1. Version 4.0 computes the same roots,
but returns them in a different order.
In[9]: Clear@x, yD;

NSolve@83 x ^ 2 + 2 x ∗ y − 4 y ^ 2 − 2 x − 3 y − 4 == 0,
x ^ 2 − 4 x ∗ y + y ^ 2 + 3 x + 4 y + 1 == 0<, 8x, y<D
Out[9] 88x → −0.955121, y → 0.120031<,

8x → 0.476004 − 0.298543 I, y → −0.268381 + 0.962235 I<,
8x → 0.476004 + 0.298543 I, y → −0.268381 − 0.962235 I<,
8x → 3.81264, y → 3.46435<<

Notice that in this example two of the solution pairs involve only real numbers,
and two involve complex numbers. The complex solutions are a conjugate pair.

Descarta2D Hint. Descarta2D provides the function Solve2D to supplement
the capabilities of the Mathematica Solve function. It provides specialized capabilities that are useful in the implementation of the Descarta2D packages. Refer
to the Descarta2D references for a detailed description of the Solve2D function.

4.5

Graphs

Consider that F (x, y) = 0 has been solved for y so that y = f (x). We wish to give a geometric
interpretation to the equation y = f (x). Now if a value, say x1 , is assigned to x, then, if f (x)
is single-valued, there will be determined a single value y, say y1 . Another value of x, say x2 ,
will produce a value y2 . If f (x) is multiple-valued, there will be several values of y for a given
x. In any event the real number pairs (x1 , y1 ) which satisfy y = f (x) may be plotted in two
dimensions as points in the plane. The aggregate of these points constitutes the graph or plot
of the equation y = f (x) or of the function f (x).
This is one of the central problems in plane analytic geometry: given a function y = f (x),
to plot its graph or to represent it geometrically. We sometimes say that the graph of f (x) is
the locus of f (x). The word locus, in general, carries with it the idea of motion. Thus, the
curve traced by a moving point is called the locus of the point. Such a locus is also referred
to as a curve in the plane.
Through the study of equations much can be learned about the geometric properties of
graphs. Such analysis is one of the roles of analytic geometry. In the study of an equation
y = f (x) there are many analyses that can be made in order to intuitively understand the
behavior of the graph. Mathematica and Descarta2D can be used to aid in this understanding.
Four properties of significant interest in analytic geometry are

4.6 Parametric Equations

47

Intercepts The points at which the curve crosses the x- and y-axes.
Extent The regions of the plane to which the curve is confined and regions where it tends to
infinity.
Symmetry The lines in which the reflection of the curve is a mirror image of the curve itself.
Cases of interest include symmetry about the x- or y-axes, symmetry about the origin,
and symmetry about the lines y = x or y = −x.
Asymptotes The behavior of an unbounded curve in the neighborhood of infinity, where
either x, y, or both become infinite. In particular, it may happen that the distance
from a point P on the curve to some fixed line tends to zero. Such a line is called an
asymptote of the curve.
The set of all points which satisfy a given condition is called the locus of that condition.
An equation is called the equation of the locus if it is satisfied by the coordinates of every
point on the locus and by no other points. There are three common representations of the
locus by means of equations:
Rectangular equations which involve the rectangular coordinates (x, y)
Polar equations which involve the polar coordinates (r, θ)
Parametric equations which express x and y (or r and θ) in terms of a third independent
variable called a parameter.
This book focuses on rectangular and parametric equations, with polar equations covered in
the explorations.

4.6

Parametric Equations

It is often advantageous to use two equations to represent a curve instead of one. The xcoordinate of a point on the curve will be given by one equation expressing x as some function
of a parameter, say θ or t, and the y-coordinate will be given by another equation expressing y as a function of the same parameter. Such equations are called parametric equations.
Upon eliminating the parameter between the two equations the implicit equation, in the form
f (x, y) = 0, of the curve may be found. Some loci problems are treated most readily by means
of parametric equations. Parametric equations are also the most natural means for generating
a sequence of points on a curve, such as those needed to plot the curve. Since a parameter
may be chosen in many ways, the parametric equations of a given curve are not unique, and
in some cases they will only represent a portion of a curve.

Example. Find parametric equations of the locus of a point as it “orbits” about
the origin at a distance of 2 units.

48

Chapter 4 Equations and Graphs
Solution. Let the parameter θ be the angle measured counter-clockwise from the
+x-axis that a line segment of length 2 sweeps when anchored at the origin (0, 0).
Using trigonometry the x- and y-coordinates of the end point of the line segment
are given by the parametric equations
x = 2 sin θ and y = 2 cos θ.
The locus of these parametric equations is a circle. In Mathematica a parametric
curve may be plotted using ParametricPlot[{x(t), y(t)}, {t, t1 , t2 }] where x(t)
and y(t) are the parametric equations of the curve, t is the parameter, and t1 and
t2 are the start and end values of the parameter.
In[10]: Clear@tD;

ParametricPlot@82 Sin@tD, 2 Cos@tD<, 8t, 0, 2 Pi<,
AspectRatio −> AutomaticD;

2
1
-2 -1

1

2

-1
-2

In our study of curves in the plane we will examine both implicit and parametric equations
for the curves.

4.7

Explorations

Determinants.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .deter.nb
Determinants often provide a concise notation for expressing relationships in analytic geometry. Show that the expanded algebraic form for the 2 × 2 determinant

a b

1 1

.

a2 b 2 .

is given by −a2 b1 + a1 b2 . Show that the .

.

.

.

.

.

.

expanded algebraic form for the 3 × 3 determinant .

a1 b1 c1 .

.

.

a 2 b 2 c2 .

.

a 3 b 3 c3 .

.

. . . . . . . . . .nb Show that the solution to the system of two linear equations in two unknowns a 1 x + b 1 y + c1 a 2 x + b 2 y + c2 is given by the determinants x= .7 Explorations 49 is given by −a3 b2 c1 + a2 b3 c1 + a3 b1 c2 − a1 b3 c2 − a2 b1 c3 + a1 b2 c3 . . . . . . . . . . . . cramer2. . . . . . . . . . . . . . . . . . .4. —– Cramer’s Rule (Two Equations). . . .

.

−c 1 .

.

.

−c2 b1 b2 D .

.

.

.

.

and y = 0 0 .

.

a .

1 .

.

a2 −c1 −c2 .

.

.

.

.

. D .

b1 .

.

.

. b2 .

.

.

a .

1 D=.

.

. . . . . . .nb Show that the solution to the system of three linear equations in three unknowns is given by the determinants . . . . . . . . . . . . . . . . . . . . . . . . cramer3. . a2 where = = —– Cramer’s Rule (Three Equations). . . . . . . . . .

.

−d1 b1 c1 .

.

.

−d2 b2 c2 .

.

−d3 b3 c3 x= D where a1 x + b1 y + c1 z + d1 a2 x + b2 y + c2 z + d2 = = 0 0 a3 x + b3 y + c3 z + d3 = 0 .

.

.

.

.

.

.

y= . .

.

a1 .

.

.

a2 .

.

a3 −d1 −d2 −d3 .

.

.

.

.

.

c3 .

c1 c2 D .

.

a1 .

.

D = .

a2 .

.

and z = . a3 b1 b2 b3 .

.

a1 .

.

.

a2 .

.

a3 b1 b2 b3 .

.

.

.

.

.

−d3 .

−d1 −d2 D .

c1 .

.

.

c2 .

. .

c3 .

. . . . . . . . . . . . . . . . . . . . (−r. . . . θ + 2kπ). . . . polareqn. . . . . . . . A given point may have either of two general coordinate representations (r. . θ + (2k + 1)π). . . . . . . . —– Polar Equations. . . . . . . .nb A curve in polar coordinates may have more than one equation. . . . . . . . . . . .

—– . a linear equation Ax + By + C = 0 has only one representation in polar coordinates given by r(A cos θ + B sin θ) + C = 0. Show that in spite of the potential for multiple equations in polar coordinates. the second equation may yield other equations of the curve. Hence a given curve r = f (θ) may have either of the two equation forms r −r = f (θ + 2kπ).50 Chapter 4 Equations and Graphs for any integer k. Similarly. The first equation reduces to r = f (θ) when k = 0. but may lead to an entirely different equation of the same curve for another value of k. = f (θ + (2k + 1)π).

y) whose coordinates satisfy the equation Ax + By + C = 0 are said to be on the line. −1<D<D. y0 ) and P1 (x1 . The Descarta2D function Sketch2D[objList] plots a sketch of the objects in the object list. Solution. C]. There are many forms the equation can exhibit. coords] where the coords are lists of the (x. In[1]: Sketch2D@8Line2D@2. 2) and (3. Plot the line segment between the points (−1. A line segment is the set of points on a line between two points on the line. B. y) coordinates of the start and end points of the line segment. −1). the line segment. This chapter develops in detail the analytic geometry of a line and its close relation. 2. y1 ). In Descarta2D the line Ax + By + C = 0 is represented as Line2D[A. 83. 51 . In Descarta2D a line segment is represented as Segment2D[coords. −3. depending on how we wish to construct the line. 1D. Segment2D@8−1. The graph of such a linear equation is a straight line.Chapter 5 Lines and Line Segments The curve with the simplest equation is a straight line. Line2D@1. Points (x.1 General Equation Every linear equation in two unknowns can be written in the form Ax + By + C = 0. Plot the lines 2x − 3y + 1 = 0 and x + 2y + 2 = 0. 2D. P0 (x0 . Example. 2<. 5.

The Descarta2D function IsOn2D[point. l1D. Sketch2D@8l1. 1D.52 Chapter 5 Lines and Line Segments 3 2 1 0 -1 -2 -3 -4 -2 0 2 4 Example. p2. 5 ê 3<D. 1). Determine which of the points (−1. −3. IsOn2D@p4 = Point2D@8−3. 53 ). IsOn2D@p3 = Point2D@83. 1<D. p4<D. 3 2 1 0 -1 -2 3 2 1 0 -1 -2 -4 -2 0 2 4 -4 -2 0 2 4 . False. l1D. (3. IsOn2D@p2 = Point2D@82. (2. − 35 ) are on the line 2x − 3y + 1 = 0. In[3]: 8IsOn2D@p1 = Point2D@8−1. −5 ê 3<D. 1<D. True. p3<D. Solution. True< In[4]: Sketch2D@8l1. l1D. 1) and (−3. p1. In[2]: l1 = Line2D@2. line] returns True if the point is on the line. l1D< Out[3] 8False.

Inclination and Slope The angle. measured counter-clockwise from the +x-axis to a line. tan θ. The slope of the line containing a line segment from point (x0 . The function Slope2D[lnseg] returns the slope of the line containing the line segment. θ = tan−1 (−A/B). . It is clear that the points (−C/A. The tangent of this angle.1 General Equation 53 y P2 Hx2 . y2 L y2 . y0 ) to point (x1 . 1) and (3.x1 q x Figure 5. Therefore.y1 P1 Hx1 . θ. x1 − x0 Example.5. 2). the function Slope2D[line] returns the slope of a line. Find the angle of inclination (in degrees) and the slope of the line x − y + 4 = 0.1: Inclination and slope of a line. It is evident from Figure 5. (generally designated by the letter m) is called the slope of the line. Solution. is called the inclination of the line. Find the slope of the line segment between the points (−2. The Descarta2D function Angle2D[line] returns the inclination of a line (in radians).1 that the slope of line P1 P2 is given by m = tan θ = y2 − y1 . −C/B) are on the line since they satisfy the equation of the line. 0) and (0. y1 L q x2 . the slope of L is given by A 0 − (−C/B) =− m= (−C/A) − 0 B and the angle of inclination. x2 − x1 The formula is independent of the position and order of the two points involved. y1 ) can be determined directly from the formula given for lines as m= y1 − y0 . Let L ≡ Ax + By + C = 0 be the general equation of a line.

−2<. 5. Since θ2 tan θ2 m2 π = θ1 ± 2 π = tan θ1 ± 2 = − cot θ1 1 = − tan θ1 1 = − . Two lines are perpendicular if the angle between them is a right angle. Additionally. m1 Therefore. 2< Hint. m1 = −1/m2 . −1. determine which pairs are perpendicular.54 Chapter 5 Lines and Line Segments In[5]: l1 = Line2D@1. Slope2D@l1D. 8Angle2D@l1D ê Degree êê N. The Mathematica symbol Degree equals the constant Ÿ Mathematica π/180. 2<DD< Out[5] 845. Let m1 = tan θ1 and m2 = tan θ2 be the slopes of two perpendicular lines. Example. coincident lines are also considered to be parallel. 1.. 4D. The syntax expr //N is equivalent to N[expr]. 83. and (c) 3x − 4y + 2 = 0 and 2x + 4y − 1 = 0. . Determine which of the following pairs of lines are parallel: (a) 2x − 3y + 4 = 0 and −4x + 6y − 3 = 0.2 Parallel and Perpendicular Lines If two lines have the same slope they are called parallel lines. the slopes of two perpendicular lines are negative reciprocals of each other related by the equation. The Mathematica function N[expr] produces a numerical approximation of an expression. Descarta2D provides functions for querying whether pairs of lines are parallel or perpendicular. In the previous example dividing by Degree converts the angle from radians to degrees. Slope2D@Segment2D@81. (b) x + 2y − 3 = 0 and −2x + y − 1 = 0. If two lines share all their points they are said to be coincident .

IsPerpendicular2D[line. l2<D. 4D. 1. the lines in pair (b) are perpendicular. 8IsParallel2D@l3. l2 = Line2D@−4. −1D. In the case of two intersecting lines. l3 = Line2D@1. −3D. False<< Therefore. 2D. it follows that tan θ12 = tan (θ2 − θ1 ) = tan θ2 − tan θ1 1 + tan θ1 tan θ2 which. The function IsParallel2D[line. IsPerpendicular2D@l1. l2D. 3 2 1 0 -1 -2 -4 -2 0 5. 2. True<. −1D. l6<D. otherwise. In[6]: l1 = Line2D@2. l6 = Line2D@2.3 Angle between Lines 55 Solution. IsPerpendicular2D@l3. and the lines in pair (c) are neither parallel or perpendicular. l4 = Line2D@−2. otherwise.3 2 4 4 2 0 -2 -4 -4-2 0 2 4 3 2 1 0 -1 -2 -4 -2 0 2 4 Angle between Lines The angle between two non-intersecting (parallel or coincident) lines is zero (radians or degrees). line] returns True if the two lines are perpendicular. In[7]: 88IsParallel2D@l1. −3. Sketch2D@8l3. l4<D. l6D<< Out[7] 88True. 4. In[8]: Sketch2D@8l1. 6. Since θ12 = θ2 − θ1 . yields tan θ12 = m2 − m1 . 1 + m1 m2 . it returns False. L1 and L2 . Sketch2D@8l5. IsPerpendicular2D@l5. −4. it returns False. 8False. l6D. l5 = Line2D@3. l4D<. line] will return True if the two lines are parallel. let θ12 be the angle between the lines measured counter-clockwise from L1 to L2 . l2D<. 8IsParallel2D@l5. the lines in pair (a) are parallel. in terms of slopes of the lines. −3D. False<.5. l4D. 8False.

Solution. is approximately 63. line] returns the angle between the two lines (measured in radians from the first line to the second line). l2 = Line2D@−2. The Descarta2D function Angle2D[line. 1. Let P (x.03444 The angle between the lines taken in the opposite order is 2. y2 ). −4D. In[10]: Sketch2D@8l1. 3 2 1 0 -1 -2 -3 -4 -2 0 2 4 In[11]: Angle2D@l2. . y1 ) and P2 (x2 . y) be any other point on the line as illustrated in Figure 5.4349◦. In[9]: Angle2D@l1 = Line2D@1. 3. Then by similar triangles y2 − y1 y − y1 = x − x1 x2 − x1 which is called the two–point form of a line.565◦) which is the supplement of the first angle (63. 2.10715 radians. P1 (x1 . 5. l2<D.2.4 Two–Point Form A line is determined by two distinct points on it.0344 radians (approximately 116. l1D êê N Out[11] 2. Determine the angle (in radians) between the lines x + 3y − 4 = 0 and −2x + 2y + 1 = 0.565◦ = 180◦).435◦ + 116. 1DD êê N Out[9] 1. The two–point form may also be written as (x − x1 )(y − y2 ) = (x − x2 )(y − y1 ).56 Chapter 5 Lines and Line Segments Example.10715 The result.

y2 L PHx.4 Two–Point Form 57 y P2 Hx2 .2: Two–point form of a line.y1 x . In determinant form the equation is given by . y1 L y .y1 P1 Hx1 .x1 x2 . In general form the line is given by − (y2 − y1 ) x + (x2 − x1 ) y + x1 y2 − x2 y1 = 0.x1 x Figure 5. yL y2 .5.

.

x .

.

.

x1 .

.

x2 y y1 y2 .

.

.

.

.

= 0. .

1 .

The Descarta2D function Line2D[point. point] constructs the line through the two points. −1) and (3. −1<D. −1D< In[13]: Sketch2D@8l1. . the function Line2D[lnseg] constructs a line defined by the start and end points of a line segment. p1. 1 1 Example. 5. l2 = Line2D@Segment2D@p1. p2<D. p2DD< Out[12] 8Line2D@−3. Determine the line through the points (−2. p2D. p2 = Point2D@83. In[12]: p1 = Point2D@8−2. Solution. 2). Line2D@−3. −1D. 8l1 = Line2D@p1. 5. Alternately. 2<D.

83. {x2 . y1 }. 2<D Out[14] Line2D@−3. y3 ) are collinear if their coordinates satisfy the determinant equation . y2 }] is also provided to allow construction of a line by specifying two point coordinates. P2 (x2 . −1D Collinear Points In a previous chapter it was demonstrated that the three points P1 (x1 . y2 ) and P3 (x3 . 5. −1<. In[14]: Line2D@8−2.58 Chapter 5 Lines and Line Segments 2 1 0 -1 -2 -4 -2 0 2 4 The Descarta2D function Line2D[{x1. y1 ).

.

.

x1 y1 1 .

.

.

.

.

.

x2 y2 1 .

= 0. .

.

.

x3 y3 1 .

3.5 Point–Slope Form Since m = y2 − y1 . 5. . the two–point form of a line can be reduced to the point–slope form x2 − x1 y − y1 = m (x − x1 ) as shown in Figure 5. The line defined by P1 and P2 must be satisfied by P3 yielding the condition − (y2 − y1 ) x3 + (x2 − x1 ) y3 + x1 y2 − x2 y1 = 0 which can be put into the more symmetrical form y1 (x2 − x3 ) + y2 (x3 − x1 ) + y3 (x1 − x2 ) = 0. In general form the equation of the line is mx − y + (y1 − mx1 ) = 0. This condition may be stated in a more intuitive form using the two–point form of a line.

5. A vertical line cannot be represented in point–slope form.5 Point–Slope Form 59 y m 1 P1 Hx1 .3: Point–slope form of a line. y1 L x Figure 5. In determinant form the point–slope form is given by .

.

.

x y 1 .

.

.

.

.

.

x1 y1 1 .

= 0. .

.

.

1 m 0 .

3 2 1 0 -1 -4 -2 0 2 4 . The Descarta2D function Line2D[point. 2) with a slope of 1/2. 1 ê 2D 1 2 3 2 Out[15] Line2DA €€€€€ . 2<D. Determine the line through the point (1. Example. m] constructs a line through the point with a given slope. −1. In[15]: l1 = Line2D@p1 = Point2D@81. l1<D. Solution. €€€€€ E In[16]: Sketch2D@8p1. m.

and using mx − y + (y1 − mx1 ) = 0 yields A2 x + B2 y − (A2 x1 + B2 y1 ) = 0. In determinant form the equation is .60 Chapter 5 Lines and Line Segments Line Through a Point Parallel to a Line A line through a given point P1 (x1 . y1 ) parallel to a given line A2 x + B2 y + C2 = 0 would have a slope m = −A2 /B2 . The equation can also be written B2 (x − x1 ) = A2 (y − y1 ).

.

x .

.

.

x1 .

.

B2 y y1 −A2 .

1 .

.

.

1 .

= 0. .

0 .

in a simpler form. Line Through a Point Perpendicular to a Line A line through a given point P1 (x1 . In determinant form the equation is . y1 ) perpendicular to a given line A2 x + B2 y + C2 = 0 would have a slope m = −1/m2 = B2 /A2 . or. A2 (y − y1 ) = B2 (x − x1 ). and using mx − y + (y1 − mx1 ) = 0 yields B2 x − A2 y + (A2 y1 − B2 x1 ) = 0.

.

x .

.

.

x1 .

.

A2 y y1 B2 .

1 .

.

.

1 .

= 0. .

0 .

1) which are parallel and perpendicular to the line 3x − 2y + 1 = 0. Example. Line2D[point. . Find the lines through the point (2. Parallel2D] constructs a line through the point and parallel to the line and Line2D[point. Solution. line. line. Perpendicular2D] constructs a line through the point and perpendicular to the line.

−3.5 Point–Slope Form 61 In[17]: p1 = Point2D@82. l2. line] returns the same results as Line2D[point. l3<D. l1 = Line2D@3. In[18]: 8l2 = Line2D@p1. 2. −3. 1<D. l1D Out[20] Line2D@−2. Perpendicular2D]. −2. line. Parallel2DD. The function Line2D[point. l1. l1. 1D. 4 2 0 -2 -4 -2 0 2 4 Descarta2D Hint. Perpendicular2DD< Out[18] 8Line2D@−3. 4D. In[20]: Line2D@p1. l3 = Line2D@p1. y1 ). Line2D@−2. 7D Horizontal and Vertical Lines Through a Point Given a point P1 (x1 . l1.5. the keyword Perpendicular2D is optional and may be omitted. a horizontal line whose slope is 0 will have the equation y − y1 = 0. In determinant form the equation is . 7D< In[19]: Sketch2D@8p1.

.

.

x y 1 .

.

.

.

.

.

x1 y1 1 .

. = 0.

.

.

1 0 0 .

Similarly. a vertical line (whose slope is infinite) has the equation x−x1 = 0 and its determinant equation is .

.

.

x y 1 .

.

.

.

.

.

x1 y1 1 .

= 0. .

.

.

0 1 0 .

.

0] constructs a horizontal line through the point. 2D. 2<D. 0D. The function Line2D[point. The function Line2D[point.6 Slope–Intercept Form Specializing the point P1 (x1 . The slope–intercept form cannot be used to represent vertical lines. y1 ) in the point–slope form of a line to the y-intercept point (0. In[21]: p1 = Point2D@83.62 Chapter 5 Lines and Line Segments Example. Solution. l1. l2 = Line2D@p1. InfinityD< Out[21] 8Line2D@0. Line2D@1. 4 2 0 -2 -4 -4 -2 0 2 4 5. Find the horizontal and vertical lines through the point (3. l2<D. −1. Infinity] constructs a vertical line through the point.4 gives the slope–intercept form of a line y = mx + b. In determinant form the point–slope form is given by . 8l1 = Line2D@p1. In general form the equation of the line is mx − y + b = 0. −3D< In[22]: Sketch2D@8p1. b) as shown in Figure 5. 0. 2).

.

.

x y 1 .

.

.

.

.

.

0 b 1 .

. = 0.

.

.

1 m 0 .

Example. The Descarta2D function Line2D[point. Solution. . Find the line with a y-intercept of 1 and a slope of 2. m] constructs a line through the point with the given slope.

1<D. 8−3. l1<. bL x Figure 5. {ymin . In[23]: l1 = Line2D@p1 = Point2D@80. overriding the default setting which is PlotRange->Automatic. 3<<D. 1D In[24]: Sketch2D@8p1. −1.6 Slope–Intercept Form 63 y m 1 P1 H0. 3 2 1 0 -1 -2 -3 -2-1 0 1 2 3 Descarta2D Hint. . The PlotRange option is useful for focusing on a specific portion of the plot. The Sketch2D command option PlotRange->{{xmin. 3<. PlotRange −> 88−3. xmax }. ymax }} used in the example above explicitly sets the minimum and maximum coordinate range along the x-axis and y-axis.4: Slope–intercept form of a line. 2D Out[23] Line2D@2.5.

In determinant form the intercept form is given by . bL P1 Ha.64 Chapter 5 Lines and Line Segments y P2 H0. 0L x Figure 5. nor can it be horizontal or vertical.5: Intercept form of a line. rearranging. dividing Ax + By + C = 0 by C (C 6= 0) gives y x + = 1. in the general equation. a b In general form the equation of the line is bx + ay − ab = 0. 0) and (0. the intercepts are given by x = −C/A and y = −C/B. 5. or. Notice that a line in intercept form cannot pass through the origin. or.7 Intercept Form Specializing the two points in the two–point form to the intercepts (a. b) as shown in Figure 5.5 gives (y − b)/x = −b/a. (−C/A) (−C/B) Thus. the intercept form x y + = 1.

.

.

x y 1 .

.

.

.

.

.

a 0 1 .

= 0. .

.

.

0 b 1 .

Example. 0<D. point] constructs a line through the two points. l12 = Line2D@p1. p2 = Point2D@80. Solution. 1<D. p2D Out[25] Line2D@−1. −2. Find the line whose x-intercept is 2 and y-intercept is 1. In[25]: p1 = Point2D@82. 2D . The function Line2D[point.

. as the normal form of the equation of line L. using the point–slope form we obtain. This form of the equation of a straight line is called the normal form (sometimes the perpendicular form) because its coefficients involve the parameters ρ and θ associated with the normal or perpendicular segment OA to the line. We wish to determine the general equation of the line L. p2. Hence. y − ρ sin θ = − cot θ(x − ρ cos θ) which reduces to x cos θ + y sin θ − ρ = 0. l12<D. Normalize the lines 3x − 4y − 5 = 0 and 2x + y − 3 = 0. If C √is zero. To determine the coefficients of the normal form from the general form Ax + By + C = 0. Example. ρ sin θ) and the slope of L is − cot θ since L is perpendicular to OA which has slope tan θ.8 Normal Form 65 In[26]: Sketch2D@8p1.8 -2 0 2 4 Normal Form Consider a directed line segment OA of length ρ starting at the origin O and making an angle θ with the +x-axis as shown in Figure 5. ρ. The coordinates of A are (ρ cos θ. 3 2 1 0 -1 -4 5. The line L which is perpendicular to OA and passes through A is completely determined by the parameters ρ and θ. 2 2 2 2 ± A +B ± A +B ± A2 + B 2 √ The sign of A2 + B 2 is chosen to be opposite to that of C to make the constant term. positive. The process of dividing a linear equation by ± A2 + B 2 is called normalizing the line. the line passes through the origin.5. √ we divide by ± A2 + B 2 yielding B C A √ x+ √ y+ √ = 0.6.

radians are the angular units required in all Descarta2D functions. −4D êê N Out[28] Line2D@0. €€€€€€€€€€€ è!!! . Solution. Line2D@Line2D@2. Find the line 4 units from the origin whose normal makes an angle of 30◦ with the positive x-axis. −4.866025. − €€€€€ . Solution. 1. In[28]: Line2D@Cos@30 DegreeD. −5DD. Line2DA €€€€€€€€€€€ è!!! . The Mathematica symbol Degree is the constant π/180. Ÿ Mathematica Multiplying an angle in degrees by Degree (as illustrated in the previous example) converts the angle to radians. −1E. Sin@30 DegreeD. We apply directly the normal form of a line to determine the coefficients of the line in general form. In[27]: 8Line2D@Line2D@3. −3DD< 3 4 2 5 1 5 3 5 Out[27] 9Line2DA €€€€€ . − €€€€€€€€€€€ è!!! E= 5 5 Example.66 Chapter 5 Lines and Line Segments y A r r sinHqL L q O r cosHqL x Figure 5.D Hint.5. . The Descarta2D function Line2D[line] constructs a line with normalized coefficients.6: Normal form of a line. −4. 0.

x1 + p 2 A2 + B22 A2 + B22 If the point P1 is on line L2 . 2D. Example. −2D<. Point2DA9− €€€€€ . Point2D@p1. 2D. −4. p3. €€€€€€€€€ =E. €€€€€ =E. pts<D. l1 = Line2D@3. otherwise. p2 = Point2D@81. We note that the coefficients of the normalized form of L2 immediately give us the unit directions to offset P1 . 8Point2D@p2. In[31]: Sketch2D@8p1. so the desired coordinates of the offset point are ! dA2 dB2 . The distance d may be positive or negative allowing offsets in either direction parallel to the line. Point2DA9− €€€€€ . 0) a distance 2 in both directions along the line 3x − 4y + 1 = 0. €€€€€ =E. −2D<. the offset point will be on a line parallel to L2 . l1.8 Normal Form 67 Point Offset a Distance Along a Line Given a point P1 (x1 . 3 2 1 0 -1 -2 -4 -2 0 2 4 . −2D<< 3 11 13 1 5 5 5 5 13 1 3 11 9Point2DA9 €€€€€€€€€ . − €€€€€€€€€ =E=. d] offsets a point along a line a given distance. Point2D@p3. p2. −1<D. 1). l1. 2D. l1. line. Offset the points (−1. The Descarta2D function Point2D[point. y1 ) we wish to offset the point a distance d in the direction of a given line L2 ≡ A2 x + B2 y + C2 = 0. Point2DA9− €€€€€€€€€ . l1. l1. 8Point2D@p3. In[29]: p1 = Point2D@8−1. (1. In[30]: pts = 88Point2D@p1. p3 = Point2D@80. l1. Solution. d. The distance may be positive or negative.5. 1<D. 0<D. 5 5 5 5 8 6 8 6 9Point2DA9 €€€€€ . 1D. Point2D@p2. then the offset point will also be on L2 . −1) and (0. − €€€€€ =E== 5 5 5 5 Out[30] 99Point2DA9 €€€€€ . − €€€€€ =E=. l1. y1 + p 2 .

3 2 1 0 -1 -2 -3 -4 -2 0 2 4 Distance from a Point to a Line The normal form of a line provides a convenient method for determining the distance from a point to a line. l2. . Solving for d and squaring to remove the ambiguous sign yields 2 d2 = (px1 + qy1 − r) . The general equations of these two lines are easily determined from the normal form as B C A √ x+ √ y+ √ ± d = 0. −2D< Out[32] 9Line2DA1. Find and plot the two lines offset a distance of two units from the line x − 3y + 1 = 0. the two lines will be separated by a constant distance. d. where p2 + q 2 = 1. d] constructs a line offset a given distance. 2 2 2 2 2 A +B A +B A + B2 Example. 1D. is called offsetting the line. 2D. d. from a line. Solution. Consider a normalized line L ≡ px + qy − r = 0. l3 = Line2D@l1. 1 − 2 è!!!!! è!!!!! 10 E.68 Chapter 5 Lines and Line Segments Line Offset a Distance from a Line If a line L1 is parallel to a second line L2 . The process of constructing a line such as L2 which is parallel to L1 at a given distance. Line2DA1. In[32]: l1 = Line2D@1. A line M offset a distance d from L clearly has the equation M ≡ px + qy − r ± d = 0. d. There are two lines offset a distance d from a line Ax + By + C = 0. 8l2 = Line2D@l1. The distance may be positive or negative yielding one of the two possible offset lines. Any point P1 (x1 . 1 + 2 10 E= In[33]: Sketch2D@8l1. −3. y1 ) on M satisfies the equation of M . −3. The Descarta2D function Line2D[line. −3. px1 + qy1 − r ± d = 0. therefore. l3<D.

Line2D@3. Solution. 2DD 19 5 Out[34] €€€€€€€€€ 5. A1 B2 − A2 B1 6= 0. Example. the distance d from a point P1 (x1 . Find the distance from the point (3. The Descarta2D function Distance2D[point. A2 + B 2 where the sign is selected to produce the positive result. line] returns the distance from the point to the line. the lines are either parallel or coincident. coincident. or intersect in a single point. y).9 Intersection Point of Two Lines 69 Thus.9 Intersection Point of Two Lines Two lines L1 ≡ A1 x + B1 y + C1 = 0 and L2 ≡ A2 x + B2 y + C2 = 0 may be parallel. −2) to the line 3x − 4y + 2 = 0. . If the lines are coincident the ratio of their corresponding coefficients will be a constant k= and the conditions . −4. The resulting formula for the coordinates of point P is   B1 C2 − B2 C1 A1 C2 − A2 C1 . In the case they where intersect in a single point. −2<D.5. A1 B2 − A2 B1 A1 B2 − A2 B1 In the case where the denominators are zero. the coordinates of the point may be determined by solving the system of equations A1 x + B1 y + C1 = 0 A2 x + B2 y + C2 = 0 for the intersection point P (x. y1 ) to a line Ax + By + C = 0 in general form is d=± Ax1 + By1 + C √ . In[34]: Distance2D@Point2D@83.

.

A .

1 .

.

A2 B1 B2 .

.

.

.

= 0. .

.

.

−C .

1 .

.

−C2 B1 C1 A1 = = . . A2 B2 C2 B1 B2 are sufficient to insure the lines are coincident.

.

.

A .

.

1 .

.

= 0 and .

.

A2 .

−C1 −C2 .

.

.

.

=0 .

.

B2. 7D.70 Chapter 5 Lines and Line Segments Example. Perpendicular2DD. C2D. line] constructs the intersection point of the two lines. This line is then intersected with the given line which yields the desired projected point. y1 ) onto the line L2 ≡ A2 x + B2 y + C2 = 0 is as follows: In[37]: Clear@x1. We construct a line through the point. if the line P1 P2 is perpendicular to L2 . l2 = Line2D@A2. B2. l2 = Line2D@3. perpendicular to the given line. €€€€€€€€€ =E In[36]: Sketch2D@8l1. p12<D. Find the intersection point of the two lines whose equations are 2x − 3y + 7 = 0 and 3x + 7y − 2 = 0. l2D êê Simplify B22 x1 − A2 HC2 + B2 y1L A2 + B2 −B2 HC2 + A2 x1L + A22 y1 A2 + B2 Out[37] Point2DA9 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ € . Using Descarta2D. p2 = Point2D@l1. l1 = Line2D@p1. Solution. l2. A2. we can build upon concepts and formulas already established. To determine the coordinates of a point projected onto a line.10 -2 0 2 4 Point Projected Onto a Line A point P1 is said to be projected onto a point P2 on a line L2 . −2DD 43 23 25 23 Out[35] Point2DA9− €€€€€€€€€ . the sequence of commands to project point P1 (x1 . 4 3 2 1 0 -1 -4 5. y1. −3. €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ € =E 2 2 2 2 . C2D. y1<D. l2. In[35]: p12 = Point2D@l1 = Line2D@2. The Descarta2D function Point2D[line. 7. p1 = Point2D@8x1.

a= √ 2 2 2 2 A +B A +B A2 + B 2 Simple algebra confirms that the two forms are equivalent.5. As shown in the next example. y1 ) is on the line. Descarta2D provides a specific function that projects a point onto a line. 8−1. p2. 1<. Project the point (−3. Solution. l2 = Line2D@5. 4 3 2 1 0 -1 -3 -2 -1 0 1 . y1 ) since d. line] projects a point onto a line and returns the projected point. PlotRange −> 88−4. Example. If the point P1 (x1 . The Descarta2D function Point2D[point. then it is clear from the second form that the projected point P2 has coordinates (x1 . which is the signed distance from the point to the line. b= √ and d = . −3. In[38]: p2 = Point2D@p1 = Point2D@8−3.10 Point Projected Onto a Line 71 In standard mathematical notation the coordinates of the projected point P2 are  B22 x1 − A2 (C2 + B2 y1 ) A22 y1 − B2 (C2 + A2 x1 ) . 4DD 1 2 1 2 Out[38] Point2DA9− €€€€€ . 2) onto the line 5x − 3y + 4 = 0. 2<D. y1 − bd) where B Ax1 + By1 + C A √ . l2<. A22 + B22 A22 + B22  . is equal to zero when P1 is on L2 . The coordinates of the projected point can also be written in a somewhat more intuitive form given by (x1 − ad. €€€€€ =E In[39]: Sketch2D@8p1. 4<<D.

y1 ). y1D. Line2D@Point2D@lsD. Line2D@lsD. we wish to find the line that is the perpendicular bisector of the line segment. €€€€€ Hx02 − x12 + y02 − y12LE In standard mathematical notation the equation of the line is 2(x1 − x0 )x + 2(y1 − y0 )y + x20 − x21 + y02 − y12 = 0.11 Line Perpendicular to Line Segment Given a line segment bounded by the points P0 (x0 . ls = Segment2D@8x0. y1<D. 8x1. y0<. y0 ) and P1 (x1 . Using Descarta2D we merely construct the line perpendicular to the line segment through its midpoint. x1. In determinant form the equation is given by . In[40]: Clear@x0. y0. Perpendicular2DD êê Simplify 1 2 Out[40] Line2DA−x0 + x1.72 Chapter 5 Lines and Line Segments 5. −y0 + y1.

.

x y .

.

y0 + y1 .

x0 + x1 .

.

y0 − y1 −(x0 − x1 ) .

.

.

.

.

= 0. .

0 .

85. l1. Point2D@85. Point2D@8−3. −1<D. Find the line that is the perpendicular bisector of the line segment bounded by the points (−3. 3<D. l1 = Line2D@ls1. 3). 8. −1<. In[41]: ls1 = Segment2D@8−3. The function Line2D[lnseg. 3<D<D. 1 2 Example. Solution. Perpendicular2DD Out[41] Line2D@16. −1) and (5. Perpendicular2D] constructs the perpendicular bisector of the line segment. 4 2 0 -2 -4 -2 0 2 4 . −24D In[42]: Sketch2D@8ls1.

A21 + B12 A2 + B22 Equating the two yields the equation of the angle bisectors given by A2 x + B2 y + C2 A1 x + B1 y + C1 p =± p 2 . è!!!!! è!!!!! è!!!!! è!!!!! è!!!!! è!!!!! Line2DA 10 + 17 .5. If P (x. −2 10 − 2 17 E. l12<D. 4 10 − 3 17 . the resulting line 16x+ 8y − 24 = 0. 2 2 A1 + B1 A2 + B22 Example. that the computation may take a significant amount of time to complete and. Solution. The Mathematica function Simplify[expr] (or expr //Simplify) can be used to simplify the result of any Descarta2D computation. In[43]: Line2D@16. 4 10 + 3 17 . however. line}] returns a list of two lines that are the angle bisectors of the two given lines. . no simpler expression is found. 2D.12 Angle Bisector Lines 73 Descarta2D Hint. Be aware. The Descarta2D Line2D object has a special Simplify function that removes common factors from the coefficients of a line. then using the distance formula for both lines yields d=± A2 x + B2 y + C2 A1 x + B1 y + C1 p and d = ± p 2 . sometimes. 4. l2. −3. −3D 5. 1. In the previous example. The Descarta2D function MedialLoci2D[{line. −2 10 + 2 17 E= Out[44] 9Line2DA 10 − In[45]: Sketch2D@8l1. 8. l2 = Line2D@1. resulting in the equation 2x + y − 3 = 0. y) is an arbitrary point on the angle bisectors. In[44]: l12 = MedialLoci2D@8l1 = Line2D@1. −2D<D è!!!!! è!!!!! è!!!!! è!!!!! è!!!!! è!!!!! 17 . −24D êê Simplify Out[43] Line2D@2.12 Angle Bisector Lines The angle bisectors of two lines A1 x + B1 y + C1 = 0 and A2 x + B2 y + C2 = 0 are defined by the locus of points equidistant from the two lines. can be expressed in a simpler form by dividing the coefficients by 8. Find and plot the angle bisector lines of the lines x − 3y + 2 = 0 and x + 4y − 2 = 0.

74 Chapter 5 Lines and Line Segments 4 2 0 -2 -4 -4 -2 0 2 4 5. common point are called concurrent lines.13 Concurrent Lines Three lines that intersect in a single. Using Mathematica we will prove that three lines A1 x + B1 y + C1 = 0 A2 x + B2 y + C2 = 0 A3 x + B3 y + C3 = 0 will be concurrent when the determinant of their coefficients is zero. The determinant equation is given by .

.

.

A1 B1 C1 .

.

.

.

.

.

A2 B2 C2 .

= 0. .

.

.

A3 B3 C3 .

x2. l2 = P0 P2 and l3 = P0 P3 . y3D. We create four points. p2 = Point2D@8x2. B2. where P0 will be the common point of the three lines l1 = P0 P1 . Det@88A1. C2<. #D&. p0 = Point2D@8x0. In[46]: Clear@x0. y1<D. C1<. y0<D. In[47]: 8A1. P3 and P4 . C2< = List @@ l2. P1 . x3. p2. l3< = Map@Line2D@p0. Line2D@y0 − y3. −x0 + x3. p1 = Point2D@8x1. B1. y2. B1. 8A2. B3. B3. 8A3. p3 = Point2D@8x3. 8A2. Line2D@y0 − y2. y1. 8l1. −x0 + x2. −x1 y0 + x0 y1D. 8A3. p3<D Out[46] 8Line2D@y0 − y1. C3<<D êê Simplify Out[47] 0 . −x3 y0 + x0 y3D< We now extract the coefficients of the lines and apply the postulated determinant. −x0 + x1. l2. y0. P0 . y3<D. y2<D. B2. x1. C1< = List @@ l1. 8p1. −x2 y0 + x0 y2D. C3< = List @@ l3.

l2 = Line2D@2. otherwise. −1.5. Mathematica Hint. L is clearly an equation of the first-degree as it can be written ((1 − k)A1 + kA2 )x + ((1 − k)B1 + kB2 )y + ((1 − k)C1 + kC2 ) = 0. it is also sufficient provided the slopes of the lines are distinct. l2. Consider the equation L ≡ (1 − k)L1 + kL2 = 0. l3 = Line2D@−1. Example. 11DD Out[48] True In[49]: Sketch2D@8l1. it returns False. the Apply function is used to convert a Line2D object into a list of coefficients. line. where k is an arbitrary constant. l3<. 1.14 Pencils of Lines 75 The condition defined by the determinant is therefore necessary. 6D. The Mathematica function Apply[f. Verify that the three lines given by x − y + 6 = 0. In the Mathematica statements above. The function IsConcurrent2D[line. 6 4 2 0 -2 -4 -6-4-2 0 2 4 6 5. .14 Pencils of Lines Pencil of Intersecting Lines Let L1 ≡ A1 x + B1 y + C1 = 0 and L2 ≡ A2 x + B2 y + C2 = 0 be the equations of two lines in the plane. −5D. CurveLength2D −> 12D. 2x + y − 5 = 0 and −x − 2y + 11 = 0 are concurrent. −2. In[48]: IsConcurrent2D@l1 = Line2D@1. line] returns True if the three lines are concurrent. expr] (or f @@ expr) Ÿ replaces the head of expr by f. Solution.

HL3 ê. 4 H1 − kL − 2 kD In[51]: pt = Point2D@84. Example. Such a family of lines is called a pencil of lines. Solution. of lines passing through P . k.76 Chapter 5 Lines and Line Segments Assume that L1 and L2 intersect in some point P (x. 3 2 1 0 -1 -2 -4 -2 0 2 4 . In[50]: Clear@kD. Furthermore. eqn = Equation2D@L3. 2). Coordinates2D@ptDD Out[51] 4 H1 − kL − 2 k + 4 H1 + kL + 2 H−2 H1 − kL + 3 kL == 0 In[52]: ans = Solve@eqnD 1 2 Out[52] 99k → − €€€€€ == In[53]: Sketch2D@8L1. The variable k can be set to a value in a manner that produces a line in the pencil that will satisfy one additional condition. then. −2D. −2 H1 − kL + 3 k. Pencil2D] constructs a line representing the pencil of lines (1 − k)L1 + kL2 . L now represents a family. Pencil2DD Out[50] Line2D@1 + k. L2 = Line2D@2. coords] returns a Mathematica equation that establishes the condition of the point being on the line. line. pt<D. Find the family (pencil) of lines that pass through the intersection point of x − 2y + 4 = 0 and 2x + 3y − 2 = 0. y) = 0 and L2 (x. This is a useful technique for solving certain types of geometric problems as demonstrated in the next example. Equation2D[line. or system. by definition. Find the value of k and the associated member of the family that passes through the point (4. 3. ans@@1DDL. L1 (x. since P is on both lines. Line2D[line. 2<D. L2. −2. y) = 0. L3 = Line2D@L1 = Line2D@1. k. 4D. y).

Solution. .14 Pencils of Lines 77 y L PHx. since the slope m of L is given by m= − sin θ = tan θ − cos θ we can create a line with any given slope. Find the parametric equation of a pencil of lines passing through the point (2. can be represented using θ = π/2.7: Pencil of lines through a point. L is parameterized by the angle θ and the coordinates of P are given by x = x1 + cos θ and y = y1 + sin θ. A complete pencil of lines. whose slope is infinite. y) as shown in Figure 5. Example. yL 1 P1 Hx1 . θ. y1 L sinHqL q cosHqL x Figure 5. y1 ) is on L as the coordinates of P1 satisfy the equation of L.5. A vertical line. 3). The equation of the line as determined by the two–point form is given by L ≡ −x sin θ + y cos θ + x1 sin θ − y1 cos θ = 0. therefore.7. y1 ) and P (x. The function Line2D[point. Also. Clearly. Pencil2D] constructs a line parameterized by angle θ and passing through the given point. Pencil of Lines Through a Point Consider the equation of a line L passing through points P1 (x1 . the point P1 (x1 . can be created for values 0 ≤ θ < π.

Pencil2DD Out[54] Line2D@−Sin@tD. 5. p0 = Point2D@Point2D@80. as the parameter of the pencil. Cos@tD. For example. l1 = Line2D@Point2D@82. The hypotenuse of this triangle is obviously of length t since !2 !2 A1 t B1 t 2 2 + p 2 = t2 . 0<D. cannot represent vertical lines. 10D ê 10DD. Pi ∗ Range@0.15 Parametric Equations We wish to formulate parametric equations for the line L1 ≡ A1 x + B1 y + C1 = 0. Using Descarta2D we can determine the point P0 on L1 nearest the origin by projecting the origin onto L1 . 3<D. C1DD A1 C1 A1 + B1 B1 C1 A1 + B1 Out[56] Point2DA9− €€€€€€€€€€€€€€€€€€€€€€€€€€ 2 2 . B1. In[56]: Clear@A1. B1. This approach yields the parameterized pencil of lines mx − y + y1 − mx1 = 0.78 Chapter 5 Lines and Line Segments In[54]: Clear@tD. t −> #L&. we will specify that we desire a particular parameterization with the properties that the point nearest the origin will be at parameter value t = 0. the parameters t = ±2 will generate the pair of points at a distance two from the point on the line nearest the origin. m. and the other points on the line will be parameterized by distance along the line. C1D. (at) + (bt) = p 2 2 2 A1 + B1 A1 + B1 . −3 Cos@tD + 2 Sin@tDD The following commands plot several members of this pencil of lines. In[55]: Sketch2D@Map@Hl1 ê. Line2D@A1. − €€€€€€€€€€€€€€€€€€€€€€€€€€ 2 2 =E Now p consider a right trianglep with sides at and bt as shown in Figure 5. 6 4 2 0 -2 -4 -4 -2 0 2 4 6 A simpler parameterization involves applying the point–slope form of a line and using the slope. t. Since there are an infinite number of valid parameterizations. however.8. In this triangle a = A1 / A21 + B12 and b = B1 / A21 + B12 ). This parameterization.

0. Solution. C][t] returns the coordinates of the point at parameter value t on the line. Also the slope is given by m= A1 a (y0 − at) − y0 =− =− (x0 + bt) − x0 b B1 which is the slope of the desired line.b t. −1. 1.294427.a tL O x Figure 5.64721<.8: Parametric equation of a line. −1. coords = Map@l1@#D&. 8−1. 8−0.18885. Find the coordinates of the points on the line x − 2y + 3 = 0 for parameter values t = −2. 0. 2. y0 .38885. 1.305573<< In[58]: Sketch2D@8l1. coordsD<D. The Descarta2D function Line2D[A. Map@Point2D@#D&. y0 L t at bt Pt Hx0 + . . In[57]: l1 = Line2D@1.09443<.15 Parametric Equations 79 y P0 Hx0 . 1. B. 8−2.752786<. 3D. 0. −2.5. 80. Therefore. 0. A1 + B12 A1 + B12 = − Example. 2<D êê N Out[57] 881.6. L1 . 1. the parametric equations of the line are x y B1 t A1 C1 +p 2 A21 + B12 A1 + B12 B1 C1 A1 t = − 2 −p 2 .49443. 2. Plot the lines and the points. 8−2.2<.

y1 }][t] returns the coordinates of the point on a line segment at parameter value t. In the previous example Map is used to evaluate a line using a list of parameter values. x2. 0). Point2D@8x2. 1/2 and 1 on the line segment whose start and end points are (−2. y1. The Mathematica function Map[f. .80 Chapter 5 Lines and Line Segments 3 2 1 0 -1 -4 -2 0 2 4 Mathematica Hint. y0 }. y2<D. and values 0 < t < 1 produce coordinates of points proportionally spaced in between P0 and P1 . dD d H−x1 + x2L d H−y1 + y2L Out[59] Point2DA9x1 + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! € . {x1 . 1) and (1. Solving for d = tD and substituting d into the Mathematica output above yields the parametric equations x y = x1 + t(x2 − x1 ) = y1 + t(y2 − y1 ). To what point does the parameter value t = −1 correspond? Plot the objects. pt = Point2D@Point2D@8x1. respectively. dD. y) on the directed line P0 P1 . y2. Let d be the distance from P0 to a general point P (x. Line Segment We wish to define the parametric equations for a line segment such that the parameter value t = 0 produces the coordinates of the start point P0 . t = 1 produces the coordinates of the end point P1 . expr] (or f /@ expr) Ÿ applies to f to each element on the first level in expr. y1 + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! € =E H−x1 + x2L2 + H−y1 + y2L2 H−x1 + x2L2 + H−y1 + y2L2 p Let t = d/D where D = (x2 − x1 )2 + (y2 − y1 )2 is the distance from P0 to P1 . Example. Find the coordinates of the points at parameter values 0. We use Descarta2D to produce the formulas for the coordinates of P : In[59]: Clear@x1. y1<D. The function Segment2D[{x0. Solution.

1<. . . 0<D. . 1<. .nb Show that the point of intersection of the lines x y x y + = 1 and + =1 a b b a is —–  ab ab . . . 5. at the same distance from P0 as P1 .nb Demonstrate that the distance. coordsD<D.lnsdst. . . . . . . . . . . . . . but in the opposite direction. . . . . 0. . . . . . . 0<= In[61]: Sketch2D@8l1. . . . . . 81. coords = Map@l1@#D&. . . intrsct. . 8−2. d. . . . . . . . . 1 ê 2. . Map@Point2D. . .16 Explorations 81 In[60]: l1 = Segment2D@8−2. . . . 2 1.5. . . . . . . . .5 1 0. 9− €€€€€ . . .16 Explorations Distance between Parallel Lines. . . (a + b) (a + b)  . 1<D 1 2 1 2 Out[60] 98−5. . between two parallel lines Ax + By + C1 = 0 and Ax + By + C2 = 0 is given by r d= (C2 − C1 )2 . 2<. . . . . . A2 + B 2 —– Intersection of Lines in Intercept Form. 81. . .5 0 -5 -4 -2 -3 -1 0 1 The point at parameter value t = −1 is on the line connecting points P0 and P1 . . . . 8−1. . €€€€€ =.

. . .nb Show that the vertical distance. . . . y1 ) to a line whose equation is Ax + By + C = 0 is given by . . .82 Chapter 5 Lines and Line Segments Equations of Perpendicular Lines. . . . . . . . . . . . lnsperp. . . . . . . . . . lndist. dv . . . . . . . . . . . . . . . . . .nb Show that the pair of lines ax + by + c = 0 and bx − ay + c0 = 0 are perpendicular. . . . . . . . . . . . . . . . Show that the pair x y − + c0 = 0 ax + by + c = 0 and a b is also perpendicular. . —– Vertical/Horizontal Distance to a Line. . . . from a point (x1 . . . . . . . . .

.

.

(Ax1 + By1 + C) .

.

dv = .

.

.

is given by . B and the horizontal distance. dh .

.

.

(Ax1 + By1 + C) .

.

..

dh = .

.

. . . . . . . . . . . . . . . . . .nb Show that the general equation of a line Ax + By + C = 0 is coincident with the line . . . . . . A —– Line General Equation Determinant. . . . . . . . .lndet. . . . . . . . .

.

.

.

x y 1 .

.

.

2 2 .

. = 0.

−AC −BC A + B .

.

.

.

.

. —– Intersection Point of Two Line Segments. . . . . (x4 − x3 )(y1 − y2 ) − (x2 − x1 )(y3 − y4 ) . . . . . . . —– Line Segment Cut by Two Lines. . . . . . B −A 0 given in determinant form. Implement the solution as a numerical Mathematica function. . . . . . . . Describe a procedure for finding the lines through P0 such that L1 and L2 cut off a line segment of length S > 0.nb Let L1 and L2 be two intersecting lines and P0 a point.nb Show that the intersection point of the lines underlying two line segments P1 P2 and P3 P4 in terms of the coordinates of the four points is given by x = y —– = (x2 − x1 )(x3 y4 − x4 y3 ) − (x4 − x3 )(x1 y2 − x2 y1 ) (x4 − x3 )(y1 − y2 ) − (x2 − x1 )(y3 − y4 ) (y3 − y4 )(x1 y2 − x2 y1 ) − (y1 − y2 )(x3 y4 − x4 y3 ) . . . . . . . . . . lnsegpt. . . . . . . . . . . . . . . . . . . . . . lnlndist. . . . . . . . . . . . . . . . . . .

16 Explorations 83 Intersection Parameters of Two Line Segments. . What is the significance of the values of t1 and t2 with respect to the standard parameter range for a line segment? —– . . . . . . . . . . . . . of the intersection point of two line segments in terms of the end point coordinates is given by t1 = t2 = x1 (y3 − y4 ) − x3 (y1 − y4 ) + x4 (y1 − y2 ) D −x1 (y2 − y3 ) + x2 (y1 − y3 ) − x3 (y1 − y2 ) D where D = (x1 − x2 )(y3 − y4 ) − (x3 − x4 )(y1 − y2 ). . t1 and t2 .nb Show that the parameter values. . . . . . . . lnsegint. .5.

.

k). If the center is at the origin the equation reduces to x2 + y 2 = r2 . Plot the circle. This chapter provides the underlying analytic geometry of a circle and provides a glimpse at some of the catalog of knowledge about circles. theorems and relationships involving circles. Circles have been studied since antiquity and there exists an enormous number of interesting properties. If the x-axis contains a diameter of the circle. where {h.Chapter 6 Circles The circle is the first curve we will study whose equation is of the second degree. Two particular cases of this equation occur frequently and deserve special mention. then the equation becomes x2 + y 2 = 2rx. and the y-axis touches the circle at its extremity. C is called the center and r the radius of the circle. Example. y) of the plane that have a constant distance r from a fixed point C(h. Using the formula for the distance between two points. 85 . 6.1 Definitions and Standard Equation A circle is the locus of all points P (x. The equation of the circle is (x + 1)2 + (y − 1)2 = 4. Solution. Write the equation of a circle with center at (−1. The Descarta2D representation of a circle is Circle2D[{h. r]. we find the equation of a circle in standard form to be (x − h)2 + (y − k)2 = r2 . and r is the radius of the circle. k} represents the coordinates of the center point. 1) and radius 2. k}.

it returns False. 4). Solution. (c) (−2. 1).1: Circle with center at (h. . otherwise. 8−5.86 Chapter 6 Circles y PHx. Points whose coordinates satisfy the equation (x + 2)2 + (x − 1)2 = 9 are on the circle. 1) with radius 3: (a) (3. Determine which of the following points are on the circle centered at (−2. kL x-h x Figure 6. k) and radius r. 5<. 4 2 0 -2 -4 -4 -2 0 2 4 Example. 4). 5<<D. circle] will return True if the point is on the circle. The Descarta2D function IsOn2D[point. (b) (1. In[1]: Sketch2D@8Circle2D@8−1. 2D<. yL r y-k CHh. PlotRange −> 88−5. 1<.

3D. Two circles are coincident if their center points are coincident and their radii are equal. IsOn2D@p2. and point (a) is not. c2 = Circle2D@81. c2D< Out[4] 8True.1 Definitions and Standard Equation 87 In[2]: c1 = Circle2D@8−2. 1<. otherwise. True< Therefore. 4<D. p2. p3 = Point2D@8−2. c2D. circle] returns True if the two circles are concentric. In[3]: Sketch2D@8c1. 2D. 2<. p3<D. it returns False. c1D< Out[2] 8False. Example. it returns False. Show that the two circles whose equations are (x − 1)2 + (y − 2)2 = 4 and (x − 1)2 + (y − 2)2 = 9 are concentric. The Descarta2D function IsConcentric2D[circle. points (b) and (c) are on the circle. 4 3 2 1 0 -1 -2 -4 -2 0 2 Two circles are said to be concentric if their center points are coincident. True. c1D. IsCoincident2D@c1. 1<D. p1. 4<D. p1 = Point2D@83. 2<. p2 = Point2D@81. The result is obvious by inspection of the equations. IsCoincident2D[circle. 3D. 8IsOn2D@p1. IsOn2D@p3.6. 8IsConcentric2D@c1. otherwise. In[4]: c1 = Circle2D@81. circle] returns True if the two circles are coincident. but not coincident. Solution. False< . c1D.

The equation x2 + y 2 + ax + by + c = 0 is the general equation of a circle. F]. + y+ = 2 2 4 This is √ the equation of a circle whose center is at (−a/2.and x-terms. D. −b/2) and whose radius is given by r = 12 a2 + b2 − 4c. The equation will be a real circle only if a2 +b2 −4c > 0. Solution. Descarta2D represents the quadratic equation Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 as Quadratic2D[A. C. Example. . B. The function Circle2D[quad] will return a circle directly if the quadratic is indeed a circle. then on the y 2 . E. if a2 +b2 −4c = 0 the equation represents a single point (a circle of zero radius). a necessary and sufficient condition that Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 represent a circle is that A = C and B = 0. The function Loci2D[quad] will convert a quadratic (second-degree) equation to a list of objects represented by the equation.and y-terms yielding x2 + ax + or  x+ a2 b2 a2 b2 + y 2 + by + +c− − =0 4 4 4 4  2 b a2 + b2 − 4c a 2 . reducing them to one. It is not necessary that A = C = 1 since the coefficients of x2 and y 2 being equal can be divided out. k) and radius r the equation may be written as x2 + y 2 − 2hx − 2ky + (h2 + k 2 − r2 ) = 0 which is a special case of the general second-degree equation Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 where the coefficients of x2 and y 2 are equal and there is no xy term. It can be reduced to standard form by completing the squares on the x2 .88 Chapter 6 Circles 6.2 General Equation of a Circle By expanding the standard equation of a circle with center point C(h. and if a2 + b2 − 4c < 0 there are no real points in the locus. Therefore. Find the center and radius of the circle 2x2 + 2y 2 − 5x + 4y − 7 = 0.

3 Circle from Diameter 89 In[5]: 8c1 = Loci2D@q1 = Quadratic2D@2. The form quad //Simplify is an equivalent form of the function. €€€€€€€€€€€€€€€ E= √ The center of the circle is (5/4. C. Hint. −1=. (h. − €€€€€ E Descarta2D Hint. c1[[1]] indicates the first element in the list of objects c1. Circle2DA9 €€€€€ . must be the midpoint of P1 P2 and is given by y1 + y2 x1 + x2 and k = h= 2 2 and the radius of the circle. 2. −7DD. In[6]: Quadratic2D@ c1@@1DD D êê Simplify 5 2 7 2 Out[6] Quadratic2DA1. y1 ) and P2 (x2 . The Descarta2D function Quadratic2D[circle] converts a circle to a quadratic equation.3 Circle from Diameter Consider two points P1 (x1 . −1=. 0. y2 ) defining the end points of a diameter P1 P2 of a circle. 0. In Mathematica the elements of a list are indicated by Ÿ Mathematica double square brackets surrounding the index of the element in the list. €€€€€€€€€€€€€€€ E=. Circle2D@q1D< 5 4 è!!!!! 97 4 5 4 è!!!!! 97 4 Out[5] 99Circle2DA9 €€€€€ . − €€€€€ .6. Clearly the center of the circle. must be one-half the distance between P1 and P2 : r= 1p (x1 − x2 )2 + (y1 − y2 )2 . k). r. −1) and the radius is 97/4. In the previous example. The Descarta2D function Simplify[quad] simplifies the coefficients of a quadratic by multiplying to remove denominators and factoring to remove common factors. 2 One equation of the circle C has a particularly simple form given by (x − x1 )(x − x2 ) + (y − y1 )(y − y2 ) = 0 as can be verified by simplifying the equation of C in standard form. −5. . 4. 2. 6. 1.

y1 ). In this section we look at the case of a circle passing through three points. Simultaneous solution of the three linear equations gives h=− where . This system of equations reduces to three linear equations in three unknowns.4 Circle Through Three Points Since the equation of a circle has three effective parameters (h. in general three conditions can be imposed upon the parameters to determine one (or more) circles. by substituting the coordinates of the points into the standard equation for a circle yielding the three equations (x1 − h)2 + (y1 − k)2 = r2 (x2 − h)2 + (y2 − k)2 (x3 − h)2 + (y3 − k)2 = = r2 r2 . b. k and r. We can find the equation of a circle passing through three points P1 (x1 . k. y2 ) and P3 (x3 . y3 ).90 Chapter 6 Circles 6. r or a. c). h. P2 (x2 . In a later chapter we will explore a large number of conditions for constructing circles satisfying three conditions.

.

1 .

.

H = .

y1 .

.

s1 1 y2 s2 and dij = K d12 d13 d23 H . 2D 2D 2|D| . k= . and r = .

.

.

1 1 .

.

.

.

.

y3 .

. K = .

x1 .

.

.

s1 s3 .

1 x2 s2 .

.

.

1 1 .

.

.

.

.

x3 .

. D = .

x1 .

.

.

y1 s3 .

1 x2 y2 .

1 .

.

.

x3 .

. .

y3 .

If D = 0 the points are collinear and no circle passes through the three points. q (xi − xj )2 + (yi − yj )2 and si = x2i + yi2 . Find the circle passing through the three points (1. −2<DD 7 10 3 10 17 2 Out[7] Circle2DA9− €€€€€€€€€ . 1) and (0. p3 = Point2D@80. point. 1<D. point] returns a circle passing through the three points. €€€€€€€€€€€€€€€€ è!!! E 5 In[8]: Sketch2D@8p1. p2 = Point2D@8−3. p2. (−3. In[7]: c1 = Circle2D@p1 = Point2D@81. Example. The Descarta2D function Circle2D[point. 2<D. −2). Solution. 2). c1<D. . p3. €€€€€€€€€ =.

y3 ) is given by the determinant equation .6.5 Intersection of a Line and a Circle 91 2 1 0 -1 -2 -3 -2 -1 0 1 The quadratic equation of a circle passing through P3 (x3 .

.

x2 + y 2 x y 1 .

.

2 .

x1 + y12 x1 y1 1 .

.

x2 + y 2 x y 1 2 2 .

2 2 .

2 .

y1 ). P2 (x2 . x3 + y32 x3 y3 1 three points P1 (x1 . y2 ) and .

.

.

.

.

.

. = 0.

.

.

.

Find the quadratic equation of the circle passing through the three points (1. point] returns a quadratic representing the circle passing through the three points. Solution. −2) given in the previous example. point. b= √ and d = √ . p2. In[9]: Quadratic2D@p1. A2 + B 2 A2 + B 2 A2 + B 2 . The Descarta2D function Quadratic2D[point. 21. P1 and P2 . −78D 6.5 Intersection of a Line and a Circle Consider the line Ax + By + C = 0 and the circle (x − h)2 + (y − k)2 = r2 . The points of intersection of the line and circle can be determined by solving the system of these two equations in two unknowns. 0. k − bd ∓ a r2 − d2 where a= √ B Ah + Bk + C A . Example. The coordinates of the points of intersection. 1) and (0. 15. −9. are given by   p p P1. p3D Out[9] Quadratic2D@15. (−3.2 h − ad ± b r2 − d2 . 2).

of these circles can be determined by solving two equations in two unknowns. The equations of the two circles in standard form are clearly given by x2 + y 2 = r12 and (x − D)2 + y 2 = r22 . if r2 − d2 = 0. Substituting this value of y 2 into the second equation and solving for x yields D2 + r12 − r22 . 0) as shown in Figure 6. c1 = Circle2D@81. then the line and the circle do not intersect.2. then there are two distinct intersection points.92 Chapter 6 Circles If r2 − d2 > 0 (the radius is greater than the distance from the center point to the line).6 -2-10 1 2 3 4 5 Intersection of Two Circles Consider two circles (x − h1 )2 + (y − k1 )2 = r12 and (x − h2 )2 + (y − k2 )2 = r22 . 3DD 7 5 1 5 Out[10] 9Point2D@81. 6<<. c1. pts<. CurveLength2D −> 15D. 2<. The Descarta2D function Points2D[line. Alternately. €€€€€ =E= In[11]: Sketch2D@8l1. then the two intersection points are coincident (the line is tangent to the circle). 8−2. x= 2D . and if r2 − d2 < 0. Example. Place the center of a circle with radius r1 at the origin and place the center of a second circle of radius r2 at (D. PlotRange −> 88−3. the following geometric approach can be applied. Point2DA9− €€€€€ . The coordinates of the two intersection points. circle] returns a list of the intersection points of the line and the circle. Solving the first equation for y 2 yields y 2 = r12 − x2 . 5<. P1 and P2 . −1. 3D. 6 5 4 3 2 1 0 -1 -2 6. respectively. In[10]: pts = Points2D@l1 = Line2D@2. Solution. 5<D. Find the two points of intersection between the line and the circle whose equations are 2x − y + 3 = 0 and (x − 1)2 + (y − 2)2 = 9.

x0 = 2D 2D If the expression under the radical in the expression for y0 is positive.2 and are given by x = h1 + x1 ± x2 and y = k1 + y1 ∓ y2 where x1 = x0 cos θ. y2 = y0 cos θ . y1 = x0 sin θ. if it is zero. the two intersection points are coincident (the circles are tangent at this point).3. k2 ) as shown in Figure 6. k1 ) and C2 (h2 . Now consider two circles in arbitrary positions with centers C1 (h1 . It is easy to show algebraically that 4D2 r12 − R2 = (D2 − (r1 + r2 )2 )((r1 − r2 )2 − D2 ) which confirms the intuitive insight that the circles do not intersect if either the sum of the radii is greater than the distance between the centers.and y-coordinates of the intersection points can be written in terms of the distances x0 and y0 determined from the special position shown in Figure 6. 4D2 Let R = D2 + r12 − r22 and let (x0 . Substituting this value for x back into the first equation and solving for y 2 yields y2 = 4D2 r12 − (D2 + r12 − r22 ) .2: Two circles in a special position. x2 = y0 sin θ. y0 ) designate the coordinates of the intersection points in this special position. The x. then there are two distinct intersection points. or the difference of the radii is less than the distance between the centers. the two circles do not intersect. Then p R 4D2 r12 − R2 and y0 = ± .6 Intersection of Two Circles 93 y r2 r1 x D Figure 6. and if it is negative.6.

D D Therefore. The Descarta2D function Points2D[circle. Solution. c2 = Circle2D@8−2.99728. the coordinates (x.87228<D< . 4DD êê N Out[12] 8Point2D@81. −3<. 1<.3: Two circles in arbitrary positions. and k2 − k1 h2 − h1 and sin θ = .99728<D.87228.94 Chapter 6 Circles y0 x0 C2 y1 y2 C1 q x1 x2 Figure 6. circle] returns a list of the intersection points of the two circles. = k1 + x0 D D = h1 + x0 Example. −1. In[12]: pts = Points2D@c1 = Circle2D@82. Point2D@8−0. Find the points of intersection between the two circles (x − 2)2 + (y − 1)2 = 9 and (x + 2)2 + (y + 3)2 = 16 evaluated numerically. y) of the intersection points of two circles without reference to trigonometric functions are cos θ = x y (h2 − h1 ) (k2 − k1 ) ± y0 D D (k2 − k1 ) (h2 − h1 ) ∓ y0 . 3D. 0.

Find the distance from (2. 1DD Out[14] −1 + 4 è!!! 2 .6. from a point P (x0 .7 Distance from a Point to a Circle The distance. The validity of the formula is easily verified by considering separately whether the point is inside. 4 2 0 -2 -4 -6 -6 -4 -2 0 2 4 6. Solution. D. −1<. pts<D. The function Distance2D[point. outside or on the circle. 3) to the circle (x + 2)2 + (y + 1)2 = 1. y0 ) to the circle (x − h)2 + (y − k)2 = r2 is given by q D= (r − p (x0 − h)2 + (y0 − k)2 )2 . Example. c2. Circle2D@8−2.7 Distance from a Point to a Circle 95 In[13]: Sketch2D@8c1. 3<D. The inner radical represents the distance from point P the center of the circle. In[14]: Distance2D@Point2D@82. circle] computes the distance between a point and a circle.

points P1 and P2 are on the circle since both points satisfy the equation C. 1 − 4 k<. c12 = Circle2D@c1. è!!!!!!!!!!!!!!!!!!!!!!!!!!!!2 9 − 25 k + 32 k E . Therefore. k. In[15]: Clear@kD. Pencil2DD êê Simplify Out[15] Circle2DA82 − 4 k. −3<. Pencil2D] returns a circle parameterized by the variable k representing the pencil of circles passing through the intersection points of two circles. K) and radius R.96 6. where H = (1 − κ)h1 + kh2 K = (1 − κ)k1 + kk2 R1 R2 = h21 + k12 − r12 = h22 + k22 − r22 p = H 2 + K 2 − ((1 − κ)R1 + κR2 ). y1 ) and P2 (x2 . c1 = Circle2D@82. the coefficients of x2 and y 2 are the same. 4D. circle. Solution. C represents a family (or pencil ) of circles through the points of intersection of the two given circles. Inspection of the equation reveals that C has a center (H. Plot members of the family of circles for values of κ = {0. Consider the equation C ≡ (1 − κ)C1 + κC2 = 0. A particular member of this family may be determined by specifying that it satisfy one other condition. The two circles C1 ≡ (x − 2)2 + (y − 1)2 = 9 and C2 ≡ (x + 2)2 + (y + 3)2 = 16 determine a family of circles (1 − κ)C1 + κC2 = 0 passing through the points of intersection of C1 and C2 . c2. Moreover. and there is no xy term.8 Chapter 6 Circles Coaxial Circles Let P1 (x1 . ±1. This equation represents a circle since it is of the second degree. The function Circle2D[circle. R Example. 3D. c2 = Circle2D@8−2. ±5}. ±3 ± 4. ±2. y2 ) be the two points of intersection of the two circles C1 ≡ C2 ≡ (x − h1 )2 + (y − k1 )2 = r12 and (x − h2 )2 + (y − k2 )2 = r22 . k. 1<.

3 69 E.6. −11<. 17<. è!!!!! Circle2DA8−18. family<D. 222 E. −19<. −15<. è!!!!!!!! è!!!!!!!! Circle2DA8−10. 187 E. 87 E. 6 19 E= Out[16] 9Circle2DA822. 5<. In[17]: Sketch2D@8c1. 3D. The radical axis possesses the following properties which we state without proof. . è!!!!! è!!!!!!!! è!!!!! Circle2DA814. 4D. Consider the equation L ≡ C1 − C2 . • It is the line of the common chord if the two circles intersect in distinct real points. 40 20 0 -20 -40 -40 -20 0 6. Circle2DA8−14. 1<. è!!!!! Circle2D@82. 2 93 E. −7<. c2. Circle2DA8−6. 13<. • It is perpendicular to the line of centers of the two circles. 421 E. Circle2DA86. k −> #L&. Range@−5. Circle2D@8−2. 66 E. Upon simplification this equation reduces to the linear equation L ≡ 2(h2 − h1 )x + 2(k2 − k1 )y + (h21 + k12 − r12 ) − (h22 + k22 − r22 ) = 0.9 Radical Axis 97 In[16]: family = Map@Hc12 ê. • It is the common tangent line if the circles intersect in coincident points (are tangent internally or externally). 5DD è!!!!!!!! è!!!!! 934 E.9 20 40 Radical Axis Let C1 and C2 be the equations of two distinct circles as presented in the previous section. Circle2DA810. Circle2DA818. • It is a real straight line even if the circles do not intersect in real points. This line is called the radical axis of the circles C1 and C2 . 21<. 9<. −3<. • It is the locus of points from which tangents of equal length can be drawn to the two circles.

1<. 2D. 4DD Out[19] 8Circle2D@85. −21D. Range@1. 2D. 8−4. Find the radical axis of the circles (x − 4)2 + (y − 1)2 = 16 and (x − h)2 + (y − 1)2 = 4 for values of h = {5. Line2D@14. 6 4 2 0 -2 -4 6 4 2 0 -2 -4 0 2 4 6 8 1012 0 2 4 6 8 1012 The Mathematica function Range[1. 4D. Line2D@12. 1<.4] returns the list . • The radical axes of three circles. 6 4 2 0 -2 -4 6 4 2 0 -2 -4 0 2 4 6 8 1012 0 2 4 6 8 1012 Hint. 4DD. radaxis@#D<. circle] returns the radical axis of the two circles. Circle2D@86. 6. Solution. 12<. 1<. 2D. Map@Hc2@#D = Circle2D@8h@@#DD. 3. intersect in a point called the radical center. 10. −117D< In[21]: Map@Sketch2D@8c1. taken in pairs. Circle2D@810. 11}. 2DL&. Example. 11<. 1<. 2D< In[20]: Map@Hradaxis@#D = Line2D@c1. Range@1. In[19]: h = 85. c2@#DDL&. Circle2D@811. Range@1. Line2D@4. 0. PlotRange −> 88−1. 6<<D&. 4}. 10. 0.98 Chapter 6 Circles • It does not exist (tends to infinity) as the defining circles tend to concentricity. In[18]: c1 = Circle2D@84. 1<. 0. 6. 1<. Ÿ Mathematica {1. −32D. c2@#D. 2. −96D. 0. 4DD Out[20] 8Line2D@2. The Descarta2D function Line2D[circle.

consider the triangle T shown in Figure 6. 1 + t2 Substituting these expressions into the parameterization of a circle previously given yields x=h+r 2t 1 − t2 and y = k + r . r][t] returns the coordinates of a point at parameter t on the circle.6. k}. pts = Map@Point2D@c1@#DD&. Generate 12 equally spaced points on the circle x2 + y 2 = 4 using the parametric equations.4. Solution. θ. 0<.10 99 Parametric Equations A circle may be parameterized in terms of the angle. The resulting equations are x = h + r cos θ and y = k + r sin θ where (h. that a ray from the center to the point at the parameter value makes with the +x-axis.10 Parametric Equations 6. 2 ∗ Pi ∗ Range@0. Triangle T is obviously a right triangle since (1 − t2 )2 + (2t)2 = (1 + t2 )2 . 12D ê 12D. Sketch2D@8c1. pts<D. Example. The Descarta2D function Circle2D[{h. 1 + t2 1 + t2 . 2D. Therefore. the rational forms of the trigonometric functions for angle θ are sin θ = cos θ = 1 − t2 and 1 + t2 2t . Values in the range 0 ≤ θ < 2π generate a complete locus of points on the circle. In[22]: c1 = Circle2D@80. 2 1 0 -1 -2 -2 -1 0 1 2 Alternately. k) is the center of the circle and r is the radius of the circle.

0<. pts<. 18 .t2 q 2t Figure 6. 12 . The point at θ = π radians cannot be generated using these equations. Range@0. 14 . 34 . Also. PlotRange −> 88−1. 8−1. Solution. 8D ê 8D. 38 . 5D. 1 ≤ t < ∞ the second quadrant. pts = Map@Point2D@5 81 − # ^ 2. so they are generally applied only to coordinates in the first quadrant. Plot nine points at equal parameter values on the circle x2 + y 2 = 25 in the first quadrant using the rational parametric equations of the circle. 6<<D. 2 #< ê H# ^ 2 + 1LD&.100 Chapter 6 Circles t2 + 1 1 . 6 5 4 3 2 1 0 -1 0 1 2 3 4 5 6 . 58 . These equations are called the rational parameterization of the circle and have the advantage that they can be evaluated without using trigonometric functions.4: Rational sin θ and cos θ. and −1 ≤ t ≤ 0 in the fourth quadrant. −∞ < t ≤ −1 the third quadrant. The points can be generated directly from the equations using parameter values 0. 6<. notice that the points generated by these parametric equations do not produce equally spaced points measured by distance along the circle for equally spaced parameter values. Example. Sketch2D@8c1. Parameter values in the range 0 ≤ t ≤ 1 produce coordinates of points on the circle in the first quadrant. In[23]: c1 = Circle2D@80. 78 and 1 .

. . . . . . . . . chdlen. —– Chord Length of Intersecting Circles. . . . . . . . rtangcir. . . . . .6.11 Explorations 6. . the origin). . . . . . . . . . . . . . . . .radcntr. . . r. . . . . . —– Johnson’s Congruent Circle Theorem. . . . . . . . . . . —– . . . .nb Prove that the radical axes of three circles taken in pairs intersect in a common point. —– Angle Inscribed in a Semicircle. . . . . . . . . . . . θ1 ) with radius R is given by r2 + r12 − 2rr1 cos(θ − θ1 ) = R2 . . . . . . . . and intersect in pairs in two distinct points (one of the points is. johnson. . . . . .nb r2 r1 d C1 C2 D Show that the distance. . . . . . . . . C2 and C3 which pass through the origin. by construction. . . . . . . . . . . . . This point is called the radical center of the three circles. . . . . . . . . . . . . . have equal radii. . . . . . . . . . . . . . —– Radical Center. . . . . . . . . . . . . . . . . . . . . . . . . . . between the intersection points of two circles is given by p −(D − r1 − r2 )(D + r1 − r2 )(D − r1 + r2 )(D + r1 + r2 ) d= D where D is the distance between the centers of the circles. . . . . . . . . . . . .11 101 Explorations Polar Equation of a Circle. . . . . . . . . . . . Prove that the circle passing through the other three points of intersection between the circles taken in pairs is congruent to the original three circles (that is.nb Show that the polar equation of a circle centered at P (r1 .nb Show that an angle inscribed in a semicircle is a right angle. . . . . . . polarcir. . . . . . this circle has a radius of r). . . . . and r1 and r2 are the radii of the two circles. d. . . . . . . . . . . . . . . . . . . . . . . .nb Take any three circles C1 . . . .

. 0) to the circle x2 + y 2 + 2gx + 2f y + c = 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .nb Prove that if OP and OQ are the tangent lines from (0. . . . . .cirptmid. . . . .nb Show that the locus of a point P (x. . . . . . . . . . . . . . —– Construction of Two Related Circles. . . . . . . cir3pts. . . . . 0) and (0. . . . . then the equation of circle OP Q is x2 + y 2 + gx + f y = 0. . . . . . —– Circle-Point Midpoint Theorem. . . . . . . . . . . . . . . b) is x2 + y 2 − ax − by = 0. . . . —– Circle of Apollonius. . . . . . . tnlncir. . . . . . . (a. . y2 ) is a circle with radius dk r=p 2 (k − 1)2 . . . . . . . radaxis. y) that moves so that the ratio of its distance from two fixed points P1 (x1 . . . . . . . . . .nb Show that the equation of the circle through the three points (0. .nb y P0 x r1 C1 Show that the locus of midpoints from a fixed point P0 to a circle C1 of radius r1 . . . . . Furthermore. . . . . . . . . . . . apollon. . . . . . . . . . . . . . . . . . . . show that the center point of the locus is the midpoint of the segment between P0 and the center of C1 .102 Chapter 6 Circles Radical Axis of Two Circles. . . . —– Circle Through Three Points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .nb Show that the two circles x2 + y 2 + ax + by + c = 0 and x2 + y 2 + bx + ay + c = 0 have the radical axis x − y = 0. y1 ) and P2 (x2 . . . . . . . . . . . 0). . . . . . . . . . . . . . is a circle of radius 12 r1 . . . . . . .

. . . . . . The locus is called the Circle of Apollonius for the points P1 and P2 and the ratio k. . . —– Carlyle Circle. show that the x-coordinates of the intersection points P1 (x1 . . . . . 0) of C1 with the x-axis are the roots of the quadratic equation x2 − sx − p = 0. . castill.nb Show that the point of intersection of the radical axis and the line of centers of two circles of radii r1 and r2 divides the segment between the two centers into the ratio d2 + r12 − r22 . . . . . . —– Castillon’s Problem. . . . . . . . . . . . . . . . . . . . . . . . Describe a method for inscribing a triangle inside C1 such that the sides of the triangle pass through the three given points. . . . . . . . . . . . . . . . . . . . . . . . . . (0. . . . 1). . . . . . P2 and P3 be three points inside the circle C1 ≡ x2 + y 2 = 1. . . . . . . . . . . . —– Radical Axis Ratio. . . . . .6. . passing through the three points (0. . . . . d2 − r12 + r22 where d is the distance between the centers. k2 − 1 k2 − 1  where d = |P1 P2 |. . . . carlyle. . 0) and P2 (x2 . . . . . . .nb Given a circle. . . . . . . . . . . raratio. −p) and (s. . . . . . . . . . . . . C1 .11 Explorations and center 103  −x1 + k 2 x2 −y1 + k 2 y2 . . . . . . . . . . . . . . . . . . .nb Let P1 . . . . . . . . . . . . . . . . —– . . . . . . . . . . −p). . . . .

.

the angle the directed line CP1 makes with the +x-axis is called the end angle of the arc. the so-called biarc configuration of two arcs used to blend curves together smoothly. respectively. of the circle is the radius of the arc. Using the same parametric equations. y1 ) where θ = θ1 is called the end point of the arc. Let CP0 and CP1 be the lines determined by the center point C and the start and end point of the arc. a subsequent chapter will discuss another interesting use of arcs. k) is the center of the circle and r is the radius of the circle. A circle is defined to be the set of points P (x. The area 105 . The angle between lines CP0 and CP1 is called the angular span of the arc. Many of the interesting properties of arcs arise when considering how their end points and slopes meet with other curves. r. where 0 ≤ θ0 < 2π and θ0 < θ1 < (θ0 + 2π). The center point C(h. The point P0 (x0 . y) for all values of θ such that θ0 ≤ θ ≤ θ1 . y0 ) where θ = θ0 is called the start point of the arc. and the point P1 (x1 . a circular arc may be defined to be the set of points P (x. An arc with an angular span of π radians (180◦ ) is called a semicircle. k) of the circle is also the center point of the arc. 7. For example. and the radius. The angle the directed line CP0 makes with the +x-axis is called the start angle of the arc. In addition to the topics presented in this chapter. many mechanical artifacts use arcs to construct transitions between the primary faces of the object giving a smoother and more durable design. y) for all values of θ such that 0 ≤ θ < 2π (radians). The area bounded by line segments CP0 and CP1 and the arc itself is called a sector.1 Definitions Consider the parametric equations of a circle x = h + r cos θ and y = k + r sin θ where the point C(h.Chapter 7 Arcs We continue our study of circles by focusing on bounded portions of a circle’s circumference commonly called arcs.

7 6 5 4 3 2 1 -2 -1 0 1 2 3 . Circle2D[{h. Plot the arc centered at the point (−2. k}. θ2 }] represents an arc of a circle between parameters θ1 and θ2 when plotting. 6D@8Pi ê 6. a1 = Circle2D@8−2. Include the center point of the arc in the plot. 1<. Sketch2D@8p1. kL x Figure 7. Example. 1<D. In[1]: p1 = Point2D@8−2. Solution. bounded by the arc and P0 P1 is called a segment and the line segment P0 P1 itself is called the chord of the arc.1: Definition of an arc. Pi ê 2<D.106 Chapter 7 Arcs y P1 r P0 q1 q0 CHh. r][{θ1 . 1) with a radius 6 and start angle of π/6 radians and end angle of π/2 radians. a1<D.

2. Closer examination of the definition of the bulge factor arc reveals that for a given value of B there are two arcs satisfying the definition. Thus. then the bulge factor. in terms of the points.2 Bulge Factor Arc 107 y Pm P1 PM r P0 C H r D x Figure 7. y1 ). and the center point. and Pm is the midpoint of the arc. These arcs are mirror images of each other (the line passing through P0 and P1 is the reflection line). k). if P0 and P1 are the start and end points of the arc.2 Bulge Factor Arc We now consider an arc representation involving the arc’s start and end points. Consider the right triangle CP0 PM where PM is the midpoint of the chord P0 P1 . To distinguish between these two arcs we make the arbitrary definition that the arc will be traversed counter-clockwise from P0 to P1 . C(h. By the Pythagorean Theorem |CPM |2 + |P0 PM |2 = |CP0 |2 . r. an arc with B = 1 will be a semicircle. 7. we need to determine the radius. B. Radius and Center In order to determine defining parameters of the circle underlying the bulge factor arc. The mirrored arc is represented by interchanging the roles of P0 and P1 . and the bulge factor. P0 (x0 . A bulge factor arc is specified by its start and end points plus an additional number specifying the “bulge” (or fatness) of the desired arc.2: Bulge factor arc definition. y0 ) and P1 (x1 .7. the so-called bulge factor arc as illustrated in Figure 7. positive) ratio B= 2H D where D is the distance between P0 and P1 and H is the distance from Pm to the chordal line defined by P0 and P1 . is defined to be the (non-zero. More precisely. B.

80. B] where the start and end point coordinates are given as the first two arguments.108 Chapter 7 Arcs or (r − H)2 +  D 2 2 = r2 . Solution. 1) with a bulge factor of 1/2. k) are h= y0 + y1 x0 + x1 + κ(y0 − y1 ) and k = − κ(x0 − x1 ) 2 2 where κ= 1 4   1 −B . and the bulge factor is the third argument. since B > 0 and D > 0. In[2]: a1 = Arc2D@81. B It is clear from the expressions for r and C that if we replace B with 1/B we get an arc with the same radius and center. Therefore. as the bulge factor. 0<. 0<. Find the mirror image of the arc reflected in the chord. respectively. whose locus is counter-clockwise from P1 to P0 . B. . Plot the arc with end points (1. To find the coordinates C(h. the equations for C(h. coords1 . The reflection of the original arc in the chord may be obtained by reversing the roles of P0 and P1 and using the same value. 81. 0<D. a2. Point2D@80. Solving for r and substituting H = BD/2 yields r= D 4   1 B+ B where r > 0. The arc reflected in the chord is constructed by reversing the roles of the start and end points. 0) and (0. In[3]: Sketch2D@8a1. The direction of the offset is rotated −90 degrees from the vector P0 − P1 . The standard representation of an arc in Descarta2D is Arc2D[coords0. 1<D<D. 1<. Point2D@81. 1 ê 2D. Example. k) of the center point of the arc we note that the center is offset from point PM a distance (r − H). 1<. 1 ê 2D. a2 = Arc2D@80. This arc is the complement of the original arc.

B = tan(α/2).4 0. the arc is a minor arc whose angular span is in the range 0 < θ < π. Note that −π < α < π and |α| = θ/2.2 Bulge Factor Arc 109 1 0.6 0.7. Complement2D] constructs the complement of an arc.2 0. Therefore. and negative when V0 is counter-clockwise from the chord.1) we can derive an expression for B in terms of sin α and cos α as follows k sin α s 2B sin α = = = . Let α denote the angle between the initial tangent vector. and the chord vector. From Equation (7. V0 .6 0. if B > 1 the arc is a major arc with π < θ < 2π. tan α = cos α k cos α c (1 − B 2 ) . (7. 4 From this equation it is clear that if B < 1.1) = (1 − B 2 ) Using the trigonometric identity tan(2A) = we find that 2 tan A (1 − tan2 A) θ B = tan .4 0.2 0 0 0. P1 − P0 . Angles Let θ be the angular span of a bulge factor arc defined by points P0 and P1 and bulge factor B. Once again examining the right triangle CP0 PM reveals that   θ d/2 = tan 2 (r − H) 2B .8 0.8 1 Descarta2D Hint. The Descarta2D function Arc2D[arc. considered positive when V0 is clockwise from the chord vector.

Thus. 2<D. point. then the arc’s start and end points are interchanged and the absolute value of B is the positive bulge factor. point] returns an arc through three points. . Solution.<. Note that P0 and P1 are the chord end points required in the bulge factor arc formulation and in order to fully define the arc. 6.. One method for constructing the arc through the three points is to first construct the underlying circle through the three points and then compute the limiting angles of the arc from the end points and the center. (−2. 2). The first and third points are assumed to be the end points of the arc chord. 1. As the third point P traverses the arc the angle subtended at P by the chord P0 P1 remains constant at the value (π − α). −6). The function Arc2D[point. From s and c we compute B using Equation (7. B. In[4]: p1 = Point2D@84. Alternately.61803D In[5]: Sketch2D@8p1. p3D êê N Out[4] Arc2D@80. s2 + c2 (7. These techniques are illustrated in the “Explorations” section at the end of this chapter. p2. Find and plot the arc passing through the points (4. p3 = Point2D@80. 7. a1 = Arc2D@p1. If B turns out to be negative. p2 = Point2D@8−2. and (0. 2.2) (The positive root of the quadratic is selected in order to insure that B has the same sign as s.) The constants s and c are some multiple of sin α and cos α and immediately provide several useful techniques for constructing arcs. p3.110 Chapter 7 Arcs Solving this quadratic for B in terms of s and c yields B = c+ s √ . a1<D. 6<D.<. using the simpler vector form. s = |(P − P0 ) × (P1 − P)| c = (P − P0 ) · (P1 − P). the bulge factor arc form provides an appealing method for computing the arc. p2. we need to determine its bulge factor.3 Three–Point Arc Let P0 and P1 be the start and end points of an arc and let point P be any other point on the arc. 4<D. 84. Example. 4).2).

y1 }. since the standard form of an arc used in Descarta2D is Arc2D[{x0. and θ0 and θ1 are the start and end angles. The Descarta2D function Arc2D[{x0.7. Parameter values in the range 0 ≤ t ≤ 1 generate coordinates covering the span of the arc. y0 }. and parameter value t = 1 produces the end point. k) is the center of the arc. Plot eight equally spaced points on the arc between the points (−3. y0 }.4 Parametric Equations 111 6 5 4 3 2 1 0 -2-1 0 1 2 3 4 7. t. 1) with a bulge factor of 3/2 Solution. B]. The resulting parametric equations are x y = h + r cos(θ0 + t(θ1 − θ0 )) = k + r sin(θ0 + t(θ1 − θ0 )) where (h. y0 }. The parameter. {x0 . r is the radius. can be scaled in a different manner so that parameter value t = 0 produces the start point of the arc. Example. of the arc. {x1 . k) is the center point of the arc. . 2) and (2. respectively.4 Parametric Equations One possible set of parametric equations for an arc is very similar to those of a circle since they both have the same underlying curve. we seek parametric equations involving only the start and end point coordinates and the bulge factor. The equations are given by x = h + (x0 − h) cos(βt) − (y0 − k) sin(βt) y k + (x0 − h) sin(βt) + (y0 − k) cos(βt) = where β = 4 tan−1 (B) is the span of the arc and C(h. Alternatively. B][t] returns the coordinates at parameter value t on the arc.

82. {x1 . 3 ê 2D. Parametric values t. a1@1 ê 2D. Example. 1<. y0 }. . 0 < t < 1. Map@Point2D. will generate points on the arc between the start and end points. y1 }. 2<. 1) and P1 (2. pts = Map@Point2D@a1@#DD&. 1. 7D ê 7D.<< In[8]: Sketch2D@8a1. 1<. use the parametric definition of an arc to find and plot the start point. 2) with a bulge factor of 3/2. Solution.. B][t] returns a list of coordinates representing the point on the arc at a given parameter value. Sketch2D@8a1. 2<. 2 1 0 -1 -2 -3 -2 -1 0 7.<.. 82. end point and midpoint of the arc. Range@0. 80. coords = 8a1@0D. 2. 82. coordsD<D.112 Chapter 7 Arcs In[6]: a1 = Arc2D@8−3. For the arc between the points P0 (−2. pts<D. a1@1D< êê N Out[7] 88−2.75.5<. The function Arc2D[{x0.5 1 2 Points and Angles at Parameters Using the parametric equations of an arc defined in the previous section we can find the coordinates of any point on the arc corresponding to an angle θ in the range θ1 ≤ θ ≤ θ2 . In[7]: a1 = Arc2D@8−2. The parametric equations for an arc as defined in Descarta2D are normalized so that the parameter value 0 generates the start point of the arc and the parameter value 1 generates the end point of the arc. −1. 3 ê 2D.

radius. Solution.6 Arcs from Ray Points Sometimes it is more convenient to specify the start and end points of an arc. 6). θ0 = tan y0 − k y1 − k The arc tangent function used to implement these equations must be sophisticated enough to assign the proper angle based on which quadrant the points are located in. {point. 1 ê 2D êê N Out[9] −1. and with start and end points of (7.32582 7. 1) and (2. One obvious construction method is to specify the center and radius along with the start and end points. In[9]: Angle2D@a1. y0 ) and P1 (x1 .5 1 0.5 -1 -1.5 -2 -1 0 1 2 Whereas the Descarta2D function arc[t] generates the coordinates of the point on the arc at parameter t. Example. The function Arc2D[point. . Mathematica provides such an arc tangent function that takes the numerator and denominator as separate arguments and computes the angle in the proper quadrant.7.6 Arcs from Ray Points 113 2 1. point}] returns a bulge factor arc given the center point. k) with radius r. the function Angle2D[arc. the start and end angles of the arc are given by     x0 − h x1 − h −1 −1 and θ1 = tan . rather than the start and end angles. Using simple trigonometry. y1 ) be the desired start and end points of an arc centered at C(h. t] returns the angle (in radians) on the arc at parameter t with respect to a horizontal line such as the x-axis.5 0 -0. Let P0 (x0 . r. and start and end points. 1) with radius 1. Plot the arc centered at the point (2.

8p1 = Point2D@87. . . . . . p2 = Point2D@82. . . . .114 Chapter 7 Arcs In[10]: a1 = Arc2D@p0 = Point2D@82. . . 1<D.7 Explorations Arc from Bounding Points and Entry Direction. 5. . PlotRange −> 880. .nb Let P0 and P1 be the start and end points. 1<D. .arcexit. . . These points may be located at any position on the ray extending from the center point of the arc to the desired arc start and end points. of an arc and P be a third point on the vector tangent to the arc at P0 . . . p0. . . p1. 8<. . . and P be a third point on the vector tangent to the arc at P1 . . . . .. . .arcentry. . . . €€€€€ j + €€€€€€€€€€€ è!!! zE 5 2 2 { k In[11]: Sketch2D@8a1. respectively. respectively. . .nb Let P0 and P1 be the start and end points of an arc. . Show that s = |(P1 − P0 ) × (P − P1 )| c = (P1 − P0 ) · (P − P1 ) . . . . 6<. . 8 7 6 5 4 3 2 1 12345678 Descarta2D Hint. Show that s c = = |(P − P0 ) × (P1 − P0 )| (P − P0 ) · (P1 − P0 ) represent values of s and c useful for computing the bulge factor of the arc. . p2<. . —– Arc from Bounding Points and Exit Direction. 1<. The Arc2D function introduced in the previous example allows more flexible input of the arc start and end points than is obvious from the example. 6<D<D 2 i 5 5 y z j− €€€€€ Out[10] Arc2DA87. The arc will be bounded by the points of intersection between the circle underlying the arc and the rays defined from the center point to the specified start and end points. . 82. . . . 80. 8<<D. . . 7.

. . arccent. . . . . . . . . . . . . .7 Explorations 115 represent values of s and c useful for computing the bulge factor of the arc. P of a bulge factor arc between points P0 and P1 whose bulge factor is B has coordinates   (x0 + x1 ) − B(y0 − y1 ) (y0 + y1 ) + B(x0 − x1 ) . . . . .7. . . . . . . . . .nb P P1 P0 Show that the midpoint. . . . . . . . . . . . . .arcmidpt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . P 2 2 —– Centroid of Semicircular Arc. . . . . . . . . . . . . . . . . —– Midpoint of Arc. . . . . .nb Show that the centroid of the area bounded by a semicircular arc of radius r and its chord is on the axis of symmetry at a distance H= from the chord of the arc. . . . —– 4r 3π . . . . . . . . . . . .

.

A right triangle has one interior angle of 90◦ . In an equilateral triangle all three sides are equal length. 1).1 that the sum of the interior angles of a triangle is 180 degrees (π radians). coords2 . 0) and (−2. and the third side is called the base. A triangle is called acute if all the interior angles measure less than 90◦ . The line segments are called the sides of the triangle. In Descarta2D a triangle is represented as Triangle2D[coords1. coords3 ] 117 . A triangle with three unequal sides is a scalene triangle. and the side opposite the right angle is called the hypotenuse. Plot the triangle connecting the points (−1. The two line segments adjacent to each vertex form an angle inside the triangle called a vertex angle. It is clear from Figure 8. Example. Solution. A triangle with an interior angle greater than 90◦ is called an obtuse triangle. Use Descarta2D functions to retrieve the vertex points and vertex angles of the triangle (in degrees). Descarta2D implements the triangle as a named object to enable easy study of the mathematical relationships arising from the geometry of a triangle. −1).Chapter 8 Triangles Even though a triangle is not easily represented by a single. (2. 8. there exist so many interesting properties of triangles that it is worth devoting a special chapter to them. and the points are called the vertices of the triangle. simple equation. Even today. new relationships involving triangles continue to be discovered. A triangle is isosceles if two sides are equal in length.1 Definitions A triangle is a composite object consisting of the three line segments connecting three noncollinear points.

0<.3987<< In[2]: Sketch2D@8t1<D. 8Map@Point2D@t1. . second and third vertex points. 3<D ê Degree êê N< Out[1] 88Point2D@8−1. n] returns the vertex angle at vertex n of the triangle. 0<D. 1<D<. 81. 1 0. Map@Angle2D@t1.5 0 -0. 49. Angle2D[triangle. where coords1 . In[1]: t1 = Triangle2D@8−1.1: Sum of triangle interior angles. Point2D@8−2. −4x + 2y + 2 = 0 and 4x + 5y − 2 = 0 construct the triangle whose sides lie on the lines. 81. respectively. Point2D@82. #D&. 1<D. 82. coords2 and coords3 are the coordinates of the first. n] returns a point located at vertex n of the triangle. 2. #D&.118 Chapter 8 Triangles P3 q1 q2 L3 q3 q1 q3 P1 L12 P2 Figure 8.1301. −1<D. 8−2.4712. Given the lines 2x − 3y + 4 = 0. 898. −1<. The Descarta2D function Point2D[triangle. 3<D. 2. 32.5 -1 -2 -1 0 1 2 Example.

{-1. n1 . l2. 3<<. prD. 8Segment2D@t1. Sketch2D@8t1<. Solution.5 2 1.5 -1 -1 0 1 2 3 Example. Sketch2D@8l1. n2 ] returns the line segment connecting two vertices of a triangle.5 1 0.5 0 -0. 2<. Line2D@0. 2D. t1 = Triangle2D@l1. line] returns a triangle defined by three lines. 8−3. 3 2. 2<. The Descarta2D function Triangle2D[line.1 Definitions 119 Solution. prD.5 -1 -1 0 1 2 3 3 2.5 0 -0. 0=E In[4]: pr = PlotRange −> 88−2. 2}. 3}. 2<D. The Descarta2D function Segment2D[triangle. −2. Find the line segment and the line associated with the side connecting vertices 2 and 3 of Triangle2D[{2. 3D. 2. 8−1. 8−3. 2. 2. {-3. l3 = Line2D@4. −2D. 9 €€€€€ .8. 2}]. 5. €€€€€€€€€ =. n1 . l2.5 1 0. 3<.5 2 1. l2 = Line2D@−4. 4D< . l3D 7 4 5 2 7 11 10 11 1 2 Out[3] Triangle2DA9 €€€€€ . €€€€€ =. Line2D@t1. −3. l3<. line. 3<. 8−1. 4D. In[5]: t1 = Triangle2D@82. Line2D[triangle. In[3]: l1 = Line2D@2. 3D< Out[5] 8Segment2D@8−1. n2 ] returns the line containing the side of a triangle through two vertices. 2<D. 9− €€€€€€€€€ .

2 Centroid of a Triangle The “balance point” of a planar area defined by bounding curves is called the center of gravity of the area. When the material covering the area has a constant density throughout. of the triangle are given by  P x1 + x2 + x3 y1 + y2 + y3 . The position of this line can be determined by summing the moments. The value of y¯ is the ordinate at which the sum of the moments is equal on both sides of the line. The centroid point coordinates can be determined by intersecting a pair of lines offset from the sides of the triangle one-third of the distance from the side towards the opposite vertex. 3 3  where (x1 . the centroid is obviously the center point of the figure. circle or ellipse. P . ∆M = D(x2 − x1 )∆y. bL D Dy x2 .2: Centroid of a triangle. of infinitesimal rectangles on either side of the line. 0L x Figure 8. y2 ) and (x3 . The medians of a triangle are the lines connecting the vertices to the midpoints of the opposite sides.nb. the center of gravity is called the centroid of the area.2 it is intuitively obvious that the triangle will “balance” on some horizontal line at ordinate y¯. y1 ).120 Chapter 8 Triangles y PHa. The derivation shows that the line is one-third of the distance from the base of the triangle to the apex. For symmetric geometric figures such as a square.x1 QHd. y3 ) are the coordinates of the triangle’s vertex points. (x2 . and the coordinates of the centroid. and the point is the centroid of the triangle as is shown by the following Descarta2D commands: . 8. and the formulas for the center of gravity depend purely on the size and shape of the area. Referring to Figure 8. The usual method for determining y¯ is to use integral calculus and the actual derivation is included as the exploration tricent. The medians taken in pairs intersect in coincident points.

y1. 1<. 80. and (0.5 0 -0. p2 = Point2D@8x2. m3 = Segment2D@Point2D@c3D. p3DDD êê Simplify 1 3 1 3 Out[6] Point2DA9 €€€€€ Hx1 + x2 + x3L. Point2D@s13DD. 2). Point2D@s12DD. Point2D@p1. (3. y2<D. Show by plotting that the medians intersect at the centroid. 1). pt = Point2D@t1. m1 = Segment2D@Point2D@c1D. The Descarta2D function Point2D[triangle. €€€€€ Hy1 + y2 + y3L=E Example. In[9]: Sketch2D@8t1. Centroid2D] returns the centroid point of a triangle. 80. m3<D.2 Centroid of a Triangle 121 In[6]: Clear@x1. Find the centroid of the triangle whose vertices are (−2. Solution. pt1 = Point2D@Line2D@p1.5 -1 -2 -1 0 1 2 3 . c3< = 88−2. Centroid2DD 1 3 2 3 Out[7] Point2DA9 €€€€€ .5 1 0. 83. c3D. y3D. c2D. 2<<. y1<D. x3. 2<D. Line2D@p2.8. c2. m2. 83. −1). m2 = Segment2D@Point2D@c2D. 1<. −1<. y2. −1<. Point2D@p2. y3<D. pt. m1. p3DD. x2. s12 = Segment2D@c1. Point2D@s23DD. s13 = Segment2D@c1. s23 = Segment2D@c2. p1 = Point2D@8x1. 2 1. p3 = Point2D@8x3. €€€€€ =E In[8]: 8c1. c3D. In[7]: t1 = Triangle2D@8−2.

Show by plotting that the perpendicular bisectors of the sides of the triangle intersect at the center point of the circumscribed circle. p3. p3. 2. Point2D@c1D. We have already provided in a previous chapter the equation of a circle passing through three points.122 8. Perpendicular2DD<D. t1. Line2D@p1. Circumscribed2DD êê N Out[10] Circle2D@8−1. 2). 2. 5 4 3 2 1 0 -1 -3 -2 -1 0 1 2 . 1).13636. Solution. c1. Example. Since the sides of the triangle are chords of the circle. 4) and (−3. p2 = Point2D@8−2. t1 = Triangle2D@p1. Line2D@p2. p2.13685D In[11]: Sketch2D@8p1. In[10]: p1 = Point2D@81. p2. p3. Perpendicular2DD. Circumscribed2D] returns the circle that circumscribes the triangle.04545<. The function Circle2D[triangle. (−2. p3 = Point2D@8−3. p2. 4<D. c1 = Circle2D@t1. Line2D@p1. and the perpendicular bisectors of the chords of a circle intersect at the center point.3 Chapter 8 Triangles Circumscribed Circle A circle passing through the three vertex points of a triangle is said to be circumscribed about the triangle. Find the circle circumscribing the triangle whose vertices are (1. 2<D. Perpendicular2DD. the center of the circumscribed circle is the intersection point of the perpendicular bisectors of the triangle’s sides taken in pairs. p3D. 1<D.

k) and radius r of the inscribed circle derived from this construction yields h k r = (s1 x1 + s2 x2 + s3 x3 )/2s = (s1 y1 + s2 y2 + s3 y3 )/2s p (s − s1 )(s − s2 )(s − s3 )/s = where s1 = s2 = s3 s = = p (x2 − x3 )2 + (y2 − y3 )2 p (x1 − x3 )2 + (y1 − y3 )2 p (x1 − x2 )2 + (y1 − y2 )2 (s1 + s2 + s3 )/2. (3. 3). The function Circle2D[triangle. Inscribed2D] returns the circle inscribed in the triangle. Solution. Example.4 Inscribed Circle A circle inside a triangle that is tangent to all three of the triangle’s sides is said to be inscribed in the triangle. 8. −3). Point2D[triangle. The radius of the inscribed circle is the distance from the center point to any one of the triangle’s sides. The center of the inscribed circle must lie on the angle bisectors of the triangle’s sides because the center must be equidistant from the sides. Therefore. The center (h. the point of intersection of a pair of angle bisectors of a triangle is the center of the inscribed circle.4 Inscribed Circle 123 Descarta2D Hint. The radius. s2 and s3 is given by s1 s 2 s 3 R= √ PS where S = s1 + s2 + s3 and P = (−s1 + s2 + s3 )(s1 − s2 + s3 )(s1 + s2 − s3 ).nb. Circumscribed2D] directly returns the center point of the circumscribed circle of a triangle. Find the circle inscribed in the triangle whose vertices are (−3. 3) and (1. This formula is derived in the exploration trirad. . R. of the circle circumscribing a triangle whose sides are of length s1 .8. Show by plotting that the angle bisectors of the sides of the triangle intersect at the center of the inscribed circle.

of a circle inscribed in a triangle whose sides are of length s1 . t1. Line2D@p2. MedialEquations2D@8Line2D@p1.5 Solving Triangles Clearly. independent of its position and orientation. p3D.84278D In[13]: Sketch2D@8p1. Point2D@c1D. 3<D. is determined by its side lengths and vertex angle magnitudes. p2D<D@@2DD<D. c1 = Circle2D@t1. p2. p2D. p3. c1. s2 and s3 is given by r 1 P r= 2 S where S = s1 + s2 + s3 and P = (−s1 + s2 + s3 )(s1 − s2 + s3 )(s1 + s2 − s3 ).124 Chapter 8 Triangles In[12]: p1 = Point2D@8−3. Inscribed2DD êê N Out[12] Circle2D@80. The radius. p1D<D@@2DD. 3<D.443274.nb. 1. p2 = Point2D@83. This formula is derived in the exploration trirad. Line2D@p3. p2. p3 = Point2D@81. p3D. 1. 4 2 0 -2 -4 -4 -2 0 2 4 Descarta2D Hint. the shape of a triangle. p3D<D@@2DD. The function Point2D[triangle. 8. p1D. Inscribed2D] directly returns the center point of the inscribed circle of a triangle.3 relative to the vertices. we pose the problem of determining all of the configuration parameters (sn and an ) given a subset of them. −3<D. r. MedialEquations2D@8Line2D@p3. Labeling the sides and angles as shown in Figure 8. Line2D@p1.15722<. The configuration parameters are always assumed to be . t1 = Triangle2D@p1. MedialEquations2D@8Line2D@p2.

as outlined below.5 Solving Triangles 125 V3 a3 s2 s1 a1 V1 a2 s3 V2 Figure 8. The configurations requiring consideration are enumerated as AAA Angle-Angle-Angle: Specifying three angles of a triangle determines the shape of a family of similar triangles. The configuration given by s1 . ASA Angle-Side-Angle: The ASA configuration is specified by two angles and the side between the angles. Generally. s2 and a1 . the configuration parameters a1 . SSA Side-Side-Angle: SSA configurations (s1 . because two valid solutions may exist. but is ambiguous as to the lengths of the sides. SAS Side-Angle-Side: The SAS configuration involves two sides and the angle between them. for example. The SAS configuration specifies a unique solution for all values of the configuration parameters. a unique triangle is determined by specifying three of the six configuration parameters. In a valid configuration the sum of the two given angles must be less than π radians. AAS Angle-Angle-Side: The AAS configuration is specified by two angles and a side not between them. a2 and s1 specify an AAS configuration. s3 and a2 . and such configurations admit a unique solution. . The configuration parameters a1 . two different sets of configuration parameters representing two different triangles may satisfy the configuration. a3 and s2 is an example of an SAS configuration. although in two cases (AAA and SSA).3: Standard labeling of a triangle’s sides and angles. positive and the angles less than π radians. In some cases (right triangles) only one solution may exist. SSS Side-Side-Side: Specifying three sides of a triangle determines a unique triangle. illustrate an ASA configuration. For example. for example) are referred to as the ambiguous case. or may be inconsistent if the length of one side is greater than or equal to the sum of the lengths of the other two sides.8. the configuration is ambiguous. That is. and in other cases the configuration may be inconsistent allowing no solutions. The ASA configuration allows a unique solution if the sum of the two angles is less than π radians.

When applying the Law of Sines or the Law of Cosines. a2 . SolveTriangle2D[{{s1. a2 . The Descarta2D package D2DTriangle2D provides details illustrating how to solve all the triangle configuration cases using these principles. Null<. s2 = 2 and a3 = π/6 radians. Solving triangles involves the application of three fundamental principles. In terms of the configuration parameters these three principles lead to the following equations: • Sum of the angles of a triangle is π radians: a1 + a2 + a3 = π. for example. The function Triangle2D[config] returns the triangle satisfying the configuration. • The Law of Sines (three equations): s2 s3 s1 = = . entered as Null in the configuration). Construct a triangle satisfying this SAS configuration. 0<. s3 }. s21 + s22 − 2s1 s2 cos(a3 ). 2. given three of the six configuration parameters. Find all the configuration parameters for a triangle with s1 = 1.126 Chapter 8 Triangles The process of determining the full set of configuration parameters given one of the cases above is called solving the triangle. Example. s21 + s23 − 2s1 s3 cos(a2 ).e. sin(a1 ) sin(a2 ) sin(a3 ) • The Law of Cosines (three equations): s21 s22 s23 = = = s22 + s23 − 2s2 s3 cos(a1 ). The first vertex of the triangle will be the origin and the second vertex will be on the +x-axis. Pi ê 6<<D êê Simplify Out[14] 991. 9 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . 9ArcCosA €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ E. a3 }}. {a1 . 9 . s2 . In[14]: sa = SolveTriangle2D@881. ArcCosA €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ E. when applying the Law of Sines. €€€€€ == 6 è!!!# è!!!# "################ "################ 2 5−2 3 5−2 3 In[15]: Triangle2D@saD êê Simplify è!!! 4− 3 1 "################ è!!!# 5 − 2 3 . a3 }}] returns a complete specification a triangle configuration. Solution. in the form {{s1 . è!!! è!!! 4− 3 1− 3 π "################ è!!!# 5 − 2 3 =. 8Null. s3 }. Null. s2 . The three parameters to be found must be omitted (i. 2. {a1 . €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ =E è!!!# è!!!# "################ "################ 5−2 3 5−2 3 Out[15] Triangle2DA80. care must be taken to properly handle the ambiguous cases noting that sin(a) = sin(π − a). 0=.

0.2 2 . Sketch2D@8Triangle2D@881. 1. 1. 8Pi ê 6. Null<.4 0. Null<.5. 0. Null<<D Out[16] 881.. Null<<. Since this is an SSA case. True] will return the alternate triangle configuration.5. The function SolveTriangle2D[config] returns a complete triangle configuration given a partial configuration.5 0. Find all configuration parameters for a triangle with s1 = 1.. TrueD Out[17] 881.8 1.8.5 and a1 = π/6 radians (an SSA case). Null<<.3 0. Null.848062. Null.523599. Triangle2D[{s1.5. 2. Null<.3 0.6 0. 8Pi ê 6.7 0.6 0. there is a possibility of two solutions.5. Null<<D<D. In[16]: SolveTriangle2D@881. 1. 80. 80. if one exists.4 0.76993<< In[17]: SolveTriangle2D@881. Null. 1. s2 .2 0. 1.5 0. 8Pi ê 6.523599.5. s2 = 1.4 0.324463<< In[18]: 8Sketch2D@8Triangle2D@881.5 Solving Triangles 127 Descarta2D Hint.1 0 0 0.2 0.6 0.. TrueD<D<.5 1 1.1 0 0 1 0.5 0. 1. 0.7 0.29353. 1. s3 }] constructs a triangle given the lengths of the sides only.5. 0. Solution. 8Pi ê 6.. Null<.6376<. Null. SolveTriangle2D[config. 1. Example.2 0.96048<.

. from V1 is given by p Ss2 s3 (−s1 + s2 + s3 ) . h1 . . . . The length of the median. . . from V1 is given by √ PS h1 = 2s1 where S = s1 + s2 + s3 and P = (−s1 + s2 + s3 )(s1 − s2 + s3 )(s1 + s2 − s3 ). . . from vertex V1 is given by q 1 −s21 + 2(s22 + s23 ). . s2 and s3 opposite vertices V1 . . and P and r are the center and radius of the circle inscribed in T . . . . . If a triangle has sides whose lengths are s1 . . . . b1 = s2 + s3 The formulas for the lengths of the cevians from vertices V2 and V3 can be found by cyclic permutation of the subscripts given in the formulas above. . . . . . . . —– Euler’s Triangle Formula. The derivations of these formulas are provided in the exploration tricev. . Therefore a cevian may be inside the triangle (if the point is on the opposite side) or it may be outside the triangle (if the point is on the extension of the line which contains the opposite side). . m1 = 2 The length of the angle bisector. . . . . . .7 Explorations Circle Inscribed in a Right Triangle. . . . then r = 12 (a + b − c). .nb. . . . . m1 . . . . V2 and V3 . .nb If T is a triangle. . rttricir. . . . . show that d2 = R2 − 2rR where d is the distance from P to Q. b1 . . . . .nb Show that if r is the radius of a circle inscribed in a right triangle with sides a and b and hypotenuse c. . . . . . . . . . . . trieuler. . 8. . .128 8. . . then the length of the altitude. . Common cevians include the altitude of a triangle which is the cevian perpendicular to the opposite side. . . and Q and R are the center and radius of the circle circumscribing T . . . . . . . . —– . . . . the median which connects the vertex to the midpoint of the opposite side and the angle bisector which bisects the angle at the vertex.6 Chapter 8 Triangles Cevian Lengths A cevian of a triangle is a line segment connecting a vertex to a point on the line containing the side of the triangle opposite the vertex.

. . . . . . . . . . . . . . . . . . . . . triallen.D. as illustrated in the figure. . . . . . . Gergonne (1771–1859). . . . . . . . . . .nb Show that the three altitudes of any 4ABC are concurrent in a single point (x. . Show that the equation of the line containing the altitude from A is (x3 − x2 )x + (y3 − y2 )y − x1 (x3 − x2 ) − y1 (y3 − y2 ) = 0 where the coordinates of the vertices are A(x1 . . . —– Centroid of a Triangle. . . gergonne.nb Show that the length. . . . . y) whose coordinates are given by y0 x0 and y = x= D D . . ..nb The altitude from vertex A of 4ABC is a line segment from A perpendicular to the side BC (or its extension). . . . . . . . . . . of a triangle’s altitude (from vertex V3 to side s1 ) is given by p (s1 + s2 − s3 )(s1 − s2 + s3 )(−s1 + s2 + s3 )(s1 + s2 + s3 ) L= 2s3 where s1 . . . . . y3 ). . . . . . . . . .7 Explorations 129 Gergonne Point of a Triangle. y2 ) and C(x3 . . . . . . . . . . . . . . . . .8. . . . bL D Dy x2 . . . . . . . . —– Concurrent Triangle Altitudes. . . . . . . . . . . . .nb Let Q12 . . . L. . . . . . . . . respectively. . L13 and L23 . . . . . . . . . . —– Triangle Altitude Length. . . . tricent. 0L x Show that the centroid of a triangle. . . . . . is on a line at a distance y¯ = b/3 from the base of the triangle. . . . . . . . . . . . . . . B(x2 . .nb y PHa. . . . . . . . . y1 ). . . . . . . . . . . . . . . founder-editor of the mathematics journal Annales de Mathematiques. . . . . . . . . Q13 and Q23 be the points of contact of the inscribed circle of triangle P1 P2 P3 with sides L12 . . . P2 Q13 and P3 Q12 are concurrent. . . . . . . . . . . trialt. . .triconn. . s2 and s3 are the lengths of the triangle’s sides. —– Altitude of a Triangle. . . . . .x1 QHd. . . . . . . . . . Show that lines P1 Q23 . . . . . . . The point of concurrency is called the Gergonne Point of the triangle after J. . . . . . . . . . . . . . . . . .

130 Chapter 8 Triangles where x0 y0 and = −(y1 − y2 )(x1 x2 + y32 ) + (y1 − y3 )(x1 x3 + y22 ) − (y2 − y3 )(x2 x3 + y12 ) = +(x1 − x2 )(y1 y2 + x23 ) − (x1 − x3 )(y1 y3 + x22 ) + (x2 − x3 )(y2 y3 + x21 ) .

.

x1 .

.

D = .

x2 .

.

x3 y1 y2 y3 .

.

.

.

.

.

1 .

nb Prove that the length of the altitude. B(x2 . . . trirad. . . . . . . . —– Triangle Radii. . . . . . . . . . . . tricev. P = (−s1 + s2 + s3 )(s1 − s2 + s3 )(s1 + s2 − s3 ) and s1 . . . . r. . . . . . . . . . y3 ). . R. . . . from vertex V1 of a triangle to the opposite side of the triangle (whose length is s1 ) is given by √ PS h1 = 2s1 . trisides. . . . . . . —– Triangle Side Lengths from Altitudes. . . . . . . . . . . . . . . . prove that the radius. . . . . . . . . . . . . . . . . . Furthermore. .nb Prove that the radius. . . . . . . This point is called the orthocenter of the triangle. s2 = and s3 = s1 = H H H where H1 = h2 h3 . . . . . . . . . . . 1 1 and the coordinates of the vertices are A(x1 . . . . . . . . . h1 . . . . h2 and h3 are given by 2h1 H1 2h2 H2 2h3 H3 . . . . . . s2 and s3 are the lengths of the triangle’s sides. . . . of the circle circumscribing the triangle is given by s1 s2 s3 .nb Prove that the lengths of a triangle’s sides whose altitudes are of lengths h1 . R= √ PS —– Triangle Cevian Lengths. . H2 = h1 h3 and H3 = h1 h2 . . . . y2 ) and C(x3 . . . . . . . . . . . . . . . . . . . . . . . . . . . of a circle inscribed in a triangle is given by r 1 P r= 2 S where S = s1 + s2 + s3 . . . y1 ). . . . . . and p H = (H1 + H2 − H3 )(H1 − H2 + H3 )(−H1 + H2 + H3 )(H1 + H2 + H3 ).

from V1 is given by p Ss2 s3 (−s1 + s2 + s3 ) .7 Explorations 131 where S = s1 + s2 + s3 and P = (−s1 + s2 + s3 )(s1 − s2 + s3 )(s1 + s2 − s3 ). —– . b1 . from vertex V1 is given by q 1 −s21 + 2(s22 + s23 ). m1 . m1 = 2 Prove that the length of the angle bisector.8. b1 = s2 + s3 Also show that the formulas for the lengths of the cevians from vertices V2 and V3 can be found by cyclic permutation of the subscripts given in the formulas above. Prove that the length of the median.

.

Part III Conics .

.

the distance from any point P on the parabola to the focus is equal to its distance to the directrix.2 General Equation of a Parabola We choose any point F (x1 .1 Definitions A parabola is the locus of a point that moves so that the ratio of its distance from a fixed point and from a fixed line is one. is called the focus and the fixed line. The ratio P F/P D is called the eccentricity e and e = 1. travel in a path whose shape is a parabola with the sun at its focus. 9. is called the vertex of the parabola. Projectiles in a vacuum on the surface of the earth travel in paths which are nearly parabolic. The focal chord perpendicular to the axis is called the latus rectum. the directrix.Chapter 9 Parabolas In the branch of mathematics known as celestial mechanics it is shown that an object. F . as the directrix. The normalized form of the line is used to simplify the derivation. if not deflected by the gravitational attraction of other bodies. The fixed point. that falls toward the sun “from infinity” would. obviously a point on the locus. y1 ) as the focus and any line D ≡ A1 x + B1 y + C1 = 0. Humans also take advantage of the focusing properties of a parabolic shape in the design of such artifacts as headlights. D. 9. such as a comet. searchlights and various listening and broadcasting devices. This chapter develops the underlying mathematics of a parabola. and projectiles in the air approximate this path with greater or less precision according to their speed. shape and weight. With reference to these defining elements the equation of the parabola becomes p (x − x1 )2 + (y − y1 )2 = ±(A1 x + B1 y + C1 ) 135 . where A21 +B12 = 1. The line F D through the focus perpendicular to the directrix is called the axis of the parabola. By definition. The midpoint V of the segment F D.

By an appropriate choice of axes this equation can be simplified. if axes are chosen so that the focus has coordinates (f. an equation of the second degree. This equation is of the form Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0.3 Standard Forms of a Parabola The definition of a parabola makes the shape of the curve depend only upon the distance from the focus to the directrix and not essentially upon the coordinate system. but it will then represent only parabolas in special positions. Moreover. The general equation is complicated because of the choice of a general point and a general line. it can be verified that B 2 − 4AC = 0. which can be written as −B12 x2 + 2A1 B1 xy − A21 y 2 + 2(x1 + A1 C1 )x + 2(y1 + B1 C1 )y + (C1 − x21 − y12 ) = 0. 9. The general equation of a parabola reveals that if the directrix line is parallel to one of the coordinate axes then B = 0 since either A1 or B1 will be zero. 0) and . Therefore a necessary condition that the equation Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 represent a parabola is that B 2 − 4AC = 0. One characteristic of the equation is that the second-degree terms in x and y form a perfect square. For example.136 Chapter 9 Parabolas y PHx. yL axis FHx1 .1: Definition of a parabola. y1 L V D x Figure 9. The equation of a parabola in this position will have no xy term. so the equation may also be written −(B1 x − A1 y)2 + 2(x1 + A1 C1 )x + 2(y1 + B1 C1 )y + (C1 − x21 − y12 ) = 0.

then the locus definition yields p x + f = (x − f )2 + y 2 . focal length is 1/3. Example. Parabola2D[{h. 1 ê 2.9. Plot the parabola whose vertex is (2. k) gives a parabola whose equation is (y − k)2 = 4f (x − h). The distance f is called the focal length of the parabola and is the distance between the focus and the vertex of the parabola. which reduces to y 2 = 4f x. 4 3 2 1 0 -1 -2 2 3 4 5 6 7 8 The axis of the parabola may also be parallel to the y-axis in which case the equation is (x − h)2 = 4f (y − k). Descarta2D does not directly use this form of the parabola. Plot the parabola whose vertex is (1. Solution. f. Example. if f is negative it opens to the left. −1). k}. This equation is the standard form used in Descarta2D as illustrated in the following example.3 Standard Forms of a Parabola 137 the directrix the equation x = −f . . 0D<D. the focal length is f and the rotation angle (in radians) about the vertex is θ. 1). 1<. focal length is 1/2. and opens upward. θ] is the standard representation of a parabola in Descarta2D where the coordinates of the vertex are (h. but instead simply rotates the y 2 form by the appropriate angle. 0). In[1]: Sketch2D@8Parabola2D@82. k). This is one of the standard forms of the equation of a parabola. If f is positive the parabola opens to the right. Generalizing the location of the vertex point to V (h. and opens to the right. It has a vertex V (0.

138 Chapter 9 Parabolas Solution. (−1. In[3]: axis1 = Line2D@1. Angle2D@axis2D + Pi<. θ] returns the desired parabolas using the Angle2D[line] command to find the required values for θ. −1. 81. −1<. 0D. axis2. pts = 881. theta = 8Angle2D@axis1D. Angle2D@axis1D + Pi. axis2 = Line2D@1. 1<. 1. −1) and (1. In[2]: Sketch2D@8Parabola2D@81. 1). Range@1. f. 8−1. 6 5 4 3 2 1 0 -1 -2-1 0 1 2 3 4 Example. −1<. and axes aligned with the lines x − y = 0 and x + y = 0. k}. 1). 1 ê 3. Angle2D@axis2D. −1). 6 4 2 0 -2 -4 -6 -6-4-2 0 2 4 6 . Plot the four parabolas whose vertices are (1. (−1. 4DD<D. focal length 1/3. Solution. theta@@#DDD&. 1<. Use the same command as in the previous example with a rotation angle of π/2 radians. Pi ê 2D<D. 1 ê 3. −1<<. 8−1. 0D. The Descarta2D command Parabola2D[{h. Sketch2D@8axis1. Map@Parabola2D@pts@@#DD.

0. 0. 3<. 3 2 1 0 -1 -2 -6 -4 -2 0 2 The following example shows how Descarta2D may be used to find the various geometric objects associated with a parabola. −8DD 3π 2 Out[4] 9Parabola2DA8−2. In either case it is easy to reduce this general equation to the corresponding standard form by the process of completing the square. 4. (2) Cy 2 + Dx + Ey + F = 0. 3). axis parallel to the y-axis. Reduce x2 + 4x + 4y − 8 = 0 to the equation of a parabola in standard form. rotated 270◦ (3π/2 radians) about the point (−2. directrix. Example. Example. In[5]: Sketch2D@8crv1<D. Solution. 4. vertex.9.4 139 Reduction to Standard Form The most general equation of a parabola with no xy term present (and hence one whose axis is parallel to one of the coordinate axes) is one of the two forms (1) Ax2 + Dx + Ey + F = 0. Plot the geometric objects.4 Reduction to Standard Form 9. axis parallel to the x-axis. The Descarta2D function Loci2D[quadratic] returns a list of geometric objects represented by a quadratic equation. In[4]: crv1 = Loci2D@Quadratic2D@1. Find the focus. . axis and eccentricity of the parabola represented by the equation x2 − 2x − 8y − 15 = 0. 1. €€€€€€€€€€ E= The equation in standard form is (y − 3)2 = 4(x + 2).

k). where 2 2 2 2 a = A2 / A2 + B2 and b = B2 / A2 + B2 . 0. geom<D. y1 ) and a directrix line given by L ≡ A2 x + B2 y + C2 = 0. Line2D@−1. −8. focal length f and angle of rotation θ) can be determined. 1D< In[8]: Sketch2D@8p1. In[6]: p1 = First@Loci2D@Quadratic2D@1. Given these two defining elements the parabola’s parameters (vertex point V (h. 8Foci2D. The vertex point V is obviously the midpoint of the line segment F F 0 and has coordinates V (h. 0 -1 -2 -3 -4 9. Let d= A2 x1 + B2 y1 + C2 p A22 + B22 be the signed distance from the focus F to the directrix L. Point2D@81. k) = (x1 − ad/2. −15DDD π 2 Out[6] Parabola2DA81. 2. −2<D. Point2D@81. geom = Map@H#@p1DL&. Directrices2D[parabola] returns a list of one line which is the directrix of the parabola. . p From a previous chapter p the coordinates of F are given by (x1 − ad. y1 − bd).5 -2 0 2 4 Parabola from Focus and Directrix A parabola may be defined in terms of a focus point F (x1 . 0. Line2D@0. Vertices2D. f = D/2. The focal length f is half of D. Line2D<D< êê Flatten Out[7] 81. D = |d|. −2<. Directrices2D. Line2D[parabola] returns the axis line of the parabola. and the function Eccentricity2D[parabola] returns the eccentricity of a parabola (always 1). 0. 0<D. 4D. The function Foci2D[parabola] returns a list of one point which is the focus of the parabola. y1 − bd/2).140 Chapter 9 Parabolas Solution. The rotation angle θ is the angle of the line F F 0 . −2. and F 0 be the projection 0 of F on L. 1. €€€€€ E In[7]: 8Eccentricity2D@p1D.

6 Parametric Equations 141 Example. Directrices2D@p1D< êê Simplify Out[10] 88Point2D@81. Parameter values t = ±1 produce the end points of the focal chord of the parabola. 0D<< 9. 1. Since only the y term is quadratic.6 Parametric Equations The standard form of a parabola used in Descarta2D has the equation (y − k)2 = 4f (x − h) where (h. k) is the vertex of the parabola and f is the focal length. Increasing values of t produce points above and to the right of the vertex. 1<D. k). €€€€€ =. 1<D<. Solution. θ. 1) and the directrix line x + y = 0. 8Line2D@1. = The parameter value t = 0 produces the vertex point (h. 0DD 1 2 1 2 1 2 π 4 Out[9] Parabola2DA9 €€€€€ . Negative values of t produce points that correspond to positive t values reflected in the axis of the parabola. Determine the parabola in standard form defined by the focus point F (1. Line2D@1. The axis of this parabola is parallel to the x-axis and the parabola opens to the right (when f > 0). then. it is easy to find one set of parametric equations for a parabola. solving for t yields t= (y − k) . Parabolas in other orientations are obtained by applying a rotation. 2f Substituting this into the equation of the parabola and solving for x yields the two parametric equations x = h + f t2 y k + 2f t. The Descarta2D function Parabola2D[point. 1. . In[9]: p1 = Parabola2D@Point2D@81. €€€€€ E In[10]: 8Foci2D@p1D. €€€€€€€€€€€ è!!! . to the standard parabola.9. line] returns the parabola defined by a focus point and a directrix line. Let y = k + 2f t be one of the equations.

. Range@0. The initial default set by Descarta2D is 10. where f is the focal length. . . CurveLength2D −> 20D. Solution. θ][t] returns the coordinates at parameter t on the parabola. . . .nb Prove that the length of the focal chord of a parabola is 4f . . To change the default to a new value. 0DD. . . 9. . use the Mathematica command SetOptions[Sketch2D. pts1<. . The Descarta2D command Parabola2D[{h. . pts1 = Map@Point2D@p1@# ê 2DD&. Generate seven points on the parabola (y + 1)2 = 2(x − 1) at equally spaced parameter values. . CurveLength2D −> 20D. . . pts2<. —– . −1<. . . 2 2 0 0 -2 -2 -4 -4 0 2 4 6 8 10 0 2 4 6 8 10 Hint. . . The option CurveLength2D->n sets the approximate length of unbounded curves plotted by Descarta2D. CurveLength2D->n]. . . 0D. 1 ê 2. Sketch2D@8p1. . Generate a second plot of the points on the reflected branch of the parabola. . . n. Range@−6. . . 6DD.7 Explorations Length of Parabola Focal Chord. f. Using the CurveLength2D option as part of the Sketch2D Ÿ Mathematica command sets the length of all unbounded curves being plotted.142 Chapter 9 Parabolas Example. If this option is not specified. k}. . Plot the curve using a curve length of 20. . . . then a default is used. Sketch2D@8p1. pts2 = Map@Point2D@p1@# ê 2DD&. . . . pbfocchd. . . In[11]: p1 = Parabola2D@81. . . .

. . . . . . . . . a) whose axis is parallel to the x-axis has vertex (h. . . . . . . . . . Assume that b and h are positive. .nb Show that the parabola passing through the points (0. pb3pts. . . . . . . . . . . . . k) and focal length f given by h= a2 + ab + b2 ab (a2 + ab + b2 )2 . . . . 4ab(a + b) 2(a + b) 4(a + b) Furthermore. . . . . hN 2 y h O x b Find the equation of the parabolic arch of base b and height h as shown in the figure. pbarch. . . . . . . . . . . . . . . . . . . . . . . . . —– Parabola Determinant. b) and (b. . . .9. . . . . . . . . . k= and f = − . . . . . . . . . . . . . . . . . . . . . .7 Explorations 143 Parabola Through Three Points. . . . . . . . . . .nb b PJ ÄÄÄÄÄÄÄ . . . . . . . . . . pbdet. . . . . . . . . . . . . . . . . . —– Parabolic Arch. . . . . . 0).nb Show that the determinant . . . show that the quadratic representing the parabola is (a + b)y 2 + abx − (a2 + ab + b2 )y = 0. . . . . . . . . . . . . . . . . (a. . . . . .

.

.

.

.

.

.

.

.

y

x2

x

y1
y2

x21
x22

x1
x2

y3

x23

x3

1

1

=0
1

1

represents a parabola Ax2 + Dx + Ey + F = 0 passing through the points (x1 , y1 ), (x2 , y2 )
and (x3 , y3 ).
—–

144

Chapter 9 Parabolas

Parabola Intersection Angles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . pbang.nb
Show that the parabolas y 2 = ax and x2 = by will cut each other at an angle θ given by
1

θ = − tan−1

a3

1

2b 3

1

+ tan−1

2b 3
1

a3

.

—–
Circle Tangent to a Parabola. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . pbtancir.nb
Any line through the point (−3a, 0) cuts the parabola y 2 = 4ax in the points P and Q.
Prove that the circle through P , Q and the focus is tangent to the parabola.
—–
Polar Equation of a Parabola. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . polarpb.nb
Show that the polar equation of a parabola opening to the right with vertex at (0,0) is
given by
4f cos θ
r=
sin2 θ
where f is the focal length of the parabola.
—–

Chapter 10

Ellipses
The visible universe is filled with ellipses, or near ellipses, traced by celestial bodies revolving
around each other, such as planets and the sun. The fact that the angle formed by two focal
radii through a point on an ellipse is bisected by the normal to the curve may be used in a device
for re-concentrating sound waves, at illustrated in the acoustics of the Mormon Tabernacle
in Salt Lake City, Utah. Various types of rotating machinery use elliptical components to
generate special types of linear and rotational motions. This chapter develops the mathematics
of an ellipse.

10.1

Definitions

An ellipse is the locus of a point that moves so that the ratio of its distance from a fixed
point and from a fixed line is a positive constant less than one. As with the parabola, a focus,
directrix and eccentricity are associated with the curve as described in Table 10.1.
Consider the line through the focus perpendicular to the directrix. From the definition
P F/P D = e/1 there are obviously two points V and V 0 which divide the (undirected) segment

Table 10.1: Definition of an ellipse.
Element

Description

P (x, y)

Point on locus

Fixed point F

Focus

Fixed line D

Directrix

Fixed constant e

Eccentricity

e = P F/P D < 1

Ellipse relationship

145

146

Chapter 10 Ellipses

y

PHx, yL

C
V

F
x

D
Figure 10.1: Ellipse definition.

F D, internally and externally respectively, into the ratio of e/1. Therefore V and V 0 are points
(on the same side of D) on the ellipse; they are called the vertices. The segment V V 0 is called
the major axis. By symmetry there is another point F 0 and another line D0 such that F 0 and
D0 would serve as the definition of this curve. Thus an ellipse has two foci and two directrices
associated in pairs F , D and F 0 , D0 . The midpoint of F F 0 , which is also the midpoint of V V 0 ,
is called the center C. It is evident that the locus is contained between the vertices, that it
is bounded in all directions and that it is symmetric both with respect to the major axis and
to a line perpendicular to it through C.
The focal chord perpendicular to the major axis is called the latus rectum. The length of
the central chord perpendicular to the major axis is called the minor axis.

Example. Plot the ellipse with center at coordinates (2, 1), major axis length of
6, minor axis length of 2, and rotated 30◦ (π/6 radians) about the center point.

Solution. Ellipse2D[{h, k}, a, b, θ] is the standard representation of an ellipse
in Descarta2D. The ellipse is centered at coordinates {h, k}, has semi-major axis
of a, semi-minor axis of b and is rotated about the center point by an angle θ (the
semi-major axis is half the length of the major axis; the semi-minor axis is half
the length of the minor axis).
In[1]: Sketch2D@8Ellipse2D@82, 1<, 3, 1, Pi ê 6D<D;

10.2 General Equation of an Ellipse

147

2.5
2
1.5
1
0.5
0
-0.5
0

10.2

1

2

3

4

General Equation of an Ellipse

Take any point F (x1 , y1 ) as focus and any line, D ≡ A1 x + B1 y + C1 = 0 as directrix, where
A21 + B12 = 1. The normalized form of the line is used to simplify the derivation. By definition
the equation of the ellipse is
p
(x − x1 )2 + (y − y1 )2 = ±e(A1 x + B1 y + C1 )
which may be expanded to
(e2 A21 − 1)x2 + 2e2 A1 B1 xy + (e2 B12 − 1)y 2 +

2(x1 + e2 A1 C1 )x + 2(y1 + e2 B1 C1 )y + (e2 C12 − x21 − y12 ) = 0.
This is of the form Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0, an equation of the second degree.
Moreover, it can be verified that B 2 − 4AC = 4(e2 − 1) < 0 (when e < 1).
Therefore, a necessary condition that Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 represent an
ellipse is that B 2 − 4AC < 0. The general equation reveals that if the defining directrix line
is parallel to one of the coordinate axes then B = 0, since either A1 or B1 will be zero. The
equation of an ellipse in this position will have no xy term.

10.3

Standard Forms of an Ellipse

By an appropriate choice of coordinate axes the general equation of an ellipse can be reduced
to one of the following standard forms.

Major Axis Parallel to the x-Axis
The equation of an ellipse in standard position whose major axis is parallel to the x-axis and
whose center is at the origin is
y2
x2
+
=1
a2
b2

148

Chapter 10 Ellipses

y

a
D
V

V

C
F

F

b

D
x
Figure 10.2: Ellipse in standard position (x-axis).

y

D
b

V
F
C

a
F
F

D
x

Figure 10.3: Ellipse in standard position (y-axis).

If the ellipse is centered at (h. lines and constants associated with the ellipse are simply determined and are summarized in Table 10.3 Standard Forms of an Ellipse 149 Table 10. . x-axis y-axis (y − k)2 (x − h)2 + =1 2 a b2 C(h. k ± ae) Directrices x = h ± a/e y = k ± a/e 2 2b2 /a √ a2 − b 2 <1 e= a Focal chord length Eccentricity 2b /a √ a2 − b 2 <1 e= a where a and b are the lengths of the semi-major and semi-minor axes.2. then the equation is (y − k)2 (x − h)2 + =1 2 a b2 as shown in Figure 10. When an ellipse is in this special position. k). k ± a) Foci F (h ± ae. respectively. lines and constants associated with the ellipse are simply determined and are summarized in Table 10. the formulas for the important points. When an ellipse is in this special position. the formulas for the important points. k) F (h.10. respectively. then the equation is (y − k)2 (x − h)2 + =1 2 b a2 as shown in Figure 10. If the ellipse is centered at (h. k) V (h. k) (y − k)2 (x − h)2 + =1 2 b a2 C(h.and y-axis).3.2: Ellipse equations (x. k) Semi-major axis a a Semi-minor axis b b Equation Center Vertices V (h ± a.2. k). Major Axis Parallel to the y-axis The equation of an ellipse in standard position whose major axis is parallel to the y-axis and whose center is at the origin is y2 x2 + 2 =1 2 b a where a and b are the lengths of the semi-major and semi-minor axes.2.

vertices. AC > 0. 0. Reduce x2 + 4y 2 + 4x = 0 to standard form and plot. 4.4 Reduction to Standard Form The most general equation of an ellipse with no xy term (and hence one whose axes are parallel to the coordinate axes) is of the form Ax2 + Cy 2 + Dx + Ey + F = 0. 4 1 In[3]: Sketch2D@8crv1<D. Plot the geometric objects. This equation can be reduced to one of the standard forms by completing the square. 0<. 4. 1 0.5 -1 -4 -3 -2 -1 0 Example.150 Chapter 10 Ellipses 10. 2. In[2]: crv1 = Loci2D@Quadratic2D@1. .5 0 -0. The Descarta2D function Loci2D[quad] reduces a quadratic equation to a standard form. Reduce 5x2 + 9y 2 − 10x − 54y + 41 = 0 to standard form. Find the center. 1. Solution. 0D< The equation in standard form is y2 (x + 2)2 + = 1. The condition B 2 − 4AC < 0 reduces to AC > 0 which implies that A and C are of like sign. 0DD Out[2] 8Ellipse2D@8−2. directrices. the lengths of the semi-major and semi-minor axes and the eccentricity. foci. 0. Example.

Point2D@8−2. 2 2 . V1 (x1 . −10. €€€€€ E=. Eccentricity2D<D Out[5] 9Point2D@81. 0. The function Point2D[ellipse] returns the center point of an ellipse. 9. k) of the ellipse is clearly the midpoint between the vertices and is given by   x1 + x2 y1 + y2 . the function Directrices2D[ellipse] returns a list of the two directrix lines of an ellipse. 3. SemiMajorAxis2D[ellipse] and SemiMinorAxis2D[ellipse] return the lengths of the semi-major and semi-minor axes of an ellipse. CurveLength2D −> 15D. Drop@objs. the function Vertices2D[ellipse] returns a list of the two vertex points of an ellipse. −3D<. è!!! 5 . e. 9 5 In[5]: objs = Map@H#@ crv1@@1DD DL&. Line2DA1. 3<D<. 3<D. 11 7 8Point2D@84. of an ellipse and we wish to find the standard equation of the ellipse. SemiMajorAxis2D. 5 . y2 ).10. respectively. 8Point2D@83. SemiMinorAxis2D. The center point (h. 3<D.5 -4 -2 0 2 4 6 Ellipse from Vertices and Eccentricity Suppose we are given the two vertices. 7<. and the eccentricity. Vertices2D.5 Ellipse from Vertices and Eccentricity 151 Solution. 0E= The standard form of the equation is (y − 3)2 (x − 1)2 + = 1. 3<. The function Loci2D[quad] reduces a quadratic equation to a standard form. . In[4]: crv1 = Loci2D@Quadratic2D@5. 6<<. y1 ) and V2 (x2 . 3<D<. Point2D@8−1. 9Line2DA1. 41DD Out[4] 9Ellipse2DA81. Directrices2D. 2 2 è!!! 2 3. 8−1. the function Foci2D[ellipse] returns a list of the two foci of an ellipse. 8Point2D. €€€€€ = 3 In[6]: Sketch2D@8crv1. PlotRange −> 88−5. − €€€€€€€€€ E. 6 5 4 3 2 1 0 -1 10. 3<D. 0. 0. Foci2D. −54.

5 1 0. 3. 3 2.4724. Solution. The eccentricity is given by e= √ a2 − b 2 . 1).5 0 -2 -1 0 1 2 3 4 . p2<. The Descarta2D function Ellipse2D[{point. 1<D. is one-half the distance between the vertices. Find the ellipse whose vertices are (4. The line through the two vertex points determines the rotation angle of the ellipse as θ = tan−1 (x2 − x1 . 7 ê 8D êê N Out[7] Ellipse2D@81. solving for b gives the length of the semi-minor axis as b=a p 1 − e2 . y2 − y1 ). 1. point}.5 2 1.152 Chapter 10 Ellipses The length of the semi-major axis. yielding a = |V1 V2 |/2. Example. and whose eccentricity is 7/8. e1 = Ellipse2D@8p1. p2. p2 = Point2D@8−2. e] returns the ellipse whose vertices are the given points with the specified eccentricity. a. In[7]: p1 = Point2D@84. 2<D. 2) and (−2.165149D In[8]: Sketch2D@8p1. 1. e1<D.04138. a so. 0..5<.

In[9]: e1 = Ellipse2D@Point2D@8−1. This relationship allows us to construct an ellipse by specifying the two foci and the eccentricity. The semi-major axis length.6 153 Ellipse from Foci and Eccentricity It is evident from Table 10. The distance. of an ellipse we wish to determine the standard equation of the ellipse. d. −1<D<. 0 < e < 1. d= p2 + q 2 . where F1 (x1 . 1<D. The Descarta2D function Ellipse2D[point. €€€€€ = 10. The rotation angle of the ellipse is the angle the line perpendicular to L makes with the +x-axis and is given by θ = tan−1 (p. 6 . q). and the eccentricity. Therefore. the eccentricity. y2 − y1 ).6 Ellipse from Foci and Eccentricity 10. Solution. y2 ) are the coordinates of the foci. 1) and whose eccentricity is 1/2. 0<. 1 ê 2D Out[9] Ellipse2DA80. the directrix line L ≡ px + qy + r = 0. e. 2 è!!! è!!! π 2 . is given by a = |F1 F2 |/2e and the semi-minor axis length is √ b = a 1 − e2 . Point2D@8−1. Point2D@81. a. y1 ). y1 ) and F2 (x2 . −1<D. from F to L is given by s (px1 + qy1 + r)2 . Example. point. given by |F1 F2 | 2ae = e= 2a |V1 V2 | is the ratio of the distance between the foci to the distance between the vertices.7 Ellipse from Focus and Directrix Given the focus point F (x1 . 1<D. The center point of the ellipse is clearly the midpoint of the two foci and the angle of rotation is θ = tan−1 (x2 − x1 .10. e] constructs an ellipse given the two foci points and the eccentricity.2 that the distance between the foci of an ellipse is |F1 F2 | = 2ae and that the distance between the vertices is |V1 V2 | = 2a. Eccentricity2D@e1D< 1 2 Out[10] 98Point2D@81. Find the ellipse whose foci are (−1. −1) and (1. €€€€€ E 4 In[10]: 8Foci2D@e1D.

€€€€€ = 4 . d= p2 + q 2 p2 + q 2 Example. −2D. respectively. In[11]: e1 = Ellipse2D@p1 = Point2D@83. This computation is easily accomplished using Descarta2D and is provided in the exploration ellfd.2 that the distance from F to L is also given by d = a/e − ae. 2<D. Solution.154 Chapter 10 Ellipses It is clear from Table 10. h = x1 + d d p e . Line2D@−5. $%%%%%%% €€€€€€€€€% . then we can find the center point C of the ellipse by offsetting F in the direction from F to F 0 a distance −ae. 22D<. €€€€€ =E=. Directrices2D@e1D. €€€€€€€€€€ E In[12]: 8Foci2D@e1D. −1. 2<D. e= a Solving this equation for b yields p b = a 1 − e2 . Find the ellipse whose focus point is (3. directrix and eccentricity. a and b. €€€€€€€€€€€€€€€€ .nb. e.2 shows that the eccentricity. Point2DA9 €€€€€€€€€ . 2). 1 ê 4D 31 10 19 10 2 è!!! 2 5 3 10 3π 4 Out[11] Ellipse2DA9 €€€€€€€€€ . 1. a=d (1 − e2 ) Table 10. If F 0 is the projection of F onto L. directrix line x − y + 2 = 0 and eccentricity is 1/4. 1 8Line2D@−1. by √ a2 − b 2 . a=d (1 − e2 ) where s px1 + qy1 + r (px1 + qy1 + r)2 and D = . The Descarta2D function Ellipse2D[point. The resulting defining constants of the ellipse are given by paeD qaeD . 2D. Table 10. e] constructs an ellipse for the focus.2 reveals that the distance from the focus F to the center C(h. Solving for a (the length of the semi-major axis) yields e . is related to the lengths of the semi-major and semi-minor axes. line. 5. €€€€€€€€€ =. k = y1 + . k) is given by ae. b = a 1 − e2 . Eccentricity2D@e1D< êê Simplify 16 5 9 5 Out[12] 99Point2D@83. l2 = Line2D@1.

a and b are the lengths of the semi-major and semiminor axes. and parameter values in the range 0 ≤ t < 2π generate a complete curve. Solution. Plot 16 points on the ellipse y2 x2 + =1 16 4 at equally spaced parameter values. or the semi-minor axis. b. The validity of these equations can be verified by direct substitution. pts<D. pts = Map@Point2D@e1@2 ∗ Pi ∗ # ê 16DD&. 0<. θ][t] returns the coordinates of a point at parameter value t on the ellipse. a.10. Sketch2D@8e1. 4. with the exception that the radius is replaced by either the length of the semi-major axis. 0D. The ellipse y2 x2 + =1 a2 b2 . The Descarta2D function Ellipse2D[{h. b. In[13]: e1 = Ellipse2D@80. 2 1 0 -1 -2 -4 -2 0 2 4 As with the circle.8 155 Parametric Equations The parametric equations for a standard ellipse (y − k)2 (x − h)2 + =1 a2 b2 are very similar to those of a circle. Range@0. 15DD. respectively. a. The appropriate equations are x = h + a cos θ and y = k + b sin θ where (h. a pair of rational equations may be used as the parametric equations for an ellipse. Example. 2. k}.8 Parametric Equations 10. k) is the center of the ellipse.

. . . The point (−a. . . Solution. . 10<. . . —– Sum of Focal Distances of an Ellipse.nb Prove that the length of the focal chord of an ellipse is 2b2 /a. where a is the length of the semi-major axis and b is the length of the semi-minor axis. Plot the ellipse x2 /4 + y 2 = 1 using the rational parametric equations in the parameter range −10 ≤ t ≤ 10. . . . . In[14]: Clear@tD. 0).5 -1 10. . . . . . . . .156 Chapter 10 Ellipses has the parametric equations  x=a 1 − t2 1 + t2   and y = b 2t 1 + t2  . . . . . . . . .9 Explorations Length of Ellipse Focal Chord. . −10. .5 -2 -1 1 2 -0. cannot be generated using these equations. . . . . . . . . . . . . . . . . . —– . . . Values of t in the range 0 ≤ t ≤ 1 generate coordinates on the ellipse in the first quadrant. . . 1 0. . . . . 2 ∗ 1 ∗ t ê H1 + t ^ 2L<. . . . ParametricPlot@82 ∗ H1 − t ^ 2L ê H1 + t ^ 2L. . . . . 8t. . . ellips2a. . . . AspectRatio −> AutomaticD. Example. . which is on the ellipse. . . . The Mathematica function ParametricPlot plots curves defined by parametric equations. . . . . where a is the length of the semi-major axis. . . elllen.nb Show that the sum of the distances from the two foci to any point on an ellipse is 2a.

h = x1 + a=d s where d= e (1 − e2 ) px1 + qy1 + r (px1 + qy1 + r)2 and D = . . —– Ellipse Locus. . . . . . . . . . Show this property is true for two ellipses of equal eccentricity centered at the origin. . . . elldist. . .nb All ellipses of equal eccentricity are essentially similar in that by a proper choice of scales (and axes) they can be made to coincide. . . k = y1 + . . . . . . . . . . . . . . . . . . . . . . . . . . . . —– Similar Ellipses. . . . . . . b = a 1 − e2 . . . . . —– Apoapsis and Periapsis of an Ellipse. . . . . . . . . . . . .nb Show that the ellipse with focus F (x1 . . . . . is defined by the constants paeD qaeD . —– Polar Equation of an Ellipse . . .10. θ = tan−1 (p. . . . . . . . . . . . ellfd. . ellsim. . . . . . . . . . . . .9 Explorations 157 Ellipse from Focus and Directrix. where e is the eccentricity and a is the length of the semi-major axis of the ellipse. . . . . . . . . . . respectively. . . . . . . . y1 ). . . . . .nb A point moves so that the sum of the squares of its distances from two intersecting straight lines is a constant. Distance from Two Lines. . . . . . . . . . . . polarell. . . respectively. . . . . . d d p . . . . ellrad. . 0 < e < 1. . . .nb Show that the greatest (apoapsis) and least (periapsis) radial distance of a point on an ellipse as measured from a focus point is given by r = a(1 + e) and r = a(1 − e). . . . . . Prove that its locus is an ellipse. . . . . . . . . . . . . . . . . 0) is given by ab r= p a2 sin2 θ + b2 cos2 θ where a and b are the lengths of the semi-major and semi-minor axes.nb Show that the focus of an ellipse is the pole of the corresponding directrix. . . . . . . . . . . . . . . . . . . . . . . . . . . . .nb Show that the polar equation of an ellipse with a horizontal major axis and centered at (0. . q). . . . . . . . . . . . . . . . . . . . —– . . . . . . . . . . . . . . . . elfocdir. . . . . . . . . . . . . . . . . . . . p2 + q 2 p2 + q 2 —– Focus of Ellipse is Pole of Directrix. directrix line L ≡ px+qy+r = 0 and eccentricity. . . . . .

.

1: Hyperbola definition. Consider the line through the focus perpendicular to the directrix. As with the parabola and ellipse.1 Definitions A hyperbola is the locus of a point that moves so that the ratio of its distance from a fixed point and from a fixed line is a constant greater than one. they are called the vertices. Element Description P (x. From the definition P F/P D = e/1 there are obviously two points V and V 0 which divide the (undirected) segment F D. are somewhat less intuitive than an ellipse. however. the forms often only differing by a + or − sign. 11. V and V 0 are points (on opposite sides of D) on the hyperbola. in the ratio of e/1. The segment V V 0 is called the transverse axis.Chapter 11 Hyperbolas The equations of a hyperbola are in many ways similar to those of an ellipse. directrix and eccentricity are associated with the curve as shown in Table 11.1. internally and externally respectively. possibly because the curve has two disjoint branches or because it extends to infinity. a focus. The properties and characteristics of a hyperbola. By symmetry. Therefore. y) Point on locus Fixed point F Focus Fixed line D Directrix Fixed constant e Eccentricity e = P F/P D > 1 Hyperbola relationship 159 . This chapter describes the detailed mathematics of a hyperbola. there is another point F 0 and another line D0 such Table 11.

yL F¢ V¢ C V x F D¢ D Figure 11. Plot the hyperbola with center at coordinates (2. A line through C perpendicular to the transverse axis does not intersect the hyperbola in real points. Example. Hyperbola2D[{h. conjugate axis length of 3/4 and rotated 30◦ (π/6 radians) about the center point.160 Chapter 11 Hyperbolas y PHx.1: Hyperbola definition. D0 . which is equal in length to the parallel segment through V contained between the asymptotes is called the conjugate axis. In[1]: Sketch2D@8Hyperbola2D@82. 3 ê 4. a hyperbola has two foci and two directrices associated in pairs F . . k). D and F 0 . The hyperbola is centered at coordinates (h. But the portion of it. is called the center C. bisected by C. b. has semitransverse axis of a. There are two tangent lines through C whose points of contact are at an infinite distance from C. The focal chord perpendicular to the transverse axis is called the latus rectum. a. transverse axis length of 1. k}. the semi-conjugate axis is half the length of the conjugate axis). θ] is the standard representation of a hyperbola in Descarta2D. 1<. Pi ê 6D<D. These are called the asymptotes of the hyperbola. The midpoint of F F 0 . that F 0 and D0 would serve in the definition of this curve. semi-conjugate axis of b and is rotated about the center point by an angle θ (the semi-transverse axis is half the length of the transverse axis. Thus. Solution. 1). 1. which is also the midpoint of V V 0 .

a necessary condition that Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 represent a hyperbola is that B 2 − 4AC > 0. where A21 + B12 = 1. y1 ) as focus and any line.2 161 0 2 4 6 8 General Equation of a Hyperbola Take any point F (x1 . Therefore. The equation of a hyperbola in this position will have no xy term. By definition the equation of the hyperbola is p (x − x1 )2 + (y − y1 )2 = ±e(A1 x + B1 y + C1 ) which may be expanded to (e2 A21 − 1)x2 + 2e2 A1 B1 xy + (e2 B12 − 1)y 2 + 2(x1 + e2 A1 C1 )x + 2(y1 + e2 B1 C1 )y + (e2 C12 − x21 − y12 ) = 0. The normalized form of the line is used to simplify the derivation. This is of the form Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0. Moreover. since either A1 or B1 will be zero.11. D ≡ A1 x + B1 y + C1 = 0 as directrix. The general equation reveals that if the defining directrix line is parallel to one of the coordinate axes then B = 0. an equation of the second degree. it can be verified that B 2 − 4AC = 4(e2 − 1) > 0 (when e > 1).3 Standard Forms of a Hyperbola By an appropriate choice of coordinate axes the general equation of a hyperbola can be reduced to one of the following standard forms. 11.2 General Equation of a Hyperbola 4 3 2 1 0 -1 -2 -4 -2 11. Transverse Axis Parallel to the x-Axis The equation of a hyperbola in standard position whose transverse axis is parallel to the x-axis and whose center is at the origin is y2 x2 − =1 a2 b2 .

162 Chapter 11 Hyperbolas y D D V F V F C x Figure 11.3: Hyperbola in standard position (y-axis). . y F D C V D F x Figure 11.2: Hyperbola in standard position (x-axis).

The lengths of the transverse axis.and y-axis). k ± a) Foci F (h ± ae.2. The left-hand side of the equation will then factor into two linear terms which are the asymptotes of the hyperbola. k) y-axis − (x − h)2 (y − k)2 + =1 2 b a2 C(h.2. k) F (h. lines and constants associated with the hyperbola are simply determined and are summarized in Table 11. focal chord and the value of the eccentricity are independent of the origin and are also given in Table 11. k).3 Standard Forms of a Hyperbola 163 Table 11. x-axis Equation Center (y − k)2 (x − h)2 − =1 2 a b2 C(h.2: Hyperbola definition (x. k ± ae) Directrices x = h ± a/e y = k ± a/e Asymptotes bx ± ay − (bh ± ak) = 0 ax ± by − (ah ± bk) = 0 2 2b2 /a √ a2 + b 2 >1 e= a Focal chord length Eccentricity 2b /a √ a2 + b 2 >1 e= a where a and b are the lengths of the semi-transverse and semi-conjugate axes. Note that the equations of the asymptotes can be obtained directly from the equation of the hyperbola in standard form by replacing the one on the right-hand side of the equation with a zero.2. conjugate axis.11. then the equation is (y − k)2 (x − h)2 − =1 a2 b2 as shown in Figure 11. If the hyperbola is centered at (h. respectively. When a hyperbola is in this special position. Transverse Axis Parallel to the y-Axis The equation of a hyperbola in standard position whose transverse axis is parallel to the y-axis and whose center is at the origin is − y2 x2 + =1 b2 a2 . k) Semi-transverse axis a a Semi-conjugate axis b b Vertices V (h ± a. the formulas for the important points. k) V (h.

4. 0]. transverse axis length 6 (parallel to the x-axis). The equations of two conjugate hyperbolas H and H 0 in standard form are shown in Table 11. respectively. Find the equations of its directrices and asymptotes. then a is the semi-conjugate axis of H 0 . focal chord and the value of the eccentricity are independent of the origin and are also shown in Table 11. and conjugate axis length 8.164 Chapter 11 Hyperbolas Table 11. If the hyperbola is centered at (h. These constants have the same values as a hyperbola whose transverse axis is parallel to the x-axis. then the equation is − (y − k)2 (x − h)2 + =1 2 b a2 as shown in Figure 11. Write the equation of the hyperbola whose center is (−2. Conjugate hyperbolas have the same asymptotes and their foci lie on a circle with center at the center of the hyperbolas. 3. Plot the geometric objects. Conjugate and Rectangular Hyperbolas Two hyperbolas with the same center are conjugate hyperbolas if the transverse axis of one coincides with the conjugate axis of the other. 1}.2. Solution. The equation can be written directly using the standard form as (y − 1)2 (x + 2)2 − = 1. When a hyperbola is in this special position. and vice versa.3: Conjugate hyperbolas. k) Transverse Axis H parallel to x-axis H0 parallel to y-axis (y − k)2 (x − h)2 − =1 2 a b2 (x − h)2 (y − k)2 − + =1 a2 b2 where a and b are the lengths of the semi-transverse and semi-conjugate axes.2 The lengths of the semi-transverse axis.3. .3. k). It is evident that if a is the semi-transverse axis of H. 9 16 In Descarta2D this hyperbola is written as Hyperbola2D[{-2. 1). lines and constants associated with the hyperbola are simply determined and are summarized in Table 11. foci and vertices. Center at (h. Example. semi-conjugate axis. Determine its eccentricity. the formulas for the important points.

€€€€€ E. . 4. In[4]: objs = Map@H #@h1D L&.5 0 -2.3 Standard Forms of a Hyperbola 165 In[2]: h1 = Hyperbola2D@8−2. 8Line2D@4. Plot the hyperbola whose equation is 4x2 − y 2 + 36 = 0 along with its conjugate. Hyperbola2D[hyperbola. 1 19 9Line2DA1. In[3]: Eccentricity2D@h1D 5 3 Out[3] €€€€€ The Descarta2D function Foci2D[hyperbola] returns a list of the two focus points. Line2DA1.5 5 2. PlotRange −> 88−14. 1<. 1<D<. Vertices2D. The function Loci2D[quad] constructs a list containing the objects represented by a quadratic equation. 1<D. Asymptotes2D<D Out[4] 98Point2D@83. 3. objs<. 8−9. 8Point2D@81. 10<. €€€€€€€€€ E=. 5D. Point2D@8−5. 0. Solution. Line2D@4. Directrices2D.5 -5 -7. 0. the function Directrices2D[hyperbola] returns a list of the two directrix lines. The Descarta2D function Eccentricity2D[hyperbola] returns the eccentricity of the hyperbola. CurveLength2D −> 40. 10 7. 1<D. Conjugate2D] constructs the conjugate of a hyperbola.11. the function Vertices2D[hyperbola] returns a list of the two vertex points. 11D<= 5 5 In[5]: Sketch2D@8h1.5 -10 -5 0 5 10 Example. 11<<D. the function Asymptotes2D[hyperbola] returns a list of the two asymptote lines. 0D. 1<D<. 8Foci2D. −3. Point2D@8−7. 3.

CurveLength2D −> 40. IsOn2D@f2b.166 Chapter 11 Hyperbolas In[6]: 8h1< = Loci2D@Quadratic2D@4. Reduce x2 − y 2 − 2x − y + 1 = 0 to standard form and plot. This equation can be reduced to one of the standard forms by completing the square.5 5 2. −1. in which case the asymptotes are at right angles to each other. 8f2a. c1 = Circle2D@f1a. 0. 6. by returning True. The condition B 2 − 4AC > 0 reduces to AC < 0 which implies that A and C are of opposite sign. c1]. Example. 0D In[8]: f = 88f1a. 10 7. 0. 0. 12<. c1<. 3.5 -10 -10 -5 0 5 10 A rectangular (or equilateral ) hyperbola is one in which the transverse and conjugate axes are equal in length. shows that the foci of both hyperbolas are on a common circle. . 6. 3. AC < 0. 0<. 36DD π 2 Out[6] 9Hyperbola2DA80. f1b. 11. f2aD. h2. c1D Out[8] True The statement IsOn2D[f2b. In[9]: Sketch2D@8h1. €€€€€ E= In[7]: h2 = Hyperbola2D@h1. 10<<D.4 Reduction to Standard Form The most general equation of a hyperbola with no xy term (and hence one whose axes are parallel to the coordinate axes) is of the form Ax2 + Cy 2 + Dx + Ey + F = 0. 8−10.5 0 -2. 0<. PlotRange −> 88−12.5 -5 -7. f1b< = Foci2D@h1D. Conjugate2DD Out[7] Hyperbola2D@80. f. f2b< = Foci2D@h2D<.

y1 ) and V2 (x2 . e= a . 0.5 -2 -1 0 1 2 3 4 5 Hyperbola from Vertices and Eccentricity Suppose we are given the two vertices.5 Hyperbola from Vertices and Eccentricity 167 Solution. The center point (h. 1DD 1 2 1 2 1 2 π 2 Out[10] 9Hyperbola2DA91. − €€€€€ =. −1. 2 2 The length of the semi-transverse axis. a. k) of the hyperbola is clearly the midpoint between the vertices and is given by   x1 + x2 y1 + y2 . y2 ) and the eccentricity. −2. €€€€€ . The Descarta2D function Loci2D[quad] constructs a list containing the objects represented by the quadratic. yielding a = |V1 V2 |/2. e. In[11]: Sketch2D@8h1<D. The eccentricity is given by √ a2 + b 2 . 4 3 2 1 0 -1 -2 -3 -4 11.11. In[10]: h1 = Loci2D@Quadratic2D@1. V1 (x1 . is one-half the distance between the vertices. €€€€€ E= The equation in standard form is − (x − 1)2 1 4 + (y + 12 )2 1 4 = 1. This is a rectangular hyperbola with a = b = 12 . −1. . €€€€€ . of a hyperbola and we wish to find the standard equation of the hyperbola.

40037. 1<D. e. h1<D. Solution. p2 = Point2D@8−2. 2<D.6 2 4 6 Hyperbola from Foci and Eccentricity It is evident from Table 11. point}. Therefore. In[12]: p1 = Point2D@84. and whose eccentricity is 3/2. the eccentricity.5<. Example. Find the hyperbola whose vertices are (4. 2) and (−2.. 3.168 Chapter 11 Hyperbolas so. 0. p2<. The line through the two vertex points determines the rotation angle of the hyperbola as θ = tan−1 (x2 − x1 .2 that the distance between the foci of a hyperbola is given by |F1 F2 | = 2ae and that the distance between the vertices is |V1 V2 | = 2a. 1. 6 4 2 0 -2 -4 -4 -2 0 11. 3 ê 2D êê N Out[12] Hyperbola2D@81. p2.04138.165149D In[13]: Sketch2D@8p1. e] returns the hyperbola whose vertices are the given points with the specified eccentricity. The Descarta2D function Hyperbola2D[{point. given by |F1 F2 | 2ae = e= 2a |V1 V2 | . solving for b gives the length of the semi-conjugate axis as p b = a e2 − 1. h1 = Hyperbola2D@8p1. y2 − y1 ). 3. 1).

where F1 (x1 . e= a . is given by a = |F1 F2 |/2e and the semi-conjugate axis √ length is b = a e2 − 1. €€€€€€€€€€€€€€€€ . The rotation angle of the hyperbola is the angle the line perpendicular to L makes with the +x-axis and is given by θ = tan−1 (p.11. e > 1. y1 ). €€€€€ E In[15]: 8Foci2D@h1D. by √ a2 + b 2 . €€€€€ = 11. y2 − y1 ). y2 ) are the coordinates of the foci. from F to L is given by s (px1 + qy1 + r)2 . point. a and b. 1<D. Solution. The distance. d= p2 + q 2 It is clear from Table 11. The semi-transverse axis length. €€€€€€€€€€€€€€€ . the directrix line L ≡ px + qy + r = 0 and the eccentricity. Point2D@8−1. (e2 − 1) Table 11. is related to the lengths of the semi-transverse and semi-conjugate axes. Example. q). of a hyperbola we wish to determine the standard equation of the hyperbola. 1<D. Eccentricity2D@h1D< 3 2 Out[15] 98Point2D@81. The center point of the hyperbola is clearly the midpoint of the two foci and the angle of rotation is arctan(x2 − x1 .2 shows that the eccentricity. −1<D<. e.2 that the distance from F to L is also given by d = ae − a/e. Find the hyperbola whose foci are (−1. Point2D@81.7 Hyperbola from Focus and Directrix Given the focus point F (x1 . 3 ê 2D 2 è!!! 2 3 è!!!!! 10 3 π 4 Out[14] Hyperbola2DA80. The function Hyperbola2D[point. respectively. In[14]: h1 = Hyperbola2D@Point2D@8−1. y1 ) and F2 (x2 . −1<D. d. e] constructs a hyperbola given the two foci points and the eccentricity. This relationship allows us to construct a hyperbola by specifying the two foci and the eccentricity. Solving for a (the length of the semi-transverse axis) yields a=d e . a.7 Hyperbola from Focus and Directrix 169 is the ratio of the distance between the foci to the distance between the vertices. 0<. 1) and whose eccentricity is 3/2. −1) and (1.

€€€€€€€€€€ E 8 2 In[17]: 8Foci2D@h1D. 2). p2 + q 2 p2 + q 2 Example. €€€€€€€€€ =. −2D<. 4. 11. directrix and eccentricity. 1. l2 = Line2D@1. Solution. 5= Out[17] 99Point2DA9− €€€€€ . €€€€€€€€€€€€€€€€ . e] constructs a hyperbola from the focus. Directrices2D@h1D. The defining constants of the hyperbola so computed are paeD qaeD . k = y1 − . d d p e . a=d 2 (e − 1) h = x1 − s where d= px1 + qy1 + r (px1 + qy1 + r)2 and D = . This computation is easily accomplished using Descarta2D and is provided in the exploration hypfd. Find the hyperbola whose focus is (3.nb. k) of the hyperbola by offsetting F in the direction from F to F 0 a distance ae. Table 11.170 Chapter 11 Hyperbolas Solving this equation for b yields p b = a e2 − 1. If F 0 is the projection of F onto L.2 reveals that the distance from the focus F to the center C(h. The Descarta2D function Hyperbola2D[point. −9D. −1. 5D 23 16 57 16 5 5 è!!! 3 4 3π 4 Out[16] Hyperbola2DA9 €€€€€€€€€ . directrix line is x − y + 2 = 0 and eccentricity is 5. b = a e2 − 1. line.8 Parametric Equations The standard form of a hyperbola used in Descarta2D has the equation (y − k)2 (x − h)2 − =1 a2 b2 . 2<D. k) is given by ae. Point2D@83. Eccentricity2D@h1D< êê Simplify 1 41 8 8 8Line2D@−4. then we can find the center point C(h. €€€€€€€€€€€€€€€€ è!!! . 2D. Line2D@−1. 2<D=. In[16]: h1 = Hyperbola2D@p1 = Point2D@83. €€€€€€€€€ =E.

Hyperbolas in other orientations are obtained by applying a rotation. 5<<. respectively. θ][t] returns the coordinates at parameter t on the hyperbola. 0DD. the equations used in Descarta2D are x = h + a cosh(st) and y = k + b sinh(st) where s = cosh−1 e and e is the eccentricity of the hyperbola.8 Parametric Equations 171 where (h. The axis of this hyperbola is parallel to the x-axis and the hyperbola opens to the right and left. Range@−7. Sqrt@2D. The parametric equations are x = h + cosh t and y = k + sinh t. All of the points on the right branch need to be reflected in the conjugate axis of the hyperbola to produce the left branch of the curve. b. Specifically. pts1<. Negative values of t produce points that correspond to positive t values reflected in the transverse axis of the hyperbola. θ. 0<. prD. 7DD. Solution. pts2 = Map@Point2D@h1@# ê 3DD&. The command Hyperbola2D[{h. Range@0.11. except hyperbolic functions are used instead of standard trigonometric functions. In[18]: h1 = Hyperbola2D@80. In Descarta2D the parametric equations of a hyperbola are scaled by a factor s so that the end points of the focal chord are at the parameter values −1 and +1. Plot eight points at equal parameter values on the upper and lower portions of the right branch of the hyperbola x2 /4 − y 2 /2 = 1. The validity of these equations can be verified by direct substitution. 0D. 2. Sketch2D@8h1. to the standard hyperbola. k}. a. pts1 = Map@Point2D@h1@# ê 3DD&. 8−5. pts2<. prD. 10<. Increasing values of t produce points above and to the right of this vertex. k) is the center of the hyperbola. and a and b are the lengths of the semi-transverse and semi-conjugate axes. . pr = PlotRange −> 88−6. Example. Sketch2D@8h1. The parametric equations for a hyperbola are similar to those of an ellipse. The parameter value t = 0 produces the vertex point on the right branch of the hyperbola.

8t. The Mathematica function ParametricPlot plots curves defined by parametric equations. The other portions of the curve can be generated by reflecting the coordinates generated by these equations.5 5. Plot the hyperbola x2 /25 − y 2 = 1 using the rational parametric equations in the parameter range −1/2 ≤ t ≤ 1/2.5 8 -0. ParametricPlot@85 ∗ H1 + t ^ 2L ê H1 − t ^ 2L. The hyperbola y2 x2 − 2 =1 2 a b has the parametric equations     2t 1 + t2 and y = b . AspectRatio −> AutomaticD. 1 ê 2<. 1 0. −1 ê 2. a pair of rational equations may be used as the parametric equations for a hyperbola. Example.5 -1 . In[19]: Clear@tD.172 Chapter 11 Hyperbolas 4 4 2 2 0 0 -2 -2 -4 -4 -4 -2 0 2 4 6 8 10 -4 -2 0 2 4 6 8 10 As with the ellipse. 2 ∗ 1 ∗ t ê H1 − t ^ 2L<. x=a 1 − t2 1 − t2 Values of t in the range 0 ≤ t < 1 generate coordinates on the hyperbola in the first quadrant. Solution.5 6 6.5 7 7.

. . . .nb Show that the polar equation of a hyperbola with a horizontal transverse axis and centered at (0. . . .9 Explorations 11. . . . . . . . . . . . . .nb Show that the hyperbola with focus F (x1 . . . . . . polarhyp. . . . . . . . . . . . . . . . . . . . .hyp2a. . . . . .11. . . . . . then 1/(e21 ) + 1/(e22 ) = 1. hypeccen. . . . . . . —– Eccentricities of Conjugate Hyperbolas. . . . . . . hyplen. . d d p . . . . . . . k = y1 − .nb Show that the parametric equations x = a sec θ and y = b tan θ . . . . . .nb Prove that the length of the focal chord of a hyperbola is 2b2 /a. . . . . . . . . . . θ = tan−1 (p. . . . . . . . . . . hyptrig. . . .nb Show that the distance of any point on a rectangular hyperbola from its center varies inversely as the perpendicular distance from its polar to the center. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p2 + q 2 p2 + q 2 —– Rectangular Hyperbola Distances. . . . . . . . y1 ). . . . . . e > 1 is defined by the constants paeD qaeD . . q). . . . . . . . . . . . . . . . . . . where a is the length of the semi-transverse axis and b is the length of the semi-conjugate axis. . 0) is given by ab r= p 2 2 b cos θ − a2 sin2 θ where a and b are the lengths of the semi-transverse and semi-conjugate axes. . .9 173 Explorations Length of Hyperbola Focal Chord. . —– Focal Distances of a Hyperbola. . . . . . . . . . . b = a e2 − 1. . . . . . . .nb Show that the difference of the distances from the two foci to any point on a hyperbola is 2a. . . . directrix L ≡ px + qy + r = 0 and eccentricity. . .nb Show that if e1 and e2 are the eccentricities of a hyperbola and its conjugate. . . . hypfd. . . . . . . . . . . —– Hyperbola from Focus and Directrix. . . .. . . . . . —– Trigonometric Parametric Equations . . . . . . . . . . . . . . . . . hypinv. . . where a is the length of the semi-transverse axis. . . . . respectively. —– Polar Equation of a Hyperbola . . . . . . . h = x1 − a=d s where d= e (e2 − 1) px1 + qy1 + r (px1 + qy1 + r)2 and D = . . . . . . . . . . . . . . . . . . . .

a2 b2 .174 represent the hyperbola —– Chapter 11 Hyperbolas y2 x2 − = 1.

The following subsections describe each of these reduction steps in more detail. parabolas. eliminate it by applying an appropriate rotation. parabola. (3) two lines (parallel. (4) a circle. ellipse or hyperbola in standard position and (5) several forms with no real locus (imaginary). The method involves examining the coefficients of the equation and applying algebraic operations to the equation which successively simplify the equation until a standard form can be recognized by inspection. (2) a single line. then the standard form of the curve can be determined by inspection. The general approach involves the following steps: • If the quadratic equation is one of several special forms.1 Conic from Quadratic Equation In this section we will present a method for converting a general quadratic equation of the form Q ≡ Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 to a conic curve in a standard form. Once the curve is identified. • If there is an xy cross-product term in the quadratic equation (B 6= 0). ellipses and hyperbolas. After the standard curve is identified. translate the standard curve back to the original position. • If the quadratic equation has first-degree terms (D 6= 0 or E 6= 0). 12. The following curves have a quadratic form that can be directly recognized: (1) a single point.Chapter 12 General Conics In previous chapters we have examined specific forms of an equation of the second degree resulting in a detailed understanding of circles. translate the equation to a coordinate system that eliminates the x or y terms. 175 . coincident or intersecting). rotate it back to the original position. In this chapter we will study the general second-degree equation itself resulting in a more complete understanding of the equation.

y<DD Out[2] 8Line2D@2. D and E not both zero. Otherwise. x= 2A If the discriminant of this equation. Show that Descarta2D will detect a quadratic equation as a line if the first three coefficients are zero. −4D. is less than zero. Example. 0. −2. This yields the two equations √ −D ± D2 − 4AF . The two lines are coincident if d = 0. Loci2D@Quadratic2D@x − 2 y + 4 == 0. 0. Use the Descarta2D function Loci2D[quad]. 4D< Pair of Vertical Lines Form: Q ≡ Ax2 + Dx + F = 0. Solution. Loci2D@Quadratic2D@x ^ 2 + x − 6 == 0. If Q takes the form Ax2 + Dx + F = 0 and A 6= 0 then Q can be factored into two linear terms using the quadratic formula. If the first three coefficients of Q are equal to zero. y<DD Out[1] 8Line2D@1. A 6= 0. Solution. then there are no real points in the locus represented by Q. Example. yD. and coefficients D and E are not both zero. 8x. Use the line x − 2y + 4 = 0 as an example. Line2D@2. In[2]: Clear@x. then the equation Q represents a single straight line Dx + Ey + F = 0. 6D< . 8x. d = D2 − 4AF . Show that the equation x2 + x − 6 = 0 represents two vertical lines. Use the Descarta2D function Loci2D[quad].176 Chapter 12 General Conics Linear Polynomial Form: Q ≡ Dx + Ey + F = 0. In[1]: Clear@x. yD. Q represents a pair of vertical lines whose equations are √ √ 2Ax + (D + d) = 0 and 2Ax + (D − d) = 0.

then the equation factors into the two linear terms √ √  √ √  −Ax − Cy −Ax + Cy = 0. Q represents a pair of horizontal lines whose equations are √ √ 2Cy + (E + d) = 0 and 2Cy + (E − d) = 0. If Q consists of x2 and y 2 terms only its locus is either a single point or a pair of intersecting lines. Loci2D@Quadratic2D@2 y ^ 2 − 11 y + 12 == 0. yD. If Q takes the form Cy 2 + Ey + F = 0 and C 6= 0 then Q can be factored into two linear terms using the quadratic formula. In[3]: Clear@x. 4. If A < 0 and C > 0. 4. Show that the equation 2y 2 − 11y + 12 = 0 represents two horizontal lines. If A > 0 and C < 0. The two lines are coincident if d = 0. This yields the two equations √ −E ± E 2 − 4CF . is less than zero. −16D. Use the Descarta2D function Loci2D[quad]. Otherwise. .12. d = E 2 − 4CF . Line2D@0. y<DD Out[3] 8Line2D@0. −6D< Intersecting Lines (or a Single Point) Form: Q ≡ Ax2 + Cy 2 = 0. then there are no real points in the locus represented by Q. 8x.0). C 6= 0. y= 2C If the discriminant of this equation.1 Conic from Quadratic Equation 177 Pair of Horizontal Lines Form: Q ≡ Cy 2 + Ey + F = 0. Example. A 6= 0 and C 6= 0. If AC > 0 then the locus is the single point (0. Both of these equations represent a pair of lines that intersect at the origin. then the equation factors into the two linear terms given by  √  √ √ √ Ax − −Cy Ax + −Cy = 0. Solution.

Solution. the locus √ is a circle centered at the origin with radius −F . −2. y<DD Out[4] 8Line2D@3. Example. (h. when F < 0. 0D. h= . k). A = C. 2D< Parabola (Horizontal Axis) Form: Q ≡ Cy 2 + Dx + Ey + F = 0. F 6= 0. Solution. C 6= 0 and D 6= 0. Line2D@3. f . 0<. Loci2D@Quadratic2D@3 x ^ 2 + 3 y ^ 2 − 12 == 0. C. k=− and f = − 4CD 2C 4C which is clearly a parabola. When Q has a y 2 term and an x term. In[5]: Clear@x. Use the Descarta2D function Loci2D[quad]. 0D< Circle Form: Q ≡ Ax2 + Cy 2 + F = 0. In[4]: Clear@x. Show that the equation 9x2 − 4y 2 = 0 represents a pair of intersecting lines. 2. y<DD Out[5] 8Circle2D@80. Q represents a parabola whose axis is horizontal. When the coefficients of the x2 and y 2 terms of Q are equal and none of the coefficients A. Loci2D@Quadratic2D@9 x ^ 2 − 4 y ^ 2 == 0. 8x. and the x2 and xy terms are missing. or F are equal to zero. The vertex.178 Chapter 12 General Conics Example. Use the Descarta2D function Loci2D[quad]. The parabola will open to the right if f is positive and it will open to the left if f is negative. may be determined by completing the square and forming the equation (y − k)2 = 4f (x − h) where E D E 2 − 4CF . yD. yD. 8x. the equation has no locus if F > 0. A 6= 0. and the focal length. C 6= 0. otherwise. Show that the equation 3x2 + 3y 2 − 12 = 0 is the equation of a circle.

yD. crv = Loci2D@Quadratic2D@y ^ 2 − 8 x == 0. 0D< In[7]: Sketch2D@crv. and f = − 2A 4AE 4A which is clearly a parabola. 8x. f . k).12. 15 10 5 0 -5 -10 -15 0 5 10 15 20 25 Parabola (Vertical Axis) Form: Q ≡ Ax2 + Dx + Ey + F = 0. Use the Descarta2D function Loci2D[quad]. The parabola will open upward if f is positive and it will open downward if f is negative. CurveLength2D −> 60D. 0<.1 Conic from Quadratic Equation 179 Example. When Q has an x2 term and a y term. (h. 2. may be determined by completing the square and forming the equation (x − h)2 = 4f (y − k) where h=− D2 − 4AF E D . and the focal length. A 6= 0 and E 6= 0. The vertex. . Solution. Q represents a parabola whose axis is vertical. and the y 2 and xy terms are missing. In[6]: Clear@x. y<DD Out[6] 8Parabola2D@80. Find and plot the parabola whose equation is y 2 − 8x = 0. k= .

a hyperbola or no real locus depending of the values of −F/A and −F/C. In[8]: Clear@x. y<DD 9 4 1 2 3π 2 Out[8] 9Parabola2DA92. F 6= 0. yD. 0) and have sizes and orientations as shown in the following table:  F Condition  F − A < 0 and − C < 0   − FA > 0 and − F C < 0   − FA < 0 and − F C > 0   F − FA > − C >0   F −F C > −A > 0 Locus a no locus q −F q A −F q C −F q A − FA hyperbola hyperbola ellipse ellipse b θ q - q F C F q A −F q C F −C 0 π 2 0 π 2 Example. A 6= 0. . A 6= C. and A 6= C. If Q has non-zero coefficients on the x2 . The real loci (ellipses and hyperbolas) are centered at the origin (0. then Q can be written in the form y2 x2   = 1. Use the Descarta2D function Loci2D[quad]. and all the other coefficients are zero. C 6= 0. and constant terms. €€€€€ =.180 Chapter 12 General Conics Example. Use the Descarta2D function Loci2D[quad]. Solution. crv = Loci2D@Quadratic2D@2 x ^ 2 − 8 x + 4 y − 1 == 0. Solution. €€€€€€€€€€ E= Central Conic (Ellipse or Hyperbola) Form: Q ≡ Ax2 + Cy 2 + F = 0. + − FA −F C This equation represents an ellipse. y 2 . Find the parabola whose equation is 2x2 − 8x + 4y − 1 = 0. Find and plot the conic curve whose equation is −x2 − 4y 2 + 1 = 0. 8x. €€€€€ .

1 0. 4AC 2 and F0 = −CD2 − AE 2 + 4ACF.1) Q0 is now in a form that can be recognized by inspection. Find the conic whose equation is −x2 + 9y 2 + 4x − 18y − 4 = 0.12. yD. A 6= 0. 1. then Q can be simplified by introducing a change in variables. The change in variables translates the origin of the conic.5 0 -0.5 -1 -2 -1 0 1 2 Remove the First-Degree Terms Form: Q ≡ Ax2 + Cy 2 + Dx + Ey + F = 0. . Specifically. (12. y<DD 1 2 Out[9] 9Ellipse2DA80. D or E non-zero.1 Conic from Quadratic Equation 181 In[9]: Clear@x. 0E= In[10]: Sketch2D@crvD. 0<. C 6= 0. Example. 8x. if the substitutions x0 = x − D E and y 0 = y − 2A 2C are made in Q a new equation Q0 ≡ A0 x02 + C 0 y 02 + F 0 = 0 will result where A0 C0 = = 4A2 C. To restore it to its original position we apply the inverse translation to the standard form of the conic. Plot the conic. crv = Loci2D@Quadratic2D@−x ^ 2 − 4 y ^ 2 + 1 == 0. If both the x2 and y 2 terms are present in Q along with at least one of the x or y terms. €€€€€ .

whose x0 y 0 coefficient B 0 will be zero (see exploration elimxy1. 1.nb). All quadratic equations with a non-zero xy term coefficient are standard conics in a rotated position.nb). €€€€€ E= In[12]: Sketch2D@crvD. These substitutions are equivalent to a rotation θ where tan θ = 1 k and a scaling by the factor 1 . s= √ 1 + k2 . Q0 . 3. 8x. The coefficient of the xy term can also be removed by making the substitutions x0 = kx + y and y 0 = ky − x where (C − A) + k= B s C −A B 2 +1 (see exploration elimxy2.182 Chapter 12 General Conics Solution. yD. where tan (2θ) = B . It can be shown that rotating such an equation by the angle θ. crv = Loci2D@Quadratic2D@−x ^ 2 + 9 y ^ 2 + 4 x − 18 y − 4 == 0. 3 2 1 0 -1 -2 2 0 4 6 Eliminate the xy Term Form: Q ≡ Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0. 1<. In[11]: Clear@x. y<DD π 2 Out[11] 9Hyperbola2DA82. C −A will produce a new quadratic equation. Use the Descarta2D function Loci2D[quad]. B 6= 0.

8x. A scaling and rotation is applied to the resulting conic returning it to its original position.nb and elimxy3. Use the Descarta2D function Loci2D[quad]. crv = Loci2D@Quadratic2D@−4 x ^ 2 + 10 x ∗ y − 4 y ^ 2 − 12 x + 6 y − 9 == 0. = Dk − E. Q0 is then a quadratic equation without an xy term that can be recognized by the previously presented techniques. 1. In[13]: Clear@x. 3. E0 F0 = Ek + D and = F as shown in explorations elimxy2. Solution. 2<. yD. except for the final rotation. Example. This approach is the one implemented in Descarta2D since no trigonometric functions are involved in the process.nb.1 Conic from Quadratic Equation 183 The equation for Q0 resulting from the substitution is given by A0 x02 + C 0 y 02 + D0 x0 + E 0 y 0 + F 0 = 0 where A0 = Ak 2 − Bk + C. 8 6 4 2 0 -2 -4 -6 -4 -2 0 2 4 6 8 .12. C0 D0 = Ck 2 + Bk + A. y<DD π 4 Out[13] 9Hyperbola2DA81. €€€€€ E= In[14]: Sketch2D@crvD. Find the conic curve represented by the equation −4x2 + 10xy − 4y 2 − 12x + 6y − 9 = 0 and plot the curve.

D 6= 0 K<0 two intersecting lines hyperbola K=0 J < 0.1: Classification of conics. J K = = ab + ac + bc − f 2 − g 2 − h2 . For simplicity of the invariant expressions we choose to write the quadratic equation in the form ax2 + 2hxy + by 2 + 2gx + 2f y + c = 0 where the factor 2 is inserted in the xy. two coincident lines parabola J > 0. h = 0) ID < 0. Degenerate Conic. For this form of the equation we define and I = a + b.2 Classification of Conics We may desire to determine the type of a conic from the general equation without computing the defining numerical parameters. no real locus 12. This can be accomplished by examining the values of a set of invariant expressions. ab − h2 . no real locus K>0 ID < 0. two parallel lines J = 0. x and y terms. ellipse single point ID > 0. D = 0 Proper Conic.184 Chapter 12 General Conics Table 12. circle (a = b.

.

a .

.

D=.

h .

.

g h b f .

.

.

.

.

..

c .

The center point. The invariants are useful in the classification of conics as shown in Table 12. k). that is.1. 12. ellipse or hyperbola) can be determined directly from its equation. of ax2 + bxy + cy 2 + dx + ey + f = 0 has a rela- . (h. they are equal respectively to the corresponding expressions after a rotation is performed.3 Center Point of a Conic The center point of a central conic (a circle. g f Each of the four expressions is invariant under rotation of the coordinate axes.

if e = 1 a parabola and if e > 1 the curve is a hyperbola. 8x.12. Line and Eccentricity Conic curves may be defined as the locus of a point that moves so that the ratio of its distance from a fixed point and from a fixed line is a constant. The Descarta2D function Point2D[quad] returns the center point of a central conic. 2 b − 4ac b − 4ac If b2 − 4ac = 0 then the conic is a parabola and has no center. Point2D@Quadratic2D@5 x ^ 2 − 6 x ∗ y + 5 y ^ 2 − 14 x + 2 y + 5 == 0. The fixed point is called the focus. from a point P (x. from point P to the directrix line is given by d2 = ±(λx + µy − ρ). Example. In[15]: Clear@x. d1 . Consider a focus point F (x1 . the equation of the conic curve is e= or d1 d2 p (x − x1 )2 + (y − y1 )2 = ±e(λx + µy − ρ). y<DD Out[15] Point2D@82. 1<D 12. e. is a positive number less than one.4 Conic from Point. Solution. y1 ) and a (normalized) directrix line λx + µy − ρ = 0 (where λ2 + µ2 = 1). Line and Eccentricity 185 tively simple form given by h= 2ae − bd 2cd − be and k = 2 . yD. By definition. In previous chapters is has been shown that if the eccentricity. Find the center point of 5x2 − 6xy + 5y 2 − 14x + 2y + 5 = 0. then the conic curve is an ellipse. . d2 . The distance.4 Conic from Point. the fixed line the directrix and the constant ratio the eccentricity. y) on the locus to the focus F is given by d1 = p (x − x1 )2 + (y − y1 )2 and the distance.

then B = 0. Find the quadratic equation of the curve whose focus is the point (2.5 2 1. −3. 2D êê Simplify Out[16] Quadratic2D@−3. Plot the conic curve. −26.5 3 2. Loci2D@q1D<D. 3D. ellipses. Solution. −7D In[17]: Sketch2D@8pt1. The Descarta2D function Quadratic2D[point.5 -1 0 1 2 3 4 5 Common Vertex Equation All of the proper conics (circles. directrix is x − 3y + 3 = 0 and eccentricity is 2. a conic curve of the second degree. since either λ or µ will be zero and the equation will have no xy term. The expression 2p in the equation of the parabola y 2 = 2px is the length of the chord of the parabola perpendicular to the x-axis through the . The equation reveals that if the defining directrix line is parallel to one of the coordinate axes. therefore. 1). hyperbolas and parabolas) can be represented by an equation involving the vertex of the conic. This equation is of the form Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 and is. 1<D. line. ln1. 32. e] returns a quadratic representing the equation of the conic with the given point as a focus. Example.5 0 12. 3. the line as a directrix and the given eccentricity.186 Chapter 12 General Conics Squaring both sides and rearranging yields (e2 λ2 − 1)x2 + 2e2 λµxy + (e2 u2 − 1)y 2 + 2(x1 − e2 λρ)x + 2(y1 − e2 µρ)y + (e2 ρ2 − x21 − y12 ) = 0. 13. −12. In[16]: q1 = Quadratic2D@pt1 = Point2D@82. ln1 = Line2D@1.5 1 0.

2: Parameter of a conic. or. The length of this chord for each conic is shown in Table 12. 2 a b Transforming the origin to the vertex V (−a. the equation of a hyperbola y2 x2 − =1 a2 b2 referred to by its vertex can be shown to be y 2 = 2px + (p/a)x2 where p = b2 /a is the semi-parameter of the hyperbola. The relation to the vertex equation of the parabola y 2 = 2px is obvious. This definition can be generalized to the other conics: the parameter of a conic is defined as the length of the chord perpendicular to the principal axis through the focus. 0) yields the equation y2 (x − a)2 + =1 a2 b2 which can be rearranged into y 2 = 2b2 x/a−b2 x2 /a2 .5 Common Vertex Equation 187 Table 12.12. Similarly. Consider the equation of an ellipse centered at the origin in standard position y2 x2 + 2 = 1. This explains the name hyperbola from the Greek hyperbole meaning the excess. By introducing the eccentricity e of the conic. The expression 2p is called the parameter of the parabola. This explains the name ellipse: it is derived from the Greek term elleipsis meaning a deficiency compared with a parabola. into y 2 = 2px − (p/a)x2 . all of the vertex equations can be represented by the common vertex equation (y − k)2 = 2p(x − h) − (1 − e2 )(x − h)2 . by using the semi-parameter p = b2 /a of the ellipse. The term (p/a)x2 is subtracted from the term 2px to obtain the ellipse.2 and is quite easy to determine from the standard form of each conic. Compared with the parabola y 2 = 2px. there is a term (p/a)x2 in excess of the term 2px. Curve Parameter Vertex Equation parabola 2p y 2 = 2px ellipse 2p = 2b2 /a y 2 = 2px − (p/a)x2 hyperbola 2p = 2b2 /a y 2 = 2px + (p/a)x2 focus and represents a measure of the width of the parabola.

80. €€€€€ E=. θ] returns a quadratic given the vertex point. 1. 3/4. 3/2}.5 0 -0.5 -2 1 2 3 4 5 Descarta2D Hint. 0<D. 0=. €€€€€ . Example. len. θ] constructs a conic (circle. hyperbola or parabola) from the vertex point. k) is the vertex point of the conic. 2p is the parameter of the conic and e is the eccentricity. 1. The vertex equation also includes the case of a circle by using e = 0 as the eccentricity. Plot the four curves represented by the vertex equation y 2 = 2(x − 1) − (1 − e2 )(x − 1)2 for the eccentricities e ={0. €€€€€€€€€€€ è!!! . 0E== 4 5 5 5 Out[18] 99Circle2DA9 €€€€€ . 0E=. 8−2. 2<<D. Solution. €€€€€€€€€€€ è!!! . 3 ê 4. focal chord length. The Descarta2D function Quadratic2D[point. 3 ê 2<D 3 2 1 2 15 7 8 7 2 7 1 3 2 1 9Parabola2DA81. len. e.188 Chapter 12 General Conics where (h. €€€€€ . 1. 9Ellipse2DA9 €€€€€€€€€ . ellipse. In[19]: Sketch2D@con1.5 -1 -1. focal chord length. #. In[18]: con1 = Map@Loci2D@Point2D@81. The Descarta2D function Loci2D[point. 9Hyperbola2DA9 €€€€€ . eccentricity and rotation angle. . e.5 1 0. 5<. 0=. 0E=. 2 1. 0=. 0D&. 0<. PlotRange −> 881 ê 2. eccentricity and rotation angle. €€€€€ .

y) = 0 which obviously passes through all the points of intersection of the original two curves. the method implemented in Descarta2D. we can form the equation f (x. Depending on the values of the coefficients it may or may not be easy to express one of the equations with a pair of parametric equations. y) + λ g(x. y) + λ g(x. suppose that the first curve has parametric equations x = x(t) and y = y(t) and the second curve has an implicit equation f (x. Suppose we have two curves f (x. the method of pencils can be used. the corresponding values for y can be determined using the parametric equations of the line. real and coincident (the line being tangent to the conic) or imaginary (the line does not intersect the conic). Mathematica can solve such systems of equations both numerically and symbolically. a line and a conic will intersect in two points. therefore. As a specific application of this technique. in fact. As λ varies.12.6 189 Conic Intersections Intersecting two curves is most easily accomplished if we can obtain parametric equations for one of them and an implicit equation for the other. The brute force approach to the problem is to simply regard it as a problem of solving two non-linear equations in two unknowns. For any given value of λ. the points being real and distinct. By selecting an appropriate value for λ we can hope to produce an equation f (x. This approach works well for conic curves because there always exists a value for λ such that f (x. y) and g(x. y). Once the values for t are known they can be substituted into the parametric equations to find the (x. Alternatively. an entire family of curves. we look for alternative techniques for finding the points of intersection. y) coordinates of the intersection points. Once the two values for x are known. q Substituting these values into the equation for the conic curve yields a quadratic equation in the variable x given by     2  px + r px + r px + r + dx + e − +c − +f =0 ax2 + bx − q q q which is easy to solve using the quadratic formula. suppose we select x (assuming q 6= 0). in the general case. y) = 0 . y) = 0 that is particularly simple. yielding the parametric equations x = x and y = − px + r . So. will be produced. y(t)) = 0. y) + λ g(x. We can then intersect the simpler curve with one of the original curves.6 Conic Intersections 12. We can take either x or y as the parameter of the equation px + qy + r = 0. Now consider the case of two intersecting conic curves whose equations are given by a1 x2 + b1 xy + c1 y 2 + d1 x + e1 y + f1 2 2 a2 x + b2 xy + c2 y + d2 x + e2 y + f2 = 0 = 0. Specifically. called a pencil. y) = 0. suppose we wish to find the intersection points of a line px + qy + r = 0 and a conic curve ax2 + bxy + cy 2 + dx + ey + f = 0. By substitution these two curves intersect at values of t satisfying f (x(t). and this is.

.83712.76923. there are three values for λ that represent two lines in the equation of the pencil. . . . . . So there may be up to four points of intersection between two conic curves. . . 3 2 1 0 -1 -2 -4 12. e1D.83712. ..790569<D. The Descarta2D function Points2D[curve. the two techniques are mathematically similar in complexity. . . Point2D@81. e1D< êê N Out[20] 88Point2D@8−2.790569<D. 2D. e1 = Ellipse2D@80. .) Example. Points2D@c1. −0.nb Show that rotating a quadratic ax2 + bxy + cy 2 + dx + ey + f = 0 through an angle θ given by b tan(2θ) = c−a . 2D.elimxy1. . . which appears to be easier than solving two non-linear equations in two unknowns. 1. 3. c1. . Find the points of intersection of the line x − 2y + 2 = 0 with (a) the circle x2 + y 2 = 4 and (b) the ellipse x2 /9 + y 2 = 1.790569<D<< In[21]: Sketch2D@8l1. . . . Solution. . . 0. 0<. Finding the three values for λ involves solving a cubic equation. Intersecting these two lines with either of the original conics produces the four intersection points (which may be real and distinct. . Since there exist three pairs of lines passing through four points. . real and coincident or imaginary). c1 = Circle2D@80. pts = 8Points2D@l1. . (Since solving two non-linear equations in two unknowns is equivalent to solving a fourth-degree equation. . . . . −0. .190 Chapter 12 General Conics represents two straight lines. Point2D@80. e1. −0. 0. . .790569<D. and solving a fourth-degree equation reduces to solving a cubic equation. . . 8Point2D@8−1. 0D. curve] returns a list of points that are the intersection of the two curves. 0<. . Point2D@81. . Point2D@8−1. . pts<D. In[20]: l1 = Line2D@1. . . 1.384615<D. . −2.83712.83712.<D<.7 -2 0 2 4 Explorations Eliminate Cross-Term by Rotation. .

. . . . . . . . s= √ 1 + k2 —– Eliminate Linear Terms. —– Eliminate Cross-Term by Change in Variables. . . . . . . . . . . .7 Explorations 191 will cause the xy term to vanish. . . . .. . . . . . .12. . . . = ek + d and f0 = f. . . . . . —– Eliminate Cross-Term by Change in Variables. . . elimxy3. . . . . . . . . . . where s 2 c−a (c − a) + + 1. . . . .nb Show that applying the change in variables x0 = kx + y and y 0 = ky − x. . . . . . . . d0 e0 = dk − e. . . . . . . . . . . . . . b0 c0 = 0.nb Show that applying the change in variables x0 = x − d e and y 0 = y − 2a 2c . . . k= b b to the equation ax2 + bxy + cy 2 + dx + ey + f = 0 is equivalent to rotating the quadratic by an angle θ given by 1 tan θ = k and scaling the quadratic by a scale factor 1 . . . .elimlin. . . where s 2 c−a (c − a) + + 1. . . . . k= b b to the equation ax2 + bxy + cy 2 + dx + ey + f = 0 will cause the xy term to vanish and a new quadratic with the following coefficients will be formed: a0 = ak 2 − bk + c. . . . . . . . . .nb Show that applying the change in variables x0 = kx + y and y 0 = ky − x. . elimxy2. . . = ck 2 + bk + a. . . . . .

. . . . . . . . . . . . . . . . . . k= 2 . . . . . . . . . . . . . . . polarcon. that passes through the origin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .nb y P D rq F x r Let the focus F of a conic be at the pole of a polar coordinate system and the directrix D be perpendicular to the polar axis at a distance ρ to the left of the pole as shown in the figure. implying that the center of the conic is 2ae − bd 2cd − be . . . .nb Show that the quadratic Q ≡ ax2 + bxy + cy 2 + dx + ey = 0. —– t(d + et) d + et and y(t) = − a + t(b + ct) a + t(b + ct) . . can be parameterized by the equations x(t) = − where −∞ < t < +∞. . . . —– Center of a Quadratic. . . .192 Chapter 12 General Conics to the quadratic equation ax2 + cy 2 + dx + ey + f = 0 yields the quadratic ax02 + cy 02 − e2 d2 − +f =0 4a 4c whose linear terms have vanished. . . . . . . . . center. . . . . . —– Parameterization of a Quadratic . . . Show that the polar equation of the conic is eρ r= 1 − e cos θ where e is the eccentricity of the conic. . . . . . h= 2 b − 4ac b − 4ac —– Polar Equation of a Conic . . . . . . . . . . . pquad. . . . . . . . . . . . .nb Show that applying the change in variables x = x0 + 2cd − be 2ae − bd and y = y 0 + 2 b2 − 4ac b − 4ac to the quadratic ax2 + bxy + cy 2 + dx + ey + f = 0 causes the linear terms to vanish. . . . . . . . . . . . . . . . . .

P1 and PA are called control points of the conic arc. Furthermore. 193 . and let PA (xA . The points P0 . of a segment of a conic curve. The ratio ρ is called the projective discriminant of the conic arc. respectively. y0 ) and P1 (x1 . or apex. PA h r = ÄÄÄÄÄÄÄ k k h P0 P1 Figure 13. Q. As with circular arcs.1 Definition of a Conic Arc Let points P0 (x0 . yA ) be the point of intersection.1. In this chapter we introduce a conic arc which is a piece of a conic curve. and the point at the maximum height on the curve is called the shoulder point. of the two tangent lines to the curve at P0 and P1 as shown in Figure 13. let h equal the maximum height of the segment measured from the chord P0 P1 and k be the distance from PA to the chord P0 P1 .Chapter 13 Conic Arcs In previous chapters we introduced line segments and circular arcs which are pieces of more complete curves. conic arcs are useful for constructing smoothly connected sequences of curves as well as pleasing aesthetic shapes. given by ρ = h/k.1: Definition of a conic arc. PA and the ratio ρ. P1 . The points P0 . y1 ) be the start and end points. define a conic arc. 13.

Apex2DD.2 Equation of a Conic Arc The curve underlying the conic arc is clearly a conic curve since there are five conditions imposed on the curve (two points. 2) and projective discriminant ρ = 0. {x1 . yA ) is the apex point and ρ is the projective discriminant. 1. 80. The coordinates of points on a conic arc at a parameter value t are returned by the function cnarc[t]. can be interpreted as defining a third line tangent to the curve. 1<D< Out[2] 80. 88−2. yA }. 1 ê 2. In[2]: 8Rho2D@c1D. 0). Descarta2D represents a conic arc as ConicArc2D[{x0.5 1 0. {xA .. 2<.725. ρ] where (x0 . ρ. . 8−1.45D<. y1 ) are the coordinates of the start and end points.175<. The function Rho2D[cnarc] returns the ρ value of the conic arc.<. 1) and (3. y0 }. 2<D. y0 ) and (x1 . (xA . PlotRange −> 88−3.5 -1 -2 -1 0 1 2 3 4 There are several functions provided by Descarta2D to query conic arcs. respectively. Map@c1@#D&. 83. t = 0 returns the start point coordinates. t = 1 the end point coordinates and t = 1/2 the shoulder point coordinates. y1 }.45. Plot the conic arc with start and end points (−2. respectively. 3<. In[1]: Sketch2D@8c1 = ConicArc2D@8−2. Point2D@81. 0. 2 1. 81. Apex2D] returns the apex control point of a conic arc. The projective discriminant. 80. 0<<< 13. apex point (1. 2<<D. 83. ρ). two tangents and the projective discriminant. 0<. 1<.5 0 -0. Point2D[cnarc.45.194 Chapter 13 Conic Arcs Example. Point2D@c1.. Solution. 1.

Find the conic curve associated with the conic arc. 2) and projective discriminant ρ = 1/4. 8−2. 8ca1. 1.5 0 -0. PlotRange −> 88−1. 1<<D&. −0.743424. −8. 4<. 0D.25<. 3.5 0 -0.5 -2 0 1 2 3 4 1 0. c1<D.13. Solution. 8q1 = Quadratic2D@ca1D êê Simplify. 81. (y1 − yA )(x0 − xA ) − (x1 − xA )(y0 − yA ) Example. respectively. 1 ê 4D. c1 = Loci2D@ca1D êê N< Out[3] 8Quadratic2D@−16. there is only one quadratic satisfying the conditions. Specifically. 0) and (3. 8Ellipse2D@81. the equation is given by αβ = k(1 − α − β)2 where. 0<. Find the quadratic associated with the conic arc with start and end points (0. The function Loci2D[cnarc] returns a list containing the conic curve associated with a conic arc. 48.5 -1 -1. 0. k = α = β = (1 − ρ)2 4ρ2 (y − yA )(x1 − xA ) − (x − xA )(y1 − yA ) (y0 − yA )(x1 − xA ) − (x0 − xA )(y1 − yA ) (y − yA )(x0 − xA ) − (x − xA )(y0 − yA ) . In[3]: ca1 = ConicArc2D@80.2 Equation of a Conic Arc 195 parallel to the line P0 P1 at a distance h from P0 P1 . and we will show that when the two points are on two of the tangent lines. In a subsequent chapter we will describe a general procedure for finding the quadratic equation of a conic constrained by two points and three tangent lines. 0<.5625. 2<. −73.60506.5 -1 -1. 1 0. where h is given by h = ρk and k is the distance from PA to line P0 P1 . 0).5 -2 0 1 2 3 4 .07187D<< In[4]: Map@Sketch2D@8#<. The function Quadratic2D[cnarc] returns the quadratic associated with a conic arc. −24. apex point (1. 83.

4 Conic Characteristics In Section 13. with start and end points (0. since we know its quadratic equation. if ρ = 1/2 the conic is a parabola. pD. Clearly. the specific conic type of the quadratic equation ax2 + bxy + cy 2 + dx + ey + f = 0 is determined by the discriminant. D = 16ρ2 (−1 + 2ρ)y12 . and for a hyperbola D > 0. k = α = β = (1 − ρ)2 4ρ2 (y − yA )(x1 − xA ) − (x − xA )(y1 − yA ) (y0 − yA )(x1 − xA ) − (x0 − xA )(y1 − yA ) (y − yA )(x0 − xA ) − (x − xA )(y0 − yA ) . S. any arbitrary conic arc can be transformed to coincide with S by applying a proper sequence of translations. representing the conic arc S defined above. 4 p2 yA2. For an ellipse D < 0. yA<. 8xA. 0<. respectively. 0). Using Mathematica we can find the quadratic equation underlying S as shown by the following commands. 4 p2 H−1 + 2 xAL yA. and for 1/2 < ρ < 1 the conic is a hyperbola.2 we showed that the quadratic equation associated with a conic arc is given by αβ = k(1 − α − β)2 where. For the quadratic. Q. ρ. Such transformations do not change the type of conic curve associated with the conic arc. In[5]: Clear@xA. apex point PA (xA . −4 p2 xA yA. Q = Quadratic2D@SD êê Simplify Out[5] Quadratic2D@−4 p2 yA2. −1 + 2 p − p2 H1 − 2 xAL2.196 Chapter 13 Conic Arcs 13. D = b2 − 4ac. 0<. 13. (y1 − yA )(x0 − xA ) − (x1 − xA )(y0 − yA ) Therefore. 0) and (1. It is clear by inspection. S = ConicArc2D@80. 81. By definition. for a parabola D = 0. rotations and scaling transformations. ρ may take on values in the range 0 < ρ < 1.3 Projective Discriminant In this section we will examine the significance of the value of the projective discriminant. Consider the conic arc. yA ) and projective discriminant ρ. pD. 0D As has already been shown in a previous chapter. that if 0 < ρ < 1/2 the conic is an ellipse. yA. all the geometric characteristics of the conic curve associated with the conic arc can be expressed in terms of the defining elements of the .

1) and (3. − €€€€€ =E Let Q be a conic and L be a line that intersects Q in two distinct points. P1 (x1 .1). Then.13. 1 ê 4D. yM ) is the midpoint of the conic arc’s chord and has coordinates xM = (x0 + x1 )/2 and yM = (y0 + y1 )/2. . This formula is derived in the exploration cacenter. We wish to determine the conic arc. Assume the center of the conic is (h. Find the center of the conic arc with control points (0. We choose the plus sign in the denominator because ρ has to be less than one and the radical produces a positive number. 0) and ρ = 1/4. k). the line passing through the intersection points is the polar (line) of the apex point. If the conic is a parabola. 0). (2. y1 ) and ρ. yA ). 0<. the intersection points of the line L with Q are the start and end points of S. Of particular interest is the formula for the center of a central conic (circle. Point2D@ca1D 23 16 1 8 Out[6] Point2DA9 €€€€€€€€€ . P0 (x0 . Example.1) where PM (xM . The Descarta2D function Point2D[cnarc] returns the center point of a conic arc (the underlying conic cannot be a parabola). 0<. using the formula for the x-coordinate of the center of a conic arc given in Equation (13. K) is given by H = K = −ρ2 xA + (ρ − 1)2 xM 1 − 2ρ 2 −ρ yA + (ρ − 1)2 yM 1 − 2ρ (13. y0 ). otherwise. we solve to find the value of ρ to be 1 p ρ= 1 ± (h − xA )/(h − xM ) where PM (xM . we need to determine ρ. Also. 1<. of S. In[6]: ca1 = ConicArc2D@80. Solution. PA (xA . ellipse or hyperbola). To complete the definition of the conic arc. we can assume that the conic is a central conic. PA . The center point (H. yM ) is the midpoint of P0 P1 . this formula will be indeterminate and we instead use the y-coordinate of the center of the conic arc yielding ρ= 1 p 1 ± (k − yA )/(k − yM ) again choosing the plus sign in the denominator. since this formula is used in the next section to convert a conic into a conic arc. 83. 82.4 Conic Characteristics 197 conic arc. then ρ = 1/2.nb. S cut by L through Q. In certain configurations. Clearly.

8−3. €€€€€€€€€ =. e1D 5 3 46 25 23 25 3 8 Out[7] ConicArc2DA8−2. 9−2. 2. 0D. 88l1. €€€€€ E In[8]: Map@Sketch2D@8#<. 9 4 Plot the original curves and the conic arc separately.5 -4 -2 2 0 4 3 2 1 0 -1 -2 -3 -4 -2 0 2 4 Parametric Equations The conic arc defined in this chapter is a special case of a more general curve called a rational quadratic B´ezier. In[7]: l1 = Line2D@2. 3. ca1<D. The parametric equations of this simplified formulation are given by x = y = b0 (1 − ρ)x0 + b1 ρxA + b2 (1 − ρ)x1 b0 (1 − ρ) + b1 ρ + b2 (1 − ρ) b0 (1 − ρ)y0 + b1 ρyA + b2 (1 − ρ)y1 b0 (1 − ρ) + b1 ρ + b2 (1 − ρ) . −1<. 3<<D&. 5<. 3 2 1 0 -1 -2 -3 13. The Descarta2D function ConicArc2D[line. −4. 9 €€€€€€€€€ . €€€€€ =. ca1 = ConicArc2D@l1. −1<. e1<. Solution. conic] returns a conic arc defined by a line cutting a conic curve.198 Chapter 13 Conic Arcs Example. Find the conic arc cut by the line 2x − 4y = 0 through the ellipse (y + 1)2 (x − 1)2 + = 1. 0D. e1 = Ellipse2D@81. PlotRange −> 88−5.

. 2. . . Plot nine points at equal parameter values on the conic arc with (−2. Example. . 3) as the apex point and ρ = 0. cacircle. . . The point where the curve intersects the line through the midpoint of P0 P1 and PA is called the shoulder point of the conic arc. . 80. b) and (2a.6 -1.nb Show that the conic arc with control points (0. . The Descarta2D function cnarc[t] returns the coordinates of a point on a conic arc at a parameter t.8 1. . . . . . 0). .5 -1 -0. and P1 corresponds to t = 1. . . 8D ê 8D<D. 0. It is clear from direct substitution that P0 is the point whose coordinates correspond to t = 0. . . 81. 3<. 2<. . The shoulder point corresponds to the parameter value t = 1/2. . . .13.5 0 0. ρ= b2 —– . (a.4 1. 0) will be a circular arc if √ a(−a + a2 + b2 ) . . . . . . . . . Solution. .5 1 Explorations Circular Conic Arc. . 1<. . . (0. .2 2 1. . .6 Explorations 199 where ρ = h/k is the projective discriminant and b0 = (1 − t)2 b1 b2 = = 2t(1 − t) t2 . . .6 1. . . . Map@Point2D@ca1@#DD&.2 1 -2 13. . . .45D. . .45. . . In[9]: ca1 = ConicArc2D@8−2. Range@0. . 2) as start and end point. . Sketch2D@8ca1. . . . 1) and (1. .

. . . . . . . . . . . . . . . yA ) and P1 (x1 . . . . 2 2 —– Shoulder Point on Median. . . . . . . .nb Show that the parametric equations of a unit conic arc represent the same implicit quadratic equation as the one underlying the conic as derived from the control points P0 (0. 0) and ρ. camedian. . yA ) and P1 (x1 . . . . . . . . . . . . . . . . 0) and whose projective discriminant is ρ. . . . . . . . . . . . —– Parametric Equations of a Conic Arc. . . . . . . . . PA (xA . yM + ρ(yA − yM )) where PM (xM . . . . . . catnln. PA (xA . . . . . . . whose control points are P0 (0. . . . . . . Show that L is parallel to the chord P0 P1 at a distance bρ from P0 P1 . . . . . . . . y1 ) and projective discriminant ρ. . . y1 ) and projective discriminant ρ is H = K = −ρ2 xA + (ρ − 1)2 xM 1 − 2ρ 2 −ρ yA + (ρ − 1)2 yM 1 − 2ρ where PM (xM . . . Let L be the line tangent to C at t. . . —– Coordinates of Shoulder Point. . Show that P is coincident with the shoulder point of C. . . .nb Show that the coordinates of the shoulder point of a conic arc with control points P0 (x0 . . . . . yM + ρ(yA − yM )) . 2 2 —– Tangent Line at Shoulder Point. b) and P1 (1. . . y0 ). . . K) of a conic arc whose control points are P0 (x0 . . . . . . . . PA (xA . . . yM ) is the midpoint of the conic arc’s chord and has coordinates xM = x0 + x1 y0 + y1 and yM = . . . . .nb Let P be the point at parameter value t = 1/2 on a unit conic arc. . . . . . . . . . 0). . . . . Let P be the point on the median PA PM associated with vertex PA of triangle P0 PA P1 such that |P PM |/|PA PM | = ρ (PM (xM . . . —– . . . . . . . . cacenter. . . . . PA (a. . . .200 Chapter 13 Conic Arcs Center of a Conic Arc. y0 ). .nb Let C be a conic arc with control points P0 (x0 . shoulder. . . . . . . . . yM ) is the midpoint of the conic arc’s chord and has coordinates xM = x0 + x1 y0 + y1 and yM = . . . . . . . . . 0). . b) and P1 (1. . . . . . . . . . . y1 ) and projective discriminant ρ are given by (xM + ρ(xA − xM ). caparam. . . . yM ) is the midpoint of P0 P1 ). yA ) and P1 (x1 . . . . . . . . . .nb Show that the center point (H. . . . . . . . . . . . . PA (a. . . . . . . . . C. . y0 ). having coordinates (xM + ρ(xA − xM ). . . The point P is called the shoulder point of the conic arc. . . . . . . . . .

−1). then d1 = d2 and p p (x − x1 )2 + (y − y1 )2 = (x − x2 )2 + (y − y2 )2 . In this chapter we will derive the equations of medial curves that are equidistant from two points. d2 .nb. Plot the points and the medial line. The distance. 14. y2 ) and a point P (x.1 Point–Point Consider two distinct points P1 (x1 . a point and a curve (line or circle) and two curves (lines or circles). Squaring both sides of this equation and rearranging yields 2(x2 − x1 )x + 2(y2 − y1 )y + (x21 + y12 ) − (x22 + y22 ) = 0 which is easily recognized in this form as the general equation of a line. The derivation is provided in the exploration mdptpt.Chapter 14 Medial Curves A medial curve is the locus of points equidistant from two loci of points. The medial line is the perpendicular bisector of the line segment joining P1 and P2 . Likewise. 201 . Find the equation of the medial line determined by the two points (1. from P to P1 is given by p d1 = (x − x1 )2 + (y − y1 )2 . 2) and (−1. d1 . Example. from P to P2 is given by p d2 = (x − x2 )2 + (y − y2 )2 . y1 ) and P2 (x2 . the distance. If point P is on the medial curve defined by P1 and P2 . y).

−6.2 Point–Line Consider the point P1 (x1 . where A22 + B22 = 1 (to simplify the derivation. y) to P1 is given by d1 = p (x − x1 )2 + (y − y1 )2 . y1 ) and the line L2 ≡ A2 x + B2 y + C2 = 0. The distance. The distance. 14. d1 = d2 . This function may also be used. 2<D.202 Chapter 14 Medial Curves Solution. from a point P (x. from a point P (x. the coefficients of the line are normalized because distance is involved). d2 . d1 . Perpendicular2D] returns the perpendicular bisector of the line segment joining two points. l12<D. 3D< In[2]: Sketch2D@8p1. The function MedialLoci2D[{point. y) to the normalized line L2 is given by d2 = ±(A2 x + B2 y + C2 ). . point. p2 = Point2D@8−1. 3 2 1 0 -1 -2 -4 -2 0 2 4 Descarta2D Hint. −1<D<D Out[1] 8Line2D@−4. Since P is the locus of points on the medial curve. In[1]: l12 = MedialLoci2D@8p1 = Point2D@81. The function Point2D[point. and by squaring and rearranging we obtain the quadratic equation Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0. point}] returns a list of one line that is the medial line determined by the two points. p2.

D E = = −2(x1 + A2 C2 ). then the medial curve will be a line perpendicular to the defining line. Find the medial curve of the point (−1.2 Point–Line 203 where A = B22 . The function MedialLoci2D[{point. line}] returns a list of one curve that is the medial curve of the point and the line. B C = = −2A2 B2 . −1) and −x − y + 1 = 0 and plot. −1<D. 1D<D 1 4 1 4 2 5π 4 -4 -2 3 Out[3] 9Parabola2DA9− €€€€€ .nb. so it is obvious that in the general case the medial curve of a point and a line will be a parabola. €€€€€€€€€€€€€€€€ è!!! . The definition of a parabola is the locus of points equidistant from a point and a line. −1. −2(y1 + B2 C2 ) and F = x21 + y12 − C22 . l2 = Line2D@−1. These equations are derived in the exploration mdptln. 4 2 0 -2 -4 0 2 4 If the point P1 is on line L2 . In[3]: crv1 = MedialLoci2D@8p1 = Point2D@8−1. A22 . Solution.14. €€€€€€€€€€ E= 2 In[4]: Sketch2D@8p1. crv1<D. . − €€€€€ =. Example. l2.

d2 . The distance. y) to the circle C2 is given by p d2 = (x − h2 )2 + (y − k2 )2 − r2 when P is outside of circle C2 . l2. Solution. introduced in the previous example will return a list containing the medial curve. which is a line in this case. −1. l2 = Line2D@−1. −2 2 E= In[6]: Sketch2D@8p1. The distance. −2 2 . from a point P (x. crv1<D. from a point P (x. 0<D. is given by p d2 = r2 − (x − h2 )2 + (y − k2 )2 . k2 ) and radius r2 . Find the medial curve of the point (1. . y1 ) and a circle C2 with center (h2 .204 Chapter 14 Medial Curves Example. In[5]: crv1 = MedialLoci2D@8p1 = Point2D@81. 1D<D Out[5] 9Line2DA2 è!!! è!!! è!!! 2 . d1 . d2 . line}]. Notice that the point is on the line. MedialLoci2D[{point. 0) and the line −x − y + 1 = 0 and plot. When P is inside C2 the distance. y) to P1 is given by p d1 = (x − x1 )2 + (y − y1 )2 . 4 2 0 -2 -4 -3-2-1 0 1 2 3 4 14. The same function.3 Point–Circle Consider a point P1 (x1 .

c2 = Circle2D@80. 4<D. crvs@@#DD<D&. The Descarta2D function MedialLoci2D[{point. 1<D. è!!! 9Ellipse2DA8−1. B C = = 8(x1 − h2 )(y1 − k2 ). 2. 1<D<. Plot each of the curves separately. 1<D. the medial curve will be an ellipse. Solution. crvs = Map@MedialLoci2D@8#.nb. Squaring both sides of this equation eliminates the distinction between points P inside the circle and outside the circle. Rearranging the resulting equation yields the quadratic equation Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 where A = 4((x1 − h2 )2 − r22 ). If P1 is coincident with the center of C2 . If the point P1 is outside circle C2 . −128. 8Circle2D@80. 2. R2 − 4r22 (x21 + y12 ) and (h22 + k22 ) − (x21 + y12 ) − r22 . In the special case that P1 is on C2 . 1<. Find the medial curves of four points (−8. ptsD è!!! 3 . 1<D. In[7]: pts = 8Point2D@8−8. (−4. 8Line2D@0. then d1 = d2 . 1). If P1 is inside C2 . c2<D&. D = E F = = R = 4(R(x1 − h2 ) + 2r22 x1 ). 3 . 4D. 1) with the circle x2 + (y − 1)2 = 4.14. the medial curve will be a line containing the center point of C2 . circle}] returns a list of one object equidistant from the point and the circle. c2. 0E=. 2 In[8]: Map@Sketch2D@8pts@@#DD. Example. Point2D@8−4.3 Point–Circle 205 If P is the locus of points equidistant from P1 and C2 . This derivation is included in the exploration mdptcir. 1<. 1<. 128D<. (−2. 0E=. 1). 4(R(y1 − k2 ) + 2r22 y1 ). 3. 2D<= Out[7] 99Hyperbola2DA8−4. Point2D@8−2. 1) and (0. then the medial curve will be a circle centered at P1 with a radius of r2 /2. Point2D@80. 81. the medial curve will be a hyperbola. . 2. 1<. 4((y1 − k2 )2 − r22 ).

Find the medial lines for 3x − 4y + 1 = 0 and 2x + 2y − 3 = 0 and plot.206 Chapter 14 Medial Curves 6 4 4 2 2 0 0 -2 -2 -4 -8 -6 -4 -2 0 2 4 4 4 2 2 0 0 -2 -2 -4 -2 14. The equations of these two lines are A2 x + B2 y + C2 A1 x + B1 y + C1 p =± p 2 2 A1 + B1 A22 + B22 as shown in the exploration mdlnln. . Example.nb.4 -4 -2 0 2 4 -4 -2 2 4 2 4 0 0 Line–Line The locus of points equidistant from two lines L1 ≡ A1 x + B1 y + C1 = 0 L2 ≡ A2 x + B2 y + C2 = 0 and are the two angle bisector lines.

2. from a point P (x. the coefficients of the line are normalized because distance is involved). 4 2 0 -2 -4 -4 -2 0 2 4 14. line}] returns a list of lines that are the medial lines of the two given lines. k2 ) and radius r2 . 1D. l2. and a circle C2 with center at (h2 . y) to line L1 is given by d1 = ±(A1 x + B1 y + C1 ). s. l2 = Line2D@2. 10 − 8 2 . è!!! è!!! è!!! Line2DA10 + 6 2 . where A21 + B12 = 1 (to simplify the derivation. y) to circle C2 is given by p d2 = (x − h2 )2 + (y − k2 )2 − r2 when P is outside of circle C2 . from point P (x. In[9]: lns = MedialLoci2D@8l1 = Line2D@3. d2 = s . 15 + 2 2 E. d1 .5 Line–Circle Consider a line L1 ≡ A1 x + B1 y + C1 = 0. lns<D. We introduce a sign constant. otherwise.14. When P is inside C2 the distance. which takes on the values ±1. If the lines are parallel. −3D<D è!!! è!!! è!!! 2 . it will contain two lines.5 Line–Circle 207 Solution. The distance. is given by p d2 = − (x − h2 )2 + (y − k2 )2 + r2 . The function MedialLoci2D[{line. −4. then the list will contain one line. d2 . −15 + 2 2 E= Out[9] 9Line2DA−10 + 6 In[10]: Sketch2D@8l1. −10 − 8 2 . so that we can combine the two equations for d2 yielding p  (x − h2 )2 + (y − k2 )2 − r2 . The distance. d2 .

then d1 = d2 . 1. 1<. Plot the curves. 1. −1D. c2<D π 2 3π 2 Out[11] 9Parabola2DA80. then the medial curves will be two parabolas. €€€€€€€€€€ E= In[12]: Sketch2D@8l1. each passing through the points of intersection of the line and the circle. If the line intersects the circle in two distinct points.208 Chapter 14 Medial Curves If P is the locus of points equidistant from P1 and C2 . Find the curves that are equidistant from the line y = 1 and the circle x2 + (y − 1)2 = 4. €€€€€ E. B C = = −2A1 B1 . −2(k2 + B1 (C1 + sr2 )) and F = h22 + k22 − r22 − C1 (C1 + 2sr2 ).nb. crvs = MedialLoci2D@8l1. circle}] returns a list of curves equidistant from a line and a circle. 2D. In[11]: l1 = Line2D@0. 2<. c2 = Circle2D@80. Rearranging the resulting equation yields the quadratic equation Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 where A = B12 . 0<. The function MedialLoci2D[{line. D E = = −2(h2 + A1 (C1 + sr2 )). A21 . crvs<D. c2. Parabola2DA80. 3 2 1 0 -1 -4 -2 0 2 4 . Solution. Example. This derivation is included in mdlncir. 1.

2. c2<D 3π 2 Out[13] 9Line2D@2.14. crvs<D. Solution. Find the curves that are equidistant from the line y = 3 and the circle x2 + (y − 1)2 = 4 and plot. Strictly speaking. 5 4 3 2 1 0 -4 -2 0 2 4 If the line and the circle do not intersect. In[13]: l1 = Line2D@0. Example. 2D. Plot the curves. unless we consider the distance to be measured both from the closest point on the circle and the farthest point on the circle. Use the function MedialLoci2D[{line. crvs = MedialLoci2D@8l1. Find the curves that are equidistant from the line y = 5 and the circle x2 + (y − 1)2 = 4. circle}] as described in the previous examples. Notice that the line is tangent to the circle. Use the function MedialLoci2D[{line. 3<. −3D. and the other will be a line passing through the tangency point and the center point of the circle. 1. only one of these parabolas is equidistant from the circle and the line.5 Line–Circle 209 If the line is tangent to the circle then one of the medial curves will be a parabola. 0D. not all of the points on the line are equidistant from the line and the circle. €€€€€€€€€€ E= In[14]: Sketch2D@8l1. Example. Strictly speaking. c2 = Circle2D@80. c2. . circle}] introduced in the previous example. Solution. unless we consider the distance to be measured both from the closest point on the circle and the farthest point on the circle. then the two medial curves will be parabolas. Parabola2DA80. 0. 1<.

6 -2 0 2 4 Circle–Circle Consider two distinct circles C1 ≡ (x − h1 )2 + (y − k1 )2 = r12 and C2 ≡ (x − h2 )2 + (y − k2 )2 = r22 . B C = = 8(h1 − h2 )(k1 − k2 ). crvs<D. c2<D 3π 2 3π 2 Out[15] 9Parabola2DA80. . 1. 5 4 3 2 1 0 -1 -4 14. h22 + k22 and s = ±1. 4<. 4(k1 (−D1 + D2 + R) + k2 (D1 − D2 + R)) and F = (D1 − D2 )2 − 2(D1 + D2 )R + R2 and R = (r1 − sr2 )2 . 1. Using the same distance equating techniques outlined in previous sections. 2<. we can obtain the quadratic equation of the curves equidistant from the two circles Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 where A = 4((h1 − h2 )2 − R). €€€€€€€€€€ E= In[16]: Sketch2D@8l1.210 Chapter 14 Medial Curves In[15]: l1 = Line2D@0. 3. Parabola2DA80. 4((k1 − k2 )2 − R). c2. crvs = MedialLoci2D@8l1. D E = = 4(h1 (−D1 + D2 + R) + h2 (D1 − D2 + R)). D1 D2 = = h21 + k12 . 2D. c2 = Circle2D@80. −5D. 1<. €€€€€€€€€€ E. and introducing a sign constant s = ±1.

1<. 3D. Configuration.14. some of the branches of these curves are not equidistant from the two circles. c2<D 5 2 è!!!!! 21 2 π 2 1 2 è!!! 3 2 π 2 Out[17] 9Ellipse2DA80. €€€€€ E= In[18]: Sketch2D@8c1. 2<. €€€€€ E. Find and plot the curves equidistant from the two circles x2 + y 2 = 9 and x2 + (y − 2)2 = 4. 0<. C1 /C2 r1 6= r2 r1 = r2 externally disjoint two hyperbolas line/hyperbola externally tangent line/ellipse line/line intersecting (2 points) ellipse/hyperbola line/ellipse internally tangent line/ellipse (impossible) internally disjoint ellipse/ellipse (impossible) concentric circle/circle (all points) This derivation is included in the exploration mdcircir. €€€€€€€€€€€€€€€ . 2D. unless we consider the distance to be measured both from the closest and the farthest point on the circles. Solution. €€€€€€€€€€€ . In[17]: c1 = Circle2D@80. 1<.1 summarizes the medial curves associated with a pair of circles in several configurations taking into consideration differing radii and equal radii. €€€€€ . Hyperbola2DA80. c2 = Circle2D@80. 4 3 2 1 0 -1 -2 -3 -4 -2 0 2 4 .1: Medial curves for two circles. Strictly speaking. €€€€€ . Table 14. crvs = MedialLoci2D@8c1.nb. circle}]. c2. Use the function MedialLoci2D[{circle.6 Circle–Circle 211 Table 14. crvs<D. Example.

. . . . mdptpt. . . . obj2 }] will return a list of lines and/or quadratics representing the medial curves. . . . obj2 }] produces the same result as MedialLoci2D[{obj2. −2(x1 + A2 C2 ). that is. . . . Point–Circle. . . . . . . . . obj1 }]. . . . . .7 Explorations Medial Curve. . . . . . y1 ) and the line L ≡ A2 x + B2 y + C2 = 0. . . . B = 8(x1 − h2 )(y1 − k2 ). . In addition. . . . . . . . . . . C D = = A22 . . . . . . . . —– Medial Curve. . . . . . . . . . C D E F R = 4((y1 − k2 )2 − r22 ). . y2 ). . . . . . mdptcir. . . = 4(R(x1 − h2 ) + 2r22 x1 ). 14. . . . . . MedialEquations2D[{obj1. . . . assuming that L is normalized (A22 + B22 = 1). . . . . . . . . . . . . . the objects may be provided in any order in the list. . . . . E F = = −2(y1 + B2 C2 ) and x21 + y12 − C22 is equidistant from the point P1 (x1 . . . . . . . . . Point–Line. . The function MedialLoci2D[{obj1. . = 4(R(y1 − k2 ) + 2r22 y1 ). . . . . . . . . . . . . .nb Show that the quadratic equation Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 where A = 4((x1 − h2 )2 − r22 ). . . y1 ) and P2 (x2 . . . . . . Point–Point. where A = B = B22 . .nb Show that the quadratic equation Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0.nb Show that the line 2(x2 − x1 )x + 2(y2 − y1 )y + (x21 + y12 ) − (x22 + y22 ) = 0 is equidistant from the points P1 (x1 . . . . . . . −2A2 B2 . . = R2 − 4r22 (x21 + y12 ) and = (h22 + k22 ) − (x21 + y12 ) − r22 . —– Medial Curve. . mdptln.212 Chapter 14 Medial Curves Descarta2D Hint. . . . . . . . . . . .

. . . . . . . B C = −2A1 B1 . . . . . —– Medial Curve. . . . . . . . Circle–Circle. . . . . —– Medial Curve. . y1 ) and the circle (x − h2 )2 + (y − k2 )2 = r22 . . . . . . . . . . . . . assuming A21 + B12 = 1. . . . . . . . . . . . . . . . . . . .nb Show that the two quadratics whose equations are given by Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 . . . . . . . . . . = −2(k2 + B1 (C1 + sr2 )). . . . . . . . . . mdlnln. . . . . . . . . . D E = −2(h2 + A1 (C1 + sr2 )). . . . . . . . . .14. . . . . . . . . . . . . . . . . . .nb Show that the two quadratics whose equations are given by Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 where A = B12 . . . . . . . . . .7 Explorations 213 is equidistant from the point P1 (x1 . . . . . mdlncir. F = h22 + k22 − r22 − C1 (C1 + 2sr2 ) and = ±1 s are equidistant from the line A1 x + B1 y + C1 = 0 and the circle (x − h2 )2 + (y − k2 )2 = r22 . . . . . . . . . . —– Medial Curve. . . . . . . .nb Show that the pair of lines whose equations are A2 x + B2 y + C2 A1 x + B1 y + C1 p =± p 2 2 2 A1 + B1 A2 + B22 is equidistant from the two lines A1 x + B1 y + C1 = 0 and A2 x + B2 y + C2 = 0. . mdcircir. . Line–Line. . . . . . Line–Circle. = A21 .

. . E F = = 4(k1 (−D1 + D2 + R) + k2 (D1 − D2 + R)) and (D1 − D2 )2 − 2(D1 + D2 )R + R2 and R = D1 = D2 s = = (r1 − sr2 )2 . —– Medial Curve Type. . . . . . .) —– . . 4(h1 (−D1 + D2 + R) + h2 (D1 − D2 + R)). . . . . h22 + k22 and ±1 are equidistant from the two circles (x − h1 )2 + (y − k1 )2 = r12 and (x − h2 )2 + (y − k2 )2 = r22 . . 8(h1 − h2 )(k1 − k2 ). . . . . . . h21 + k12 . . . . . . (Hint: Examine the value of the discriminant B 2 − 4AC of the medial quadratic. . . . . . . . . . . . . . . . . . . . . . mdtype. . . . . C D = = 4((k1 − k2 )2 − R).nb Show that the medial curve equidistant from a point and a circle is a hyperbola when the point is outside the circle and it is an ellipse when the point is inside the circle. . . . . . .214 Chapter 14 Medial Curves where A = B = 4((h1 − h2 )2 − R). . .

Part IV Geometric Functions .

.

y) and y 0 = f2 (x. v}] translates a coordinate list (x. but its position with respect to the coordinate axes is offset by distances u in the x-direction and v in the y-direction. y 0 ) where x0 = f1 (x. Transformations can often be constructed so that f 0 is much simpler than f . y) into (x + u. the resulting locus has the same shape and orientation as the original one. Example. 15. In this chapter we will study four transformations that have useful geometric interpretations: translation. v}] performs the same translation and returns a translated point. into a new function f 0 (x0 . scaling and reflection. These equations are called the equations of the transformation.1 Translations A translation is a transformation that maps coordinates (x. {u. y). y). The function Translate2D[point. v). The equations of the transformation are x0 = x + u and y 0 = y + v. 2) by u = −1 and v = −3. returning a new coordinate list. y}. rotation. 217 . y + v). When a translation is applied to a locus of points. Determine the coordinates of the point that results from translating (3. {u. Solution.Chapter 15 Transformations A transformation is a mathematical operation that changes a function of variables. y) by the specified offset (u. The function Translate2D[{x. say f (x.

. 8x −> x − u. Translate2D@Point2D@83. b. a ∗ x ^ 2 + b ∗ x ∗ y + c ∗ y ^ 2 + d ∗ x + e ∗ y + f ê. Mathematica provides powerful functions for performing these transformations. y −> y − v< êê Expand Out[3] f − d u + a u2 − e v + b u v + c v2 + d x − 2 a u x − b v x + a x2 + e y − b u y − 2 c v y + b x y + c y2 Collecting terms and writing in standard mathematical notation yields the translated quadratic equation A0 x2 + B 0 xy + C 0 y 2 + D0 x + E 0 y + F 0 = 0 where A0 = A B0 C0 = = B C D0 E0 = = D − 2Au − Bv E − 2Cv − Bu F0 = Au2 + Buv + Cv 2 − Du − Ev + F. 8−1. 2<D. a. e. applies a set of replacement rules to an expression. In a similar manner a quadratic equation can be translated. −1<. −1<D< A translation can also be applied to an equation. u. v. In[2]: Clear@x. In[3]: Clear@x. y. u. For example. if f (x. 2<. b. 8x −> x − u. a ∗ x + b ∗ y + c ê. −3<D. Again Mathematica provides a convenient means for performing the algebraic operations. c. 8−1. a. −3<D< Out[1] 882. we can translate this by making the substitutions x = x0 − u and y = y 0 − v. d.218 Chapter 15 Transformations In[1]: 8Translate2D@83. v. represented by the Ÿ Mathematica /. Hint. y) = Ax + By + C is a linear equation in two variables. The Mathematica function Replace. Point2D@82. cD. y. fD. y −> y − v< êê Expand Out[2] c − a u − b v + a x + b y In standard mathematical notation the translated equation is Ax + By − Au − Bv + C. operator.

v}] translates an object u in the x-direction and v in the y-direction. 3. Ellipse2D[{h. a geometric object or a list of Descarta2D objects. y) into (x cos θ − y sin θ. −5<. k + v}. 82. 0D In[5]: Sketch2D@8e1. y cos θ + x sin θ). θ] is translated to Ellipse2D[{h + u. −3<. 3. such as circles.2 2 4 6 Rotations A rotation by an angle θ about the origin is a transformation that maps coordinates (x. The object may be a coordinate list. k}. ellipses and conic arcs. Plot both the original ellipse and the translated ellipse. The location of curves. b. θ]. 4. a. Example.2 Rotations 219 Using these basic formulas for translations it is easy to translate other objects. 4. 0 -2 -4 -6 -8 -2 0 15. Translate the ellipse (y + 3)2 (x − 1)2 + =1 16 9 by the offsets u = 2 and v = −2. {u. Solution. For example.15.1. cos α = x/r sin α = y/r . The function Translate2D[object. b. The mapping is easily confirmed using trigonometry as shown in Figure 15. a. are defined by points and can be translated by translating the points themselves. In[4]: e2 = Translate2D@e1 = Ellipse2D@81. 0D. e2<D. −2<D Out[4] Ellipse2D@83.

x0 = OA0 = r cos(α + θ) = r(cos α cos θ − sin α sin θ) = r((x/r) cos θ − (y/r) sin θ) = x cos θ − y sin θ. Substituting into Ax + By + C yields the equation A0 x + B 0 x + C 0 = 0 where A0 = A cos θ − B sin θ . Similarly. it can be shown that y 0 = y cos θ + x sin θ.1: Rotation transformation. The general equations of a rotation so derived are x0 = h + (x − h) cos θ − (y − k) sin θ y0 = k + (x − h) sin θ + (y − k) cos θ. In order to rotate a linear equation Ax + By + C = 0 we need to solve these equations for x and y so that we can substitute these values into the equation.220 Chapter 15 Transformations P¢ y r1 P q r a A¢ O A x Figure 15. then apply the inverse translation to restore the object to its original position with the rotation applied. In order to rotate about a point (h. perform the rotation using the equations above. we first translate the coordinates to the origin. k). Solving for x and y in terms of x0 and y 0 (and making use of the identity sin2 θ + cos2 θ = 1) yields the equations x = h + (x0 − h) cos θ + (y 0 − k) sin θ y = k − (x0 − h) sin θ + (y 0 − k) cos θ.

parabolas.15. are somewhat long. Rotate the ellipse y2 (x − 3)2 + =1 1 4 π/2 radians about its center point and about the origin. to the angle of the curve. respectively. Points and lines can be rotated by directly applying the formulas for coordinates and linear equations. we can now specify how to rotate all of the Descarta2D objects. Curves that are located by points can be rotated by rotating the defining points. Q0 ≡ A0 x2 + B 0 xy + C 0 y 2 + D0 x + E 0 y + F 0 = 0. such as arcs. curves that have orientation angles. additionally.2 Rotations 221 B0 C 0 = B cos θ + A sin θ = Ah + Bk + C − (Ah + Bk) cos θ − (Ak − Bh) sin θ. Plot all three ellipses. . Rotating the quadratic equation Q ≡ Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 is accomplished in the same manner. θ. The resulting expressions for the coefficients of the rotated quadratic equation. ellipses and hyperbolas. are rotated by adding the rotation angle. Example. By applying the formulas for rotating coordinates. by replacing x and y with the proper rotated coordinates. linear equations and quadratic equations. but can be written symbolically as A0 B0 = = A cos2 θ − B cos θ sin θ + C sin2 θ B(cos2 θ − sin2 θ) + 2(A − C) cos θ sin θ C0 D0 = = A sin2 θ + B cos θ sin θ + C cos2 θ (−2Ch + Bk) sin2 θ − (2Ah + Bk) cos2 θ + 2(Bh − (A − C)k) cos θ sin θ + (2Ah + Bk + D) cos θ − (Bh + 2Ck + E) sin θ E0 = F0 = (Bh − 2Ak) sin2 θ − (Bh + 2Ck) cos2 θ − 2((A − C)h + Bk) cos θ sin θ + (Bh + 2Ck + E) cos θ + (2Ah + Bk + D) sin θ (Ah2 + Bhk + Ck 2 ) cos2 θ − (B(h2 − k 2 ) − 2(A − C)hk) cos θ sin θ + (Ch2 − Bhk + Ak 2 ) sin2 θ − (2Ah2 + 2Bhk + 2Ck 2 + Dh + Ek) cos θ + (Bh2 − 2(A − C)hk − Bk 2 + Eh − Dk) sin θ + Ah2 + Bhk + Ck 2 + Dh + Ek + F.

Pi ê 2. Pi ê 2D. indicates the ratio of corresponding lengths of the scaled object with respect to the original object. 2. 8e2 = Rotate2D@e1. The Descarta2D function Rotate2D[object. Solving the scaling transformation equations for (x. a geometric object or a list of Descarta2D objects. 3<. Similarly.3 1 2 3 4 5 Scaling A scaling transformation maps coordinates (x. Ellipse2D@80. e3<D. 0<. y) to (x0 . The point (h. y0 }] rotates an object by angle θ about point (x0 . y 0 ) yields x=h+ (y 0 − k) (x0 − h) and y = k + . 2. s > 0. e2. applying a scaling transformation to the quadratic polynomial Ax2 + Bxy + Cy 2 + Dx + Ey + F . 4 3 2 1 0 -1 -2 -2 -1 0 15. y) into the linear polynomial Ax + By + C yields the scaled linear polynomial Ax + By + Ah(s − 1) + Bk(s − 1) + sC. y0 ). y 0 ) using the transformation equations x0 = h + s(x − h) and y 0 = k + s(y − k). 1. {x0 . k) is called the center of scaling. The scale factor. 2. A point at the center of scaling does not change coordinates during a scaling transformation. 83.222 Chapter 15 Transformations Solution. The object may be a coordinate list. θ. 0<. s s Substituting the coordinates (x. 0D. θ] rotates an object by angle θ about the origin. e3 = Rotate2D@e1. 0D< In[7]: Sketch2D@8e1. The function Rotate2D[object. y) in terms of (x0 . In[6]: e1 = Ellipse2D@83. 1. 0<D. 1. Pi ê 2D< Out[6] 8Ellipse2D@83.

The function Scale2D[object. k).5 0 -0. c2. 3 2.15. 3 ê 2. 1<. Scale the circle (x − 2)2 + (y − 1)2 = 1 by a factor of 3/2 about its center point and the origin. In[8]: c1 = Circle2D@82.5 1 2 3 4 . 8c2 = Scale2D@c1. 1<D. a geometric object or a list of Descarta2D objects. Scale2D[object. 1<. {h. Plot the three circles. k}] scales the object using scale factor s about the center of scaling (h. 82. The scaling transformation may be applied to Descarta2D geometric objects by applying the coordinate scaling transformation to the positioning arguments and simultaneously multiplying the length arguments by the scale factor. c3<D. s. c3 = Scale2D@c1. €€€€€ =. €€€€€ E= In[9]: Sketch2D@8c1. Example. €€€€€ E. The object may be a coordinate list.5 1 0. s] scales the object about the origin. Solution.3 Scaling 223 yields A0 x2 + B 0 xy + C 0 y 2 + D0 x + E 0 y + F 0 = 0 where A0 B0 = = A/s2 B/s2 C0 = C/s2 D0 E0 = = (D + (1 − s)(2Ah + Bk))/s (E + (1 − s)(Bh + 2Ck))/s F0 = (1 − s)2 (Ah2 + Bhk + Ck 2 ) + (1 − s)(Dh + Ek) + F. Circle2DA93.5 2 1. 1D. 3 ê 2D< 3 2 3 2 3 2 Out[8] 9Circle2DA82.

A2. While it is feasible to solve these equations manually using Ÿ Mathematica algebra. y1 ) in terms of P2 (x2 . y1 → €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ € == 2 2 2 2 Substituting the coordinates (x1 . y2 == YCoordinate2D@p2D<. y1<D êê Simplify −A22 x2 + B22 x2 − 2 A2 HC2 + B2 y2L A2 + B2 −2 B2 HC2 + A2 x2L + A22 y2 − B22 y2 A2 + B2 Out[11] 99x1 → €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ € . Point2D@p1.224 Chapter 15 Transformations 15. p2 = Point2D@p1. A22 + B22 Hint. p1 = Point2D@8x1. In[10]: Clear@x1. B2. l2D. C2D. it is much less effort to let Mathematica do the work using the Solve function. l2DD êê Simplify −A22 x1 + B22 x1 − 2 A2 HC2 + B2 y1L A2 + B2 −2 B2 HC2 + A2 x1L + A22 y1 − B22 y1 A2 + B2 € . y1. y1<D. 2 ∗ Distance2D@p1. y1 ) into a linear equation A1 x + B1 y + C1 yields the reflected linear equation A3 x + B3 y + C3 . y2 ) of the reflected point are given by the transformation equations x2 = y2 = 2A2 (A2 x1 + B2 y1 + C2 ) A22 + B22 2B2 (A2 x1 + B2 y1 + C2 ) y1 − . Consider the point P1 (x1 .4 Reflections A reflection transformation maps the coordinates (x. y2 ) yields x1 = y1 = (B22 − A22 )x2 − 2A2 B2 y2 − 2A2 C2 A22 + B22 −2A2 B2 x2 + (A22 − B22 )y2 − 2B2 C2 . B2. The command would be of the form In[11]: Solve@8x2 == XCoordinate2D@p2D. l2 = Line2D@A2. A22 + B22 x1 − Solving the transformation equations for P1 (x1 . €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ € =E Out[10] Point2DA9 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ 2 2 2 2 In standard mathematical notation the coordinates P2 (x2 . The following Descarta2D commands can be used to determine the coordinates of the reflection of point P1 in line L2 . y1 ) and the reflection line L2 ≡ A2 x + B2 y + C2 = 0. 8x1. C2D. y) to coordinates that are the “mirror” reflection of the coordinates with respect to a line that represents the position of the mirror.

y1 ) into a quadratic polynomial Q ≡ Ax2 + Bxy + Cy 2 + Dx + Ey + F yields a quadratic Q0 reflected in the line L2 ≡ A2 x + B2 y + C2 = 0 of the form Q0 ≡ A0 x2 + B 0 xy + C 0 y 2 + D0 x + E 0 y + F 0 where A0 B 0 = Af1 f2 + 2Bpf4 + 4Cp2 = 4Apf4 + B(4p2 − f42 ) − 4Cpf4 C0 D0 = = E0 F0 = = 4Ap2 − 2Bpf4 + Cf1 f2 4Aqf4 + 2Br(2A22 + f4 ) + 8CqB22 − Df4 f3 − 2Epf3 8AA22 r + 2Bq(2B22 − f4 ) − 4Crf4 − 2Dpf3 + Ef3 f4 4(Aq 2 + BpC22 + Cr2 ) − 2f3 (Dq + Er) + F f32 and p = A2 B2 . 2) with radius 1 and start and end angles of π and 3π/2 in the line x + 3y + 2 = 0. the angle θ0 = 2α − θ.15. and L0 the reflection of L in LR as shown in Figure 15. The relationship also holds true when α = θ. (A22 f4 = (A22 − B22 ).4 Reflections 225 where A3 B3 = = C3 = A1 (B22 − A22 ) − 2B1 A2 B2 B1 (A22 − B22 ) − 2A1 A2 B2 C1 (A22 + B22 ) − 2C2 (A1 A2 + B1 B2 ). Using the fact that supplementary angles sum to π and that the interior angles of a triangle sum to π.2. . Example. in which case L and L0 do not intersect. f1 = (A2 + B2 )2 . Substituting the coordinates (x1 . equations and angles we are able to reflects all of the geometric objects in the Descarta2D system. Reflect the arc centered at (3. q = A2 C2 . LR be a reflection line that makes an angle α with the +x-axis. r = B2 C2 . f3 = + B22 ). By applying the methods for reflecting coordinates. f2 = (A2 − B2 )2 . Reflection of an Angle What angle does a reflected line make with the +x-axis? Let L be a line that makes an angle θ with the +x-axis. We wish to determine the angle θ0 that L0 makes with the +x-axis.

. K) if C is the midpoint of the segment P P 0 .5 -2 0 2 4 Explorations Reflection in a Point. reflctpt. . . Using this definition show that . .nb A point P 0 (x0 . . . . . . or a list of objects. Solution. . . −3<. 3. . . . . In[12]: a2 = Reflect2D@a1 = Arc2D@Point2D@83. . a2<D. y) in the point C(H. y 0 ) is said to be the reflection of a point P (x. . 3 Pi ê 2<D. . . . . l1. . 2 1 0 -1 -2 -3 -4 15.2: A reflected angle. . . The Descarta2D function Reflect2D[object. . . . a geometric object. 8Pi. . 2. . . . . .226 Chapter 15 Transformations y LR L L¢ q¢ a a p-a g b b q q x b=a-q g=p-H2a-qL q=2a-q Figure 15. . . . . line] reflects the object with respect to the line. The object may be a coordinate list. . . . . . . . . 2DD 4 5 17 5 Out[12] Arc2DA82. . . . . 9− €€€€€ . − €€€€€€€€€ =. 2<D. . . . l1 = Line2D@1. −1 + è!!! 2E In[13]: Sketch2D@8a1.

.nb A point P 0 (x0 . . which passes through the origin. k). . . assuming L does not pass through the origin. . . . . K) is ax + by − (2aH + 2bK + c) = 0. . . . . . . . y) in the circle C ≡ (x − h)2 + (y − k)2 = r2 if points O(h. K). y 0 ) is said to be the inverse of a point P (x. . . . is the circle 2  2  B1 A2 + B 2 A1 + y+ = 1 2 1. . 2 2 (x − h) + (y − k) (x − h)2 + (y − k)2 • If the circle of inversion is x2 + y 2 = 1. x0 = 2 x + y2 x + y2 • If the circle of inversion is x2 + y 2 = 1. . . . . . . . • The reflection of the quadratic ax2 + bxy + cy 2 + dx + ey + f = 0 in the point (H. . is the line L ≡ 2h1 x + 2k1 y = 1. y 0 ) are x0 = h + r2 (x − h) r2 (y − k) and y 0 = k + . the inverse of the line L ≡ A1 x + B1 y + C1 = 0. . • If the circle of inversion is x2 + y 2 = 1. . . . . . . . K) is ax2 + bxy + cy 2 − (4aH + 2bK + d)x − (2bH + 4cK + e)y+ 4aH 2 + 4bHK + 4cK 2 + 2dH + 2eK + f = 0. . . . . the inverse of the circle (x − h1 )2 + (y − k)2 = r12 is 2  2  k1 r2 h1 + y− = 1 .5 Explorations 227 • The transformation equations for a reflection in a point are x0 = 2H − x y 0 = 2K − y x = 2H − x0 y = 2K − y 0 . . . . verify that the reflection in a point transformation is equivalent to a rotation of π radians about the reflection point (H. Using this definition show that • The coordinates of P 0 (x0 . .15. —– Inversion. . . . . . • The reflection of the line ax + by + c = 0 in the point (H. . Also. inverse. assuming L passes through the origin (C1 = 0). . . . L is parallel to the tangent line to C through the origin. . . the inversion of C ≡ (x − h)2 + (y − k)2 = h21 + k12 . the inverse of the line L ≡ A1 x + B1 y + C1 = 0. The equation of the tangent line is 2h1 x+2k1 y = 0. Inversion is clearly a non-rigid transformation. the coordinates of P 0 are x y and y 0 = 2 . . x+ 2C1 2C1 4C1 • If the circle of inversion is x2 + y 2 = 1. . . P and P 0 are collinear and |OP | |OP 0 | = r2 . . . . . . x− D D D • If the circle of inversion is x2 + y 2 = 1. . where D = h21 + k12 − r12 . . —– . . . . . is L itself.

.

specify two parameter values on the line and determine the distance between the points associated with these parameter values. between the points represented by any two parameter values. 8−2.1 Lines and Line Segments Length of a Line By definition. ArcLength2D@Line2D@a. In[1]: Clear@a. cD. Solution. 16. the distance. s. Since lines in Descarta2D are parameterized by distance. {t1 . cD. t1 and t2 . however. For some curves the arc length has other special names such as the perimeter of a triangle or the circumference of a circle. Example. For a straight line the distance is called the length and is easily computed using the distance formula. This chapter discusses methods for computing the arc lengths of simple geometric curves.Chapter 16 Arc Length Intuitively. t2 }] returns the arc length between two parameter values on a line. We can. b. The function ArcLength2D[line. arc length is a measure of distance along a curve. is simply the absolute value of the difference of the parameter values. b. Find the distance between the parameter values −2 and 1 on any line (assuming the parameterizations defined in the Descarta2D packages). s = |t2 − t1 |. such as those provided in Descarta2D. 1<D Out[1] 3 229 . a line is a curve of infinite length.

t2 }] returns the distance between two parameter values on a line segment. t1 and t2 . (3. The distance. The Descarta2D function Perimeter2D[triangle] returns the perimeter of a triangle. between any two parameter values. In[2]: l1 = Segment2D@81. 8Length2D@l1D. 4) and (5.230 Chapter 16 Arc Length Length of a Line Segment The length of a line segment is the distance between its start and end points. €€€€€€€€€€€€€€€€ è!!! = 16. 81 ê 4. where l is the length of the line segment. Solution. 1 ê 2<D< è!!! 1 Out[2] 9 2 . 6). Find the arc length on the line segment between the parameter values 1/4 and 1/2. In Descarta2D the start and end points have parameter values of 0 and 1. respectively. s. {t1 . 84. 3<. 2). ArcLength2D[lnseg. In[3]: Perimeter2D@Triangle2D@81. 2<. 4).2 2 2 Perimeter of a Triangle The sum of the lengths of the sides of a triangle is called the perimeter. where sn is the length of side n of the triangle. Find the length of the line segment connecting the points (1. 85. Example. Example. The function Length2D[lnseg] returns the length of a line segment (the distance between the start and end points). 4<D. and is given by s = s1 + s2 + s3 . ArcLength2D@l1. s. 4<. Solution. Find the perimeter of a triangle whose vertices are (1. 82. 3) and (2. 6<DD Out[3] 4 è!!! è!!! è!!!!! 2 + 5 + 13 . is given by |t2 − t1 |l.

it is evident that as the number of sides of the polygon is increased. the perimeter of the inscribed polygon. The length. the area of the polygon approaches the area bounded by the curve.3 Polygons Approximating Curves 231 r s q d Figure 16. of the perpendicular segment from the center of the circle to one of the sides of a regular. inscribed polygon is given by d = r sin 12 θ where r is the radius of the circle and θ is angle between adjacent radii connecting the sides of the polygon. . where n represents the number of sides of the polygon. the perimeter of the polygon approaches the perimeter. d. Therefore. but they can be applied intuitively in the study of areas and perimeters of simple curves as will be shown in the following sections. the more nearly its area and perimeter will approach the area and perimeter of the curve. the polygon will coincide with the curve. 16. If the number of sides of the polygon is increased ad infinitum. we can see that as the number of sides of a circumscribing polygon is increased. Likewise. of the curve. The length of the sides of the polygon.3 Polygons Approximating Curves If we inscribe a polygon in any closed curve. Now consider the ratio of the perimeter of polygons for two circles.4 Circles and Arcs Circumference of a Circle Consider the circle shown in Figure 16.1: Circle approximated by an inscribed polygon. 16. Clearly.16.1. we may substitute for the curve an inscribed or circumscribed polygon with an indefinitely increasing number of sides. is given by s = 2r cos 12 θ . when investigating the area or arc length of a curve. These notions are formalized in the study of calculus. S. s. In like manner. or arc length. is given by S = ns.

π< Arc Length of an Arc The arc length. Therefore. Find the arc length of the sector defined by the arc centered at (0. Pi ê 2<D< Out[4] 84 π. the ratio of the circumferences of two circles equals the ratio of their radii. therefore.232 Chapter 16 Arc Length C1 and C2 . find the arc length of 1/4 of the circle’s circumference. S ≡π D relating the circumference of a circle to its diameter is a constant for all circles. t2 }] returns the arc length of a circle between two parameter values. 0) with radius 2 and start and end angles of π/4 and 3π/4. r2 As n increases S1 and S2 approach the circumferences of C1 and C2 . ArcLength2D@c1. 0<. Example. Find the circumference of a circle centered at (0. Also. Solution. s. 0) with a radius of 2. (or span) of an arc is the ratio of the angular span of the arc to the angular span of a full circle (2π) times the circumference of a circle and is given by s= θ (2πr) = (θ2 − θ1 )r. 2D. 80. which is given by 2nr1 cos ns1 S1 = = S2 ns2 2nr2 cos  1 2 θ 1 2θ = r1 . Since the radii of the circles are proportional to their diameters. the ratio of the circumferences to the diameters is also a constant which has been given the symbol π. The function ArcLength2D[circle. . or writing in a different form. {t1 . The function Circumference2D[circle] returns the circumference of a circle. the circumference S of a circle is given by S = πD = 2πr. In[4]: c1 = Circle2D@80. 2π Example. 8Circumference2D@c1D.

In[5]: Span2D@a1 = Arc2D@Point2D@80. The function Span2D[arc] returns the arc length of an arc. which we will discuss subsequently) the integral for arc length leads to elliptic integrals. which is written E(φ|m) in traditional mathematical notation. m] function. but require the definition of non-elementary functions. 8Pi ê 4. 0<D.5 Ellipses and Hyperbolas If x = fx (t) and y = fy (t) are the parametric equations of a curve. a class of integrals that cannot be expressed in closed form in terms of elementary functions.16. For many curves this integral is difficult to evaluate in symbolic form. For the arc defined in the previous example.75<D êê N Out[6] 1. This does not mean that these integrals do not exist. in the parameter range 0 ≤ t ≤ 2π. the elliptic integral needed to evaluate the arc lengths of ellipses and hyperbolas is built-in to Mathematica as the EllipticE[phi. The function ArcLength2D[arc.5 Ellipses and Hyperbolas 233 Solution.75. find the arc length between the parameter values 0. The arc length. 2. t2 }] returns the arc length of an arc between two parameter values. s. then the arc length. 0. Fortunately. but by using the numerical integration capabilities of Mathematica we can find an approximate arc length.5708 16. of the curve between parameter values t1 and t2 is given by the integral Z t2 s= p (x0 )2 + (y 0 )2 dt t1 where x0 and y 0 are the derivatives of the parametric equations of the curve with respect to t. 80. {t1 . In[6]: ArcLength2D@a1.25. s.25 and 0. Solution. Even for the conic curves (except the parabola. 3 Pi ê 4<DD êê Simplify Out[5] π Example. of an ellipse in terms of this elliptic integral is given by   .

a2 .

s=bE t.

1− 2 b .

using the parametric equations for a hyperbola defined in Descarta2D. Similarly. of the ellipse. Since all elliptic arcs can be expressed as sums or differences of such arcs. respectively. the arc length. s. can be expressed in terms of this elliptic integral and is given by ! ! r . the formula serves to provide a means for expressing the arc length between any pair of parameters.234 Chapter 16 Arc Length where a and b are the lengths of the semi-major and semi-minor axes. of a hyperbola.

a2 a2 + b 2 .

−1 t.

Even though complex numbers are present in this formula. of such a parabola between two parameters. t2 }] returns the arc length of a curve between two parameter values.nb where the arc length is shown to be s = f (S2 − S1 ) where p Sn = tn 1 + t2n + sinh−1 (tn ). The arc length. Pi ê 2<D êê N Out[7] 3. 0D. {t1 . Example. 3. 2. Find the approximate arc length of the ellipse x2 /9 + y 2/4 = 1 between parameter values 0 and π/2. 0<. The derivation is provided in the exploration pbarclen. In[7]: e1 = Ellipse2D@80. of √ the hyperbola and i = −1. s. The Descarta2D function ArcLength2D[curve. Find the arc length cut off by the focal chord of the parabola. ArcLength2D@e1.6 Parabolas Consider a parabola represented by the parametric equations x = f t2 and y = 2f t.96636 16. t1 < t2 . Example. respectively. the resulting arc length is a real number. Solution. can be derived in terms of elementary functions. .1+ 2 s = i b E i cos a b where a and b are the lengths of the semi-transverse and semi-conjugate axes. Find the arc length of the parabola y 2 = 4x between parameter values −2 and 3. 80.

The curve may be a circle. The Descarta2D function ArcLength2D[parabola.59117< 16. 4. Example. 3<D. hyperbola or parabola). it is fairly easy to determine the parameter value that corresponds to a particular point on the curve. The Descarta2D function Parameters2D[line. In[8]: p1 = Parabola2D@80. focal length of 1 (opening upward) cut off by the line 2x + 4y − 5 = 0. p1D 1 2 Out[9] 9 €€€€€ I1 − 1 è!!! è!!! 6 M. This function will also be useful in the area functions introduced in the next chapter. an ellipse. Solution. whose parametric representation is more complex.7 Chord Parameters 235 Solution. Pi ê 2D. 4. curve] returns a list of the two parameters which are the points of intersection between the line and the curve. Essentially. the Parameters2D function computes the parameter values of the points of intersection between a line and a second-degree curve (circle. The function Parameters2D provides a more geometric definition of the chord that can be used with the arc length functions. ellipse. it may be difficult to determine the parameter values needed to compute the arc length of some specific portion of the curve. 1<D< êê N Out[8] 817.7 Chord Parameters For some curves. t12D êê FullSimplify 1 "######################### è!!!!! è!!! "################### è!!! è!!! "################### è!!! 202 + 10 97 − LogA1 − 6 + 11 − 2 6 E + LogA1 + 6 + 11 + 2 6 E 4 Out[10] €€€€€ . Find the arc length of the parabola with vertex at (0. 0). 8−1. 0<. 8−2. t2 }] returns the arc length of the parabola between the two parameter values. such as circles and ellipses. €€€€€ I1 + 6 M= 2 In[10]: ArcLength2D@p1. In[9]: p1 = Parabola2D@80. 0D. 1. 1. 0<.2211. {t1 . −5D. The focal chord of a parabola has end points at parameter values ±1. a hyperbola or a parabola. l1 = Line2D@2. for hyperbolas and parabolas. ArcLength2D@p1. however.16. 8ArcLength2D@p1. t12 = Parameters2D@l1.

. . PA (a. . . . the Parameters2D function will only return parameter values if the line intersects the primary branch of the hyperbola. The function Perimeter2D[triangle] computes the perimeter of a triangle. . 16. —– Approximate Arc Length of a Curve. .8 Summary of Arc Length Functions Descarta2D provides a general function. parabolas. The function Circumference2D[curve] computes the arc length of a complete circle or ellipse. . . . . . . s. . . . t2 }] can be used to compute the arc length of any parametric curve in Descarta2D (arcs. pbarclen. Write a Mathematica function of the form NArcLength2D[crv. . . .nb Using exact integration in Mathematica show that the arc length of a parabolic conic arc with control points P0 (0. . . 16. . . narclen. . caarclen. {t1 .nb The arc length of a smooth. —– Arc Length of a Parabolic Conic Arc. . . . . . . b). . . . . . . . . and P1 (1. . parametrically defined curve can be approximated by a polygon connecting a sequence of points on the curve. . . hyperbolas and conic arcs). . . . Only the primary branch of a hyperbola in standard position is parameterized (the primary branch is the branch opening to the right when the hyperbola’s rotation angle is zero).nb Show that the arc length. . . . . . . . . . . . of a parabola whose parametric equations are x = f t2 and y = 2f t is given by s = f (S2 − S1 ) where S n = tn p 1 + t2n + sinh−1 (tn ). . . . . ellipses. . . —– . 0) can be expressed exactly in symbolic form in terms elementary functions of a and b. . lines. . . . . . . . . . 0). . ArcLength2D for computing the arc length of parametric curves and several special functions for computing arc lengths of specific curves. .9 Explorations Arc Length of a Parabola. . . . . . positions on the other branch are generated by reflecting coordinates on the primary branch. . . . . . .236 Chapter 16 Arc Length Descarta2D Hint. t2 }] //N. {t1 . . . . . . . . t2 }. . Produce a graph illustrating the convergence of the approximation to the Descarta2D function ArcLength2D[crv. line segments. . . . The function Span2D[curve] computes the arc length of a complete arc or conic arc. . . . The Descarta2D function ArcLength2D[curve. As a result of this parameterization. The function Length2D[lnseg] computes the length of a complete line segment. . . . . . . circles. . . . . . . . . . . . n] that approximates the arc length of a curve between two parameter values using a specified number of coordinates at equal parameter intervals between the two given parameters. . {t1 .

The area of ABC is given by Area ABC = Area BCDE − Area ABE − Area ACD A D h B E A D C B D h h b A b1 b b2 C E b1 B b2 b Figure 17. For a rectangle with sides a and b. A= 2 Now consider the acute 4ABC in the center of Figure 17. As the boundary becomes more complex or contains curved elements. the area of 4ABC is one-half of the area of rectangle ABCD. we will look at some formulas from planar geometry. area is the measure of the number of unit squares that can be contained inside a boundary. the area. For a square with sides of length s. Consider the right triangle ABC shown in Figure 17. In this chapter we will derive formulas for the areas of Descarta2D objects. A = ab. 17. 237 C .Chapter 17 Area Intuitively. Clearly. acute and obtuse triangles. so the area. the computation of the area requires more complex considerations. is given by A = s2 . A.1: Areas of right. of a right triangle is bh . A.1.1 Areas of Geometric Figures Before exploring formulas for computing areas using analytic geometry.1 with height h and base b.

Now consider the trapezoid ABCD shown in Figure 17. The simplest is the familiar A = bh/2. 2 The same formula results for the area of an obtuse triangle (using b = b2 − b1 ). where b is the length of one of the sides of the triangle (the base) and h is the height of the triangle (the distance from the base to the opposite vertex). 2 2 Simplifying and using b = a + b1 + b2 yields A= (a + b) h.238 Chapter 17 Area F D a C E h A b1 a b2 B b Figure 17.2. 2 2 Simplifying and using b = b1 + b2 yields A= bh .1. The area of ABCD is given by Area ABCD = Area ABEF − Area ADF − Area BCE or Area ABCD = bh − hb2 hb1 − . of a triangle that involve lengths associated with the triangle.2: Area of a trapezoid. Triangular Area There are several formulas for the area. as shown on the right in Figure 17. 2 These formulas from planar geometry will be useful in upcoming sections for deriving the formulas using analytic geometry. A. or Area ABC = bh − b1 h b2 h − . .

1 Areas of Geometric Figures 239 y C A B A¢ B¢ C¢ x Figure 17. 0) and C 0 (x3 . The area of triangle ABC is given by Area ABC = Area AA0 C 0 C − Area AA0 B 0 B − Area BB 0 C 0 C. B and C onto the x-axis produces three points A0 (x1 . y2 ) and C(x3 .17. B(x2 . Since a triangle is represented in Descarta2D by the coordinates of the vertices. Consider the triangle ABC as shown in Figure 17. B 0 (x2 . A. The formula of Heron gives the area of the triangle in terms of the lengths of its sides. The height and base lengths of these trapezoids can be determined as the difference of the coordinates of the points. is given by the determinant . 0). 0). where the coordinates are A(x1 . y3 ). we wish to derive a formula based on the coordinates. This formula is derived in the exploration heron. 2 2 2 Expanding and rearranging will show that the area of a triangle. yielding Area ABC = (y1 + y3 )(x3 − x1 ) (y1 + y2 )(x2 − x1 ) (y2 + y3 )(x3 − x2 ) − − .nb. alone: p A = s(s − s1 )(s − s2 )(s − s3 ) where s = (s1 + s2 + s3 )/2 is the semi-perimeter. y1 ).3. Projecting A. sn .3: Area of a triangle by coordinates.

x1
1

A = ±

x2
2

x3

y1
y2
y3

1

1
1

where (x1 , y1 ), (x2 , y2 ) and (x3 , y3 ) are the coordinates of the vertices of the triangle. The
sign is selected to yield a positive area.
Alternately, if we multiply the length of the line segment joining two of the points, by the
length of the perpendicular line segment on that line from the third point, we have double the
area of the triangle determined by the three points.

240

Chapter 17 Area

Example. Find the area of a triangle whose vertices are (1, 2), (4, 4) and (5, 6).

Solution. The function Area2D[triangle] returns the area of a triangle.
In[1]: Area2D@Triangle2D@81, 2<, 84, 4<, 85, 6<DD
Out[1] 2

17.2

Curved Areas

If we inscribe a polygon inside any closed curve, it is evident that as the number of sides of
the polygon is increased, the area of the polygon approaches the area bounded by the curve.
Likewise, the perimeter of the polygon approaches the perimeter, or arc length, of the curve.
If the number of sides of the polygon is increased ad infinitum, the polygon will coincide with
the curve. In like manner, we can see that as the number of sides of a circumscribing polygon
is increased, the more nearly its area and perimeter will approach the area and perimeter
of the curve. Therefore, when investigating the area or perimeter of a closed curve, we may
substitute for the curve an inscribed or circumscribed polygon with an indefinitely increasing
number of sides. These notions are formalized in the study of calculus, but they can be applied
intuitively in the study of areas of simple curves as will be shown in the following sections.

17.3

Circular Areas

To determine the area of a circle, we examine a polygon inscribed in the circle as shown in
Figure 17.4. The area of any triangle in the figure is given by A4 = 12 sd, and the area of the
entire polygon is given by nA4 , because there are n such triangles. As n increases without
limit, we find that ns approaches S = 2πr and d approaches r. Therefore, the area of the
polygon approaches 12 Sr or πr2 . Accordingly, the area, A, of a circle is given by A = πr2 ,
where r is the radius of the circle.
Example. Find the area of a circle centered at (0, 0) with a radius of 2.

Solution. The Descarta2D function Area2D[circle] returns the area of a circle.
In[2]: Area2D@Circle2D@80, 0<, 2DD
Out[2] 4 π

17.3 Circular Areas

241

r

s
q

d

Figure 17.4: Circle approximated by an inscribed polygon.

The area of an arc sector of radius r as shown in Figure 17.5 may be determined as the
ratio of the angular span of the arc to the span of a complete circle (2π radians) times the
area of the circle. Since the area of a complete circle is πr2 , the area of an arc sector is given
by
r2
A = (θ2 − θ1 ).
2

Example. Find the area of the sector defined by the arc centered at (0, 0) with
radius 2 and start and end angles of π/4 and 3π/4.

y

y
r

q

r

q

x

Figure 17.5: Areas of an arc sector and segment.

x

242

Chapter 17 Area
Solution. The Descarta2D function SectorArea2D[circle, {θ1 , θ2 }] returns the
area of the sector defined by an arc of a circle.
In[3]: SectorArea2D@Circle2D@80, 0<, 2D, 8Pi ê 4, 3 Pi ê 4<D
Out[3] π

The area of an arc segment, which is the area bounded by the arc and the chord connecting
the end points of the arc as shown in Figure 17.5, is calculated as the difference of the areas
of the sector and the triangle whose vertices are the end points and the center. Since the area
of this triangle is A = 12 r2 sin θ, the formula for the area of the arc segment is 

θ
r2
sin θ

A = πr2

2
r2
(θ − sin θ)
=
2
where θ = θ2 − θ1 is the span of the arc, and r is the radius of the arc.
Example. Find the area of the segment defined by the arc centered at (0, 0) with
radius 2 and start and end angles of π/4 and 3π/4.

Solution. The Descarta2D function Area2D[arc] returns the area of the segment
defined by an arc and its chord.
In[4]: Area2D@Arc2D@Point2D@80, 0<D, 2, 8Pi ê 4, 3 Pi ê 4<DD êê Simplify
Out[4] −2 + π

Notice that if the angle θ is greater than π radians, the formula is still valid because sin θ will
be negative and the area of the central triangle will be added to the sector area producing the
correct result.

17.4

Elliptic Areas

The area of an ellipse depends only on the lengths of its semi-major and semi-minor axes,
and is independent of its position and orientation. It is shown in calculus that integrating the
equation y = f (x) of the curve between limits on the x-axis produces the area between the
curve and the x-axis. The equation of an ellipse in standard position is given by
y2
x2
+
= 1.
a2
b2

= 2 Therefore. 4 9 Solution. A. b sin θ). Example. The following steps outline the integration process that is used to compute the area: Z a y dx A = −a Z a p b 1 − x2 /a2 dx = −a πab .4 Elliptic Areas 243 p Solving for y yields y = b 1 − x2 /a2 for the upper portion of the ellipse. the area of the complete ellipse (both the upper and lower portions) is given by A = πab where a and b are the lengths of the semi-major and semi-minor axes. 2. Pi ê 2DD Out[5] 6 π Consider an ellipse in standard position with the equation y2 x2 + =1 a2 b2 as shown in Figure 17. of the ellipse. (a cos θ. The Descarta2D function Area2D[ellipse] returns the area of an ellipse. The equation of the line containing the chord is given by y2 = b sin θ(a − x) a(1 − cos θ) as can be determined from the two-point form of a line. respectively. The area. 0<. The area of the segment is determined using integration as follows: Z a (y1 − y2 ) dx A = a cos θ   Z a p b sin θ(a − x) dx b 1 − x2 /a2 − = a(1 − cos θ) a cos θ  ab π − 2 sin−1 (cos θ) − 2 sin θ . Calculate the area of the ellipse y2 x2 + = 1. can be determined by subtracting the area under the chord from the area under the ellipse between limits on the x-axis. 3.6. of a segment of the ellipse bounded by the chord defined from (a. 0) and a general point on the ellipse. In[5]: Area2D@Ellipse2D@80. = 4 .17.

Find the area of the ellipse segment from π/6 to π/3 radians for an ellipse with semi-major axis length of 3 and semi-minor axis length of 1. 8Pi ê 6. 3. The formula is valid for angles θ in the range 0 ≤ θ ≤ π. t2 }] returns the area of an ellipse segment defined by two parameter values. 4 Example. 0D.244 Chapter 17 Area y r y r q q x x Figure 17. Since all segments can be computed as sums or differences of such segments and simple triangles. Example. can be found by adding the area of the triangle formed by the sector sides and the chord of the sector. the area of all ellipse segments can be determined using this basic formula. {t1 . The area of the triangle is given by ab sin θ bh = A4 = 2 2 and the resulting formula for the area of the sector is given by A=  ab π − 2 sin−1 (cos θ) . 0<. Solution. In[6]: SegmentArea2D@Ellipse2D@80. Find the area of the ellipse sector from π/6 to π/3 radians for an ellipse with semi-major axis length of 3 and semi-minor axis length of 1. The function SegmentArea2D[ellipse. . 1. Pi ê 3<D 3 4 π 4 Out[6] − €€€€€ + €€€€€ The area of an ellipse sector. as illustrated in Figure 17.6.6: Areas of an elliptic segment and sector.

In[7]: SectorArea2D@Ellipse2D@80. Pi ê 3<D π 4 Out[7] €€€€€ 17. 0D. {t1 . but only upon the difference between the two parameters. which is given by Asegment = ab (sinh(s(t2 − t1 )) − s(t2 − t1 )). the area does not depend on the values of t1 and t2 directly. Since we know the coordinates of the vertex points of the triangle OP1 P2 we can compute its area directly as ab sinh(s(t2 − t1 )). 3. The Descarta2D function SectorArea2D[ellipse. 1.7.7: Areas of a hyperbolic segment and sector. s = cosh−1 (e).17. respectively. 8Pi ê 6. The exploration areahyp. and e is the eccentricity of the hyperbola. 0<.nb uses calculus to derive the formula for the area of the segment. Consider the hyperbolic segment as shown in Figure 17. In Descarta2D the parametric equations for the hyperbola are x = a cosh(st) and y = b sinh(st) where a and b are the lengths of the semi-transverse and semi-conjugate axes. A4 = 2 . Solution.5 Hyperbolic Areas Using the integration techniques demonstrated previously for ellipses the areas associated with hyperbolas can also be computed. 2 Interestingly.5 Hyperbolic Areas 245 y y P2 O x P2 O P1 x P1 Figure 17. t2 }] returns the area of an ellipse sector defined by two parameter values.

{t1 . The Descarta2D function SegmentArea2D[hyperbola. Also. Such a parabola can be represented with the set of parametric equations x = f t2 and y = 2f t.139091. SectorArea2D@h1. 0. {t1 .7. The area of the chordal area defined by the parameters t1 and t2 can be determined by subtracting the area between the parabola and the y-axis from the area between the chord and the y-axis. 8−2. 0). Find the area of the hyperbolic segment between parameters t1 = −2 and t2 = 1 for a hyperbola centered at the origin with a = 1 and b = 1/2 in standard position. t2 }] returns the area of the associated hyperbolic sector. and opening to the left as shown in Figure 17. 1<D< êê N Out[8] 80. axis parallel to the x-axis.360909< 17. The area of the hyperbolic sector is given by Asector = = A4 − Asegment abs (t2 − t1 ). The end points of the chord are (f t21 . 2f t1 ) and (f t22 . In[8]: h1 = Hyperbola2D@80. 2 The appropriate integral is then given by Z y2 (x2 − x1 ) dy A = x= y1 y2 Z = y1  y2 (t1 + t2 )y − 2f t1 t2 − 2 4f  dy. Solution. 8SegmentArea2D@h1.246 Chapter 17 Area The area of a hyperbolic sector is the difference between the area of the triangle OP1 P2 and the hyperbolic segment as illustrated in Figure 17.6 Parabolic Areas Consider a parabola in standard position with vertex at (0. find the area of the associated hyperbolic sector. 8−2. 2 Example. . focal length of f . t2 }] returns the area of a segment of a hyperbola defined by two parameters.8. 1. The function SectorArea2D[hyperbola. 0D. and the line through these two points is given by (t1 + t2 )y − 2f t1 t2 . 1 ê 2. 1<D. 2f t2 ). 0<.

The function SegmentArea2D[parabola. of a parabolic segment to be A= f 2 (t2 − t1 )3 3 where t1 and t2 are the parameters of the end points of the chord defining the segment. Performing the integration and making the substitutions y1 = 2f t1 and y2 = 2f t2 yields the formula for the area. In[9]: p1 = Parabola2D@80.6 Parabolic Areas 247 y P2 FH f . The area depends solely on the focal length and the chord position. A. 0<. and t1 < t2 for positive areas. A parabola has no sector area definition because a parabola does not have a center point. In Descarta2D the end points of the focal chord occur at parameter values t1 = −1 and t2 = 1. SegmentArea2D@p1.17. Pi ê 2D. Solution.8: Area of a parabolic segment. Find the area between the parabola y 2 = x/2 rotated π/2 radians about its vertex and its focal chord. {t1 . Example. . t2 }] returns the area of a parabolic segment defined by parameters t1 and t2 . 8−1. 1 ê 2. Notice that the parabola’s position and orientation have no bearing on the area of a parabolic segment. 1<D 2 3 Out[9] €€€€€ Descarta2D Hint. 0L x P1 Figure 17.

The Descarta2D function Area2D[cnarc] computes the area between a conic arc and its chord. 4) and ρ = 0. the area approaches the true area of the conic arc segment. This process can be generalized to find the segment area of any conic arc. 0. The details of this process are captured in the exploration caarea1. 0).75 and its chord. The area of the conic arc segment is found to be A= bdρ 2r3    1−ρ ρr + (−1 + ρ)2 loge ρ+r √ where r = −1 + 2ρ (assuming b > 0 and d > 0). b) and projective discriminant is ρ. 85. 4<. 0). 0) and rotate the conic so that the end point is on the x-axis.nb. 0). a conic arc whose start point is (0. The methods of integral calculus accomplish this summing process. Find the area between the conic arc with start point (1. Consider. Example. and in the limit as the height of the rectangles approaches zero. Therefore. end point is (d. Notice that the position of the conic arc in the plane has no bearing on its chordal area.7 Conic Arc Area The area between a conic arc and its chord can also be computed by summing infinitesimal rectangles through the use of calculus. end point (5. 0<. Notice that the abscissa. then ρ = 12 and the formula for the area given above is invalid. The formula for a parabola is much simpler and is given by A= bd 3 as shown in the exploration caarea2.75DD êê N Out[10] 5.34774 .nb. Intuitively.248 Chapter 17 Area 17. Solution. 2<. If the conic arc is a parabola. we can translate the start point to (0. since the chord of this conic arc is coincident with the x-axis we can imagine subdividing the area of the conic arc into a large number of horizontal rectangles of very small height. of the apex point has no bearing on the area of the segment bounded by the conic arc and its chord. apex point is (a. apex point (3. 83. for example. a. 2). By summing the areas of these small rectangles we can provide an approximation to the area of the conic arc. In[10]: Area2D@ConicArc2D@81.

. . .1: Descarta2D area functions. . . . K. . . . . Area2D[object] returns the area enclosed by a closed object (circle. . . . . b and c are the lengths of the sides. . . . . . . . {t1 . . . . . . . .8 Object Area2D SectorArea2D SegmentArea2D arc circle yes yes no yes no yes conic arc ellipse yes yes no yes no yes hyperbola parabola no no yes no yes yes triangle yes no no Summary of Area Functions Table 17. t2 }] returns the area between a chord and the curve. . . . . . . t2 }] returns the area of a sector defined by two parameters. . . . . . 17. . . . .17. . . . ellipse or triangle). . . .1 summarizes the area functions provided by Descarta2D. . {t1 . . of a triangle 4ABC is given by p K = s(s − a)(s − b)(s − c). —– Area of Triangle Configurations. . . SegmentArea2D[object. . . . . . . . . . . . . SectorArea2D[object. . . . . . .nb Show that the area. . . . . . . . . where the semi-perimeter s = (a + b + c)/2. . .nb V3 a3 s2 s1 a1 V1 a2 s3 V2 . . . . . . . . . . . . 17. . .8 Summary of Area Functions 249 Table 17.9 Explorations Heron’s Formula. . . . . . and a. . . . triarea.heron.

. b) and (d. . . . A3 . . . . . . . —– Area of a Conic Arc (General) . . .nb For the conic arc whose control points are (0. . . .nb Referring to Figure 17. . . a2 and s1 is given by A1 = s21 sin(a2 ) sin(a1 + a2 ) . . . . . . and e is the eccentricity of the hyperbola (assuming the parameterization Descarta2D uses for a hyperbola). . . . . . show that the area. . . . . . . caarea1. . . 0). . . . . . . .250 Chapter 17 Area For the triangle illustrated in the figure. . s3 and a2 is given by A2 = s23 sin(a1 ) sin(a2 ) . respectively. . . . . . . . . . 0). . . . . . . . . . . . . associated with the SAS (side-angle-side) configuration whose parameters are s1 . . . . . . . . . triarlns. . . . . 2 —– Area of Triangle Bounded by Lines. 2 sin(a1 + a2 ) Show that the area. . . . . . s = cosh−1 (e). . . show that the area between the conic arc and its chord is given by    1−ρ bdρ A = 3 ρr + (−1 + ρ)2 loge 2r ρ+r . . y = m2 x + c2 and x = 0 is given by A= 1 (c1 − c2 )2 p . . use calculus to verify that the areas between two parameters t1 and t2 of a segment and a sector of a hyperbola are given by Asegment = Asector = ab (sinh(s(t2 − t1 )) − s(t2 − t1 )) 2 abs (t2 − t1 ) 2 where a and b are the lengths of the semi-transverse and semi-conjugate axes. (a. 2 (m1 − m2 )2 —– Areas Related to Hyperbolas. . . . . . . . A1 . . . . . . A2 . . . . . . . . . . associated with the ASA (angle-side-angle) configuration whose parameters are a1 . . 2 sin(a1 ) Show that the area. . . .nb Show that the area of the triangle bounded by the lines y = m1 x + c1 . a2 and s3 is given by A3 = s1 s3 sin(a2 ) . . .7. . . . . . . associated with the AAS (angle-angle-side) configuration whose parameters are a1 . . . . hyparea. .

. . . . . . —– . . . . . 0). . . . . . 0. . . . . . yC ) show that there are four positions of a point Pn (x. . . . . . . . . . . . . . P0 is the centroid of 4ABC and 4P1 P2 P3 . —– One-Third of a Circle’s Area . . . . . 0. . . +yA − yB + yC ) P3 (+xA + xB − xC . . . . . circarea. . . . . .nb A tetrahedron is a three-dimensional geometric object bounded by four triangular faces. . . . Given a tetrahedron with vertices O(0. . 4AP C and 4BP C have equal areas. . . 4ABC connects the midpoints of the sides of 4P1 P2 P3 . . +yA + yB − yC ). . . y) such that 4AP B. . . . . . . . . . . . —– Equal Areas Point . . . . . . . . . . . θ.9 Explorations 251 √ where r = −1 + 2ρ (assuming b > 0 and d > 0). b. yB ) and C(xC . show that θ is within 1/2 percent of 5π/6 radians. 3 2 Also. . . . . . . B(0. . . . . . . . . . . . . 0). . b) and (d. −yA + yB + yC ) P2 (+xA − xB + xC . . . . . . . .nb Show that the angle. . . . . . eqarea. . . . . . B(xB . . .caarea2. 0).17. —– Area of a Tetrahedron’s Base . . . . 0). . . . . . . . . . . . . A(a. subtended by a segment of a circle whose area is one-third the area of the full circle is the root of the equation θ − sin θ π = . . . . . . . (a. . . . . 0. . tetra. . . The coordinates of Pn are given by P0 ( 13 (xA + xB + xC ). . . . . .nb Show that the area between a conic arc whose projective discriminant is ρ = 12 and its chord is given by bd A= 3 when the control points are (0. . yA ). . . . 0) and C(0. . . . . . . . . . . . . . Note the similarity to the Pythagorean Theorem for right triangles. y and z. . . . c) show that the areas of the triangular faces are related by the equation (AABC )2 = (AAOB )2 + (AAOC )2 + (ABOC )2 where Axyz is the area of the triangle whose vertices are x. . . . . . —– Area of a Conic Arc (Parabola) . . 13 (yA + yB + yC )) P1 (−xA + xB + xC . . . . . . . . . . . .nb Given 4ABC with vertices A(xA . .

.

Part V Tangent Curves .

.

in a factored form that is easier to remember. as Q moves up to and ultimately coincides with P .Chapter 18 Tangent Lines Let two points. be taken on any locally smooth convex curve. We desire to find the equation of the tangent line at P1 . P and Q.1. y1 ) a point on it as shown in Figure 18.1 Lines Tangent to a Circle Tangent Through a Point On a Circle Let (x − h)2 + (y − k)2 = r2 be a circle and P1 (x1 .3) . is called the tangent line to the curve at point P .2) Adding Equation (18. 18. (y1 − k) (18.1) Since the point P1 is on the circle we also have the equation (x1 − h)2 + (y1 − k)2 = r2 . the slope of the line tangent to the circle will be the negative reciprocal −(x1 − h)/(y1 − k) and the equation of the line tangent to the circle at point P1 becomes (point–slope form) y − y1 = − (x1 − h) (x − x1 ). The line through P perpendicular to the tangent line is called the normal to the curve at the point P . 255 (18. k) and P1 is (y1 − k)/(x1 − h).2) results in (x1 − h)x + (y1 − k)y + (h2 + k 2 − r2 − hx1 − ky1 ) = 0 or. then the limiting position of the line P Q. and let the point Q move along the curve nearer and nearer to the point P . (18. Since the slope of the line joining the center (h.1) to Equation (18. (x − h)(x1 − h) + (y − k)(y1 − k) = r2 .

1: Line tangent to a circle. it returns False.256 Chapter 18 Tangent Lines y P1 Hx1 . 1DD Out[1] True In[2]: lns = TangentLines2D@p1. c1 = Circle2D@82. c1D êê Simplify Out[2] 9Line2DA2. the equation of the tangent line at P1 is x1 x + y1 y = r2 . x2 + y 2 = r2 . 2 è!!! è!!! 3 . In[1]: IsOn2D@p1 = Point2D@85 ê 2. circle] returns True if the point is on the circle. 1 + Sqrt@3D ê 2<D. otherwise. 2 2 Example. Confirm that the point ( 52 . kL x Figure 18. x2 + y 2 + ax + by + c = 0 then the tangent line at P1 is a b xx1 + yy1 + (x + x1 ) + (y + y1 ) + c = 0. If the circle is centered at the origin. If the circle is given in general form. The function IsOn2D[point. TangentLines2D[point. y1 L CHh. 1<. circle] returns a list of lines through the point and tangent to the circle. Solution. 1 + √ 3 2 ) is on the circle (x − 2)2 + (y − 1)2 = 1 and find the tangent line at that point. −2 I4 + 3 ME= .

the two tangent lines can be determined directly from the normal form of a line as x cos θ + y sin θ − r = 0 √ d2 − r2 r and sin θ = ± . 0) in a convenient position as shown in Figure 18. Clearly. as shown in Figure 18. tangent to a circle at the origin.3.r2 Q1 q D x r Q2 d Figure 18. Consider the circle x2 + y 2 = r2 and the point D(d.2: Lines through a point. c1. 4<. PlotRange −> 880. 8−1. y1 ) is outside of the circle (x − h)2 + (y − k)2 = r2 there will be two tangent lines from P1 to the circle.18.2. 4 3 2 1 0 -1 0 1 2 3 4 5 Tangents Through a Point Outside a Circle If the point P1 (x1 . it will have new coordinates P0 (x0 . cos θ = d d If the point D is rotated by an angle α about the origin. In[3]: Sketch2D@8p1. lns<.1 Lines Tangent to a Circle 257 y è!!!!!!!!!!!! ! d 2 . 3<<D. y0 ) and the tangent lines will also be rotated by α resulting in the two lines x cos(α + θ) + y sin(α + θ) − r = 0 where .

where y0 x0 and sin α = . (h. d d Using the standard trigonometric formulas for the sine and cosine of the sum of two angles yields cos α = cos(α + θ) = cos α cos θ − sin α sin θ √ y0 ± d2 − r2 x0 r − = d d d d   p 1 2 − r2 r ∓ y d x = 0 0 d2 and sin(α + θ) = = = cos α sin θ + cos θ sin α √ r y0 x0 ± d2 − r2 + d d d d  p 1  2 − r2 . Translating the tangent lines from (0. tangent to a circle at the origin. y1 ). r ± x d y 0 0 d2 As a final adjustment we translate the geometry so that the center of the circle may be a general location (h. Notice that after the substitutions are performed no trigonometric functions are present in the formulas. y1 ).4. and r and d is the distance between (h. k).3: Lines through a rotated point.258 Chapter 18 Tangent Lines y P0 Hx0 . k) as shown in Figure 18. 0) to (h. y0 L Q1 q a x r Q2 Figure 18. . k) using x0 = x1 + h and y0 = y1 + k yields x cos(α + θ) + y sin(α + θ) − (r + h cos(α + θ) + k sin(α + θ)) = 0 where cos(α + θ) and sin(α + θ) are functions of (x1 . k) and (x1 .

we desire the coordinates of the points of contact between the circle and the two tangent lines.18. .2 (r cos θ.2 (h + r cos(α + θ).4: Lines through a general point. circle] returns a list of lines through the point and tangent to the circle. tangent to any circle. TangentPoints2D[point. kL r Q2 x Figure 18.1 Lines Tangent to a Circle 259 y P1 Hx1 . −1) and tangent to the circle (x + 1)2 + (y − 1)2 = 4. k + r sin(α + θ)) where where cos(α + θ) and sin(α + θ) have the same formulas as in the previous section. Find the lines passing through the point (3. as shown in Figure 18. Tangent Contact Points Given a circle (x − h)2 + (y − k)2 = r2 and a point P1 (x1 . cos θ = d d If the geometry is rotated and translated to a general position the coordinates of the contact points are given by Q1. The function TangentLines2D[point. From the previous section it is clear that when the geometry is in the standard position the coordinates of the contact points are given by Q1. y1 L Q1 CHh. y1 ) outside the circle. circle] returns a list of the points of tangency. r sin θ) √ d2 − r2 r and sin θ = ± . Solution.4. Find the coordinates of the points of tangency and plot. Example.

a few built-in functions can be combined to apply the technique described in this section. c1D. {x. y1 ). −1<D. Find the length of the tangent line segment from the point (4. −1<D. Example. Polynomial2D[quad. However. 1<. 4 2 0 -2 -4 -2 0 2 4 Tangent Line Segment Length To find the length of the tangent line segment drawn from a given point. . −20. 3) to the circle (x + 1)2 + (y + 2)2 = 4. c1. y) into the quadratic equation. The function Quadratic2D[circle] returns the quadratic equation of a circle. Therefore the length of the tangent line segment (squared) is found by substituting the coordinates of the point into the equation of the circle. P1 (x1 . c1 = Circle2D@8−1. Since 4OP1 P in Figure 18. 12. Point2DA9 €€€€€ . c1D< Out[4] 98Line2D@0. 2D. objs = 8TangentLines2D@p1. objs<D. y}] substitutes the coordinates (x.260 Chapter 18 Tangent Lines In[4]: p1 = Point2D@83. −36D<. €€€€€€€€€ =E== 5 5 In[5]: Sketch2D@8p1.2 is a right triangle the distance D between P and P1 is given by D2 = d2 − r2 = (x1 − h)2 + (y1 − k)2 − r2 . the following method can be used. to a circle (x − h)2 + (y − k)2 = r2 without computing the point of tangency. −20D. Line2D@16. TangentPoints2D@p1. Descarta2D does not have a built-in function to compute the length of a tangent line segment. 3 11 9Point2D@8−1. Solution.

2D. 3<DD êê Simplify è!!!!! Out[7] 46 Tangents Parallel to a Line The equations of the two lines parallel to the line L ≡ Ax + By + C = 0 and tangent to the circle (x − h)2 + (y − k)2 = r2 as shown in Figure 18. 3<D. 3<DD Out[6] è!!!!! 46 Of course this gives the same result as constructing the tangent points and finding the distance directly. The formula is derived by constructing a line Lc that passes through the center (h. Sqrt@Polynomial2D@Quadratic2D@c1D. Point2D@84. The two tangent lines are then determined by offsetting Lc a distance ±r. Notice that the constant coefficient C of the line is not involved in the equations of the tangent lines since only the slope is involved in establishing the parallel condition. In[7]: Distance2D@TangentPoints2D@Point2D@84. c1D@@1DD.1 Lines Tangent to a Circle y 261 L¢¢ L L¢¢ L¢ L¢ x Figure 18.5: Lines tangent to a circle.5 are given by   p L0 ≡ Ax + By − Ah + Bk ± r A2 + B 2 = 0. Using equations the derivation is L ≡ Ax + By + C = 0 . In[6]: c1 = Circle2D@8−1. −2<.18. 84. k) of the circle with slope m = −A/B.

262 Chapter 18 Tangent Lines Lc ≡ Ax + By − (Ah + Bk) = 0 ax + by − (ah + bk) = 0 L0 ≡ ax + by − (ah + bk ± r) = 0 p Ax + By − (Ah + Bk ± r A2 + B 2 ) = 0. c1. 8−2. lns = 8TangentLines2D@l1. The Descarta2D function TangentLines2D[line. c1 = Circle2D@83. c1. . circle. Parallel2DD. 2. Perpendicular2DD< è!!!!! è!!!!! 13 E. The function TangentLines2D[line. c1. −12 + 13 E=. 1D. Parallel2D] returns a list of lines parallel to the line and tangent to the circle. 3. In[8]: l1 = Line2D@2. Find the lines tangent to the circle (x − 3)2 + (y − 2)2 = 1 and parallel and perpendicular to the line 2x + 3y − 1 = 0 and plot. L00 . circle. Example.5. lns<. Line2DA2. Line2DA−3. perpendicular to the line Ax + By + C = 0 and tangent to the circle (x − h)2 + (y − k)2 = r2 as shown in Figure 18. −1D. simply use the line Bx − Ay + C = 0 (which is perpendicular to the given line) and apply the formula from the previous section. 2<. 5 + 13 E== Out[8] 99Line2DA2. Tangents Perpendicular to a Line To find the equations of the two lines. Perpendicular2D] returns a list of lines perpendicular to the line and tangent to the circle. where a= √ b A and b = √ 2 2 +B A + B2 A2 are the normalized coefficients of the line. TangentLines2D@l1. Once again the value of the constant coefficient C has no bearing on the equations of the resulting lines. 3. 2. −12 − In[9]: Sketch2D@8l1. è!!!!! è!!!!! 9Line2DA−3. 5<<D. PlotRange −> 88−2. 5 − 13 E. 3. 5<. Solution.

2 + €€€€€€€€€€€€€€ è!!!!! € =E. lns. Point2DA93 − €€€€€€€€€€€€€€ è!!!!! € . 2 + €€€€€€€€€€€€€€ è!!!!! € =E. 5 4 3 2 1 0 -1 -2 -1 0 1 2 3 4 5 . Point2DA93 + €€€€€€€€€€€€€€ è!!!!! € . Solution. 2 − €€€€€€€€€€€€€€ è!!!!! € =E= 13 13 13 13 Out[10] 9Point2DA93 + €€€€€€€€€€€€€€ è!!!!! € . CurveLength2D −> 20D. circle. pts<. In[10]: pts = Map@HPoint2D@#. Using the geometric objects from the previous example. circle] returns the same result as TangentLines2D[line.1 Lines Tangent to a Circle 263 5 4 3 2 1 0 -1 -2 -1 0 1 2 3 4 5 Descarta2D Hint. circle] will return the point of contact if the line is tangent to the circle.18. find the points of contact of the four tangent lines. 5<<. c1. The function Point2D[line. Parallel2D] because specifying the keyword Parallel2D is optional. Example. Flatten@lnsDD êê Simplify 2 3 2 3 13 13 13 13 3 2 3 2 Point2DA93 − €€€€€€€€€€€€€€ è!!!!! € . 8−2. In[11]: Sketch2D@8l1. 2 − €€€€€€€€€€€€€€ è!!!!! € =E. Quadratic2D@c1DDL&. PlotRange −> 88−2. 5<. TangentLines2D[line.

Let C1 be a circle. be positioned so that its center is on the +x-axis a distance d from the origin with equation (x − d)2 + y 2 = r22 . centered at the origin with equation x2 + y 2 = r12 . respectively. h2 = d and k2 = 0. with radius r1 . yielding rn = rn2 = rn2 (A2 + B 2 ) = Ahn + Bkn + 1 √ A2 + B 2 (Ahn + Bkn + 1)2 A2 + B 2 (Ahn + Bkn + 1) where h1 = 0. If L is tangent to the circles then d1 and d2 must equal the radii of the circles. with radius r2 .264 Chapter 18 Tangent Lines y L r2 r1 x d Figure 18. Tangents to Two Circles Suppose C1 and C2 are two circles and we wish to determine the equations of the lines tangent to both circles. Solving these two equations for A and B produces four pairs of solutions given by A = B = r1 + sA r2 p sB d2 − (r1 + sA r2 )2 . Let d1 and d2 be the distances from the center of C1 and C2 to L.6: Lines tangent to two circles. Simplifying. We proceed by finding the equations of tangent lines when the circles are in a special position and then we transform the result to a general position. k1 = 0. Since C1 is centered at the origin any line tangent to C1 can be written in the form L ≡ Ax + By + 1 = 0 because no line tangent to C1 can pass through the origin. we have the two equations r12 (A2 + B 2 ) = r22 (A2 + B 2 ) = 1 (1 + Ad)2 . and let C2 .

Applying these transformations yields the four lines (AH − BK)x + (BH + AK)y + d2 r1 − h1 (AH − BK) − k1 (BH + AK) = 0 where H = h1 − h2 and K = k1 − k2 and A and B take the values given as before. 8−3. 72D. PlotRange −> 88−6. 2DD Out[12] 9Line2D@0. 6<. or transverse. 2D. The first two lines in the list are the external tangents (if returned). l3. l4< = TangentLines2D@c1 = Circle2D@83. The Descarta2D function TangentLines2D[circle.1 Lines Tangent to a Circle 265 where the sign constants sA ={ − 1. The first pair of solutions gives the external. 1. tangents and the second pair gives the internal. After the rotation we translate the lines from (0. c2 = Circle2D@8−3. Line2DA24. l1. 36. 3 2 1 0 -1 -2 -3 -4 -2 0 2 4 6 . è!!! 5 . Solution. l2<. l3. In[12]: 8l1. c2. circle] returns a list of lines tangent to two circles. 8−3. 0<. −36. 72D. 12 è!!! 5 . c2. Example.18. 0<. 0E. Sketch2D@8c1. Let C1 ≡ (x − h1 )2 + (y − k1 )2 = r12 and C2 ≡ (x − h2 )2 + (y − k2 )2 = r22 be the equations of the two circles. 1. −1. tangents. l4<. 0) to (h1 . We now use the special solution given above to find the tangent lines when the circles are in a general position. PlotRange −> 88−6. 1} and sB ={1. 3<<D. −1} take on the values ±1 in pairs as shown in the lists. 0E= In[13]: Sketch2D@8c1. To attain a general positioning we first rotate the lines given in the special solution by an angle θ where sin θ = (h1 − h2 )/d and cos θ = (k1 − k2 )/d. Line2D@0. −1. 3<<D. l2. Find the four lines tangent to the circles (x − 3)2 + y 2 = 4 and (x + 3)2 + y 2 = 4. Sketch the external tangents and the internal tangents in separate plots. the third and fourth lines in the list (if returned) are the internal tangents. or direct. 6<. k1 ). −12 Line2DA24.

266 Chapter 18 Tangent Lines 3 2 1 0 -1 -2 -3 18. P1 (x1 . (18. xy with 12 (x1 y + y1 x) and x and y with 12 (x + x1 ) and 12 (y + y1 ). y1 ) is on the curve. on the curve may be written a(x − x1 )(x − x2 ) + b(x − x1 )(y − y2 ) + c(y − y1 )(y − y2 ) = ax2 + bxy + cy 2 + dx + ey + f as the equation is clearly first-degree in x and y (the terms above first-degree cancel out). Thus the equation of the tangent becomes b d e ax1 x + (x1 y + y1 x) + cy1 y + (x + x1 ) + (y + y1 ) + f 2 2 2 = 0. we get the equation of the tangent line a(x − x1 )2 + b(x − x1 )(y − y1 ) + c(y − y1 )2 = ax2 + bxy + cy 2 + dx + ey + f . . The equation of the chord joining any two points.4) This equation is most easily remembered if we compare it with the equation of the curve and notice that it is derived by replacing x2 and y 2 with x1 x and y1 y. y1 ) and P2 (x2 . and it is satisfied by the two points P1 and P2 . the line represented by Equation (18. y2 ).4) is called the polar of P1 with respect to the curve. or.2 -4 -2 0 2 4 6 Lines Tangent to Conics Tangent Through Point on Conic Suppose we have the general equation of a conic curve given by ax2 + bxy + cy 2 + dx + ey + f = 0. expanding. and P1 is the pole of the line with respect to the curve. Adding dx1 + ey1 + f1 to both sides will cause the right-hand side to vanish. because P1 satisfies the equation of the curve. 2ax1 x + b(x1 y + y1 x) + 2cy1 y + dx + ey + f = ax21 + bx1 y1 + cy12 . Putting x1 = x2 and y1 = y2 . Whether or not P1 (x1 .

CurveLength2D −> 15. In[14]: l1 = Line2D@p1 = Point2D@84. then the line will be tangent to the conic. l1<. 5<<D. Solution. 0<.4) and is given by (2Ax1 + By1 + D)x + (Bx1 + 2Cy1 + E)y + (Dx1 + Ey1 + 2F ) = 0. 7<. P1 (x1 . 5 4 3 2 1 0 -1 0 1 2 3 4 5 6 7 Pole Point and Point of Tangency Given a line L ≡ px + qy + r = 0 and a conic Q ≡ Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 we wish to determine the coordinates of the pole point. 4<D. If this line and line L are the same line. .2 Lines Tangent to Conics 267 Example. crv. −16D In[15]: Sketch2D@8p1. PlotRange −> 88−1. The equation of the polar (line) of the pole (point) P1 is derived in general form from Equation (18. 1. crv = Parabola2D@80. Find the line tangent to the parabola y 2 = 4x at the point (4. If the point is on the conic. 8.18. 4). 8−1. The Descarta2D function Line2D[point. y1 ). conic] returns the polar (line) of a pole (point) with respect to a conic. then the coefficients of the polar line must be equal to some multiple of the coefficients of L yielding the following system of three linear equations in three unknowns kp kq = 2Ax1 + By1 + D = Bx1 + 2Cy1 + E kr = Dx1 + Ey1 + 2F. of L with respect to Q. 0DD Out[14] Line2D@−4.

nb derives this equation. y1 ) is the point of tangency. This condition is equivalent to (4CF − E 2 )p2 + (4AF − D2 )q 2 + (4AC − B 2 )r2 + 2(BD − 2AE)qr + 2(BE − 2CD)pr + 2(DE − 2BF )pq = 0. If Q12 is zero. Example. (x1 . the coordinates of the pole are invalid. otherwise. Find the value of c such that the line 2x + 5y + c = 0 is tangent to the conic represented by 2x + xy − 4y 2 − 2x − 3y + 1 = 0 and plot. y1 ) and the constant k (k is ignored) gives x1 = Q1 Q2 and y1 = Q12 Q12 where Q1 = p(4CF − E 2 ) + q(DE − 2BF ) + r(BE − 2CD) Q2 Q12 = = p(DE − 2BF ) + q(4AF − D2 ) + r(BD − 2AE) p(BE − 2CD) + q(BD − 2AE) + r(4AC − B 2 ). If the line L is tangent to Q. The Descarta2D function Point2D[line. . then (x1 . 4<D Line Tangent to a Conic Condition To find the relationship between the coefficients of a line px + qy + r = 0 and a general conic Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 such that the line is tangent to the conic we note that the two intersection points between the line and the conic must be coincident. Show that the polar (line) found in the previous example corresponds to the pole (point) of tangency. In[16]: Point2D@l1. y1 ) is the pole of the polar L with respect to Q. Example. This condition occurs when the polar L passes through the center of the conic. crvD Out[16] Point2D@84. The exploration lntancon.268 Chapter 18 Tangent Lines Solving theses equations for (x1 . Solution. conic] returns the pole (point) of a polar (line) with respect to a conic.

#L&. y1 ) is on the conic curve Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 the equation of the tangent line at P1 is 2Axx1 + B(xy1 + x1 y) + 2Cyy1 + D(x + x1 ) + E(y + y1 ) + 2F = 0. and those of the point of contact (x1 . Loci2D@q1D<. 9c → €€€€€€€€€ I3 + 174 M== 33 In[19]: Sketch2D@8Map@Hl1 ê. 8−2. y1 ) when (x1 . y) of any point on the tangent line. q1 = Quadratic2D@2. cD 4 33 Out[18] 99c → €€€€€€€€€ I3 − 4 è!!!!!!!! è!!!!!!!! 174 M=. Without proof we list the following theorems concerning poles and polars that refer to Figure 18. y1 ). if the point P1 (x1 .7. 2<<D. The Descarta2D function TangentEquation2D[line. l1 = Line2D@2. passes through the points of tangency (when they are real) when the point is not on the curve. cD. quad] returns an equation establishing the condition that a line be tangent to the conic represented by the quadratic. −2. ansD. q1D Out[17] 80 + 24 c − 33 c2 == 0 In[18]: ans = Solve@eq1. 5. . 2 1.5 -2 -2 -1 0 1 2 3 Polar of a Conic As previously shown. Thus the polar. In[17]: Clear@cD.5 -1 -1.5 1 0. which has the same equation as the tangent line. 3<. y1 ). Solve this equation for the unknown coefficient c. −4. −3. y1 ) is not on the curve. PlotRange −> 88−3. 1D. y) and (x1 . can be interpreted to represent the line passing through the points of contact from (x1 . This equation expresses a relation between the coordinates (x. being symmetrical with respect to the coordinates (x. eq1 = TangentEquation2D@l1. But the equation.5 0 -0. 1.2 Lines Tangent to Conics 269 Solution.18.

• The polar of an exterior point P1 is the line joining the points of contact of the tangents drawn from P1 . q1 = Quadratic2D@2. Example. The function Point2D[line. Solution. • There is no (finite) polar of the center of a conic. 9. • If the polar L1 of pole P1 passes through pole P2 . quad] returns the polar line of the point with respect to the quadratic. The Descarta2D function Line2D[point.270 Chapter 18 Tangent Lines L1 P1 P L2 P2 Figure 18. • The polar of a focus is the corresponding directrix. • The polar of an interior point P is the locus of the point of intersection of the tangents at the extremities of every chord through P . • If the polars of P1 and P2 intersect at point P . Show the inverse functional relationship between the polar and the pole (3. q1D Out[21] Point2D@83. −2. 4.7: Poles and polars. quad] returns the pole (point) of the line with respect to the quadratic. 3. then P is the pole of the line P1 P2 . −1<D . 1DD Out[20] Line2D@13. −1. In[20]: l1 = Line2D@Point2D@83. −1<D. 16D In[21]: p1 = Point2D@l1. then the polar L2 of P2 passes through P1 . −1) with respect to the quadratic equation 2x2 + 3xy − y 2 + 4x − 2y + 1 = 0.

given two quadratic equations Q1 Q2 ≡ ≡ A1 x2 + B1 xy + C1 y 2 + D1 x + E1 y + F1 = 0 and A2 x2 + B2 xy + C2 y 2 + D2 x + E2 y + F2 = 0 and using Equation (18. Let L2 ≡ A1 x + B1 y + C2 = 0 be the desired tangent line (the linear coefficients A1 and B1 of L2 are set equal to the corresponding coefficients of L1 because the lines are parallel). but the results are too unwieldy to be of practical use. in general form.18. . consider the conic curve whose equation is Q ≡ Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0. and the equation of the tangent line at the point P1 (x1 . solving this equation for C2 gives the coefficients of the desired tangent line(s) L2 . can be used to construct such tangents when the problem involves numerical coefficients. The Descarta2D function TangentLines2D[line. The formulas can be derived in symbolic form. If we select a suitable translation. The coordinates of P are functions in the variable C2 . Lines Tangent to Two Conics The equation relating the coefficients of a quadratic equation Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 to the coefficients of a line px + qy + r = 0 tangent to the quadratic given previously is (4CF − E 2 )p2 + (4AF − D2 )q 2 + (4AC − B 2 )r2 + 2(BD − 2AE)qr + 2(BE − 2CD)pr + 2(DE − 2BF )pq = 0. If L2 is to be tangent to Q. resulting in equations for four tangent lines. then the pole point P of L2 with respect to Q must satisfy the equation for Q. To find the lines tangent to Q and parallel to a line L1 ≡ A1 x + B1 y + C1 = 0 the following technique can be used. however.e. we can insure that the tangent line does not pass through the origin (i. quad] implements this technique and can be used to derive the specialized formulas for lines tangent to conics in standard position as presented later in this chapter. r r r Now. (2Ax1 + By1 + D)x + (Bx1 + 2Cy1 + E)y + (Dx1 + Ey1 + 2F ) = 0. therefore. Descarta2D. r 6= 0) and the equation of the tangent line can be written in the form q r p x + + = p0 x + q 0 y + 1 = 0. y1 ) on the conic whose equation is 2Axx1 + B(xy1 + x1 y) + 2Cyy1 + D(x + x1 ) + E(y + y1 ) + 2F = 0 or.2) we can find the coefficients p0 and q 0 of the lines tangent to the quadratic by solving two quadratic equations in two unknowns.2 Lines Tangent to Conics 271 Tangents Parallel to a Line Once again.

Find the four lines tangent to the ellipses y2 x2 y2 x2 + = 1 and + = 1. The Descarta2D function TangentLines2D[curve. 4. −0.0 produces lines in the same positions with slightly different coefficients. 0.542326.74398D.272 Chapter 18 Tangent Lines Example. Using the geometric objects from the previous example. e2D êê N Out[22] 8Line2D@−0. curve] returns a list of lines tangent to the two curves.0. 0<.840168.542326. Example. lns = TangentLines2D@e1. e2 = Ellipse2D@80. −2. 2.542326.74398D< In[23]: Sketch2D@8e1. find the line segments connecting the contact points of the tangent lines. −2.840168. 0<.74398D. 3. Using this relationship the line segments connecting the points of tangency can be determined as illustrated in the next example. −2. −0. 0.840168. . 4 2 0 -2 -4 -4 -2 0 2 4 Line Segments Tangent to Two Conics Given a line tangent to a conic.1. e2. Line2D@0. −2.74398D. Pi ê 2D. In[22]: e1 = Ellipse2D@80. 0D. Solution. lns<D. Version 4. The following result was computed using Mathematica Version 3. Line2D@0. 16 4 4 9 Plot the ellipses and the tangent lines. 2.542326. the tangent point is the pole point of the line with respect to the conic. Line2D@−0.840168.

1 provides formulas for the line tangent to a parabola in standard form at a point P1 (x1 . 2.16228. ellipse and hyperbola. −2.18. 3 2 1 0 -1 -2 -3 -4 18.22474<. Any line which meets a parabola in two coincident points is a tangent line. curve] to construct a list of line segments connecting the contact points of the lines tangent to the two curves.2 provides the formulas for tangents to a parabola in standard form with a given slope m. 8−0. −2. Segment2D@8−3.16228.790569. 8−0. e2D êê N Out[24] 8Segment2D@8−3. 80.75568<D. but in a different order. 1. Version 4.22474<. −1) that are tangent to the parabola (y + 1)2 = 2(x − 1) and plot.790569. Table 18. Tangents to a Parabola A line that is parallel to the axis of a parabola intersects the parabola in only one (finite) point. Find the lines through the point (−1.16228. Example. Use the function TangentSegments2D[curve. . Table 18.0.0 produces the same line segments. real and coincident. y1 ). −1.16228.790569. or complex. Segment2D@83. 2. lnSegs<D.75568<D.75568<D.790569. e2. 80.22474<.75568<D< In[25]: Sketch2D@8e1.3 Lines Tangent to Standard Conics 273 Solution. −1. all other lines will cut the parabola in two points real and distinct. In[24]: lnSegs = TangentSegments2D@e1. 1. This section summarizes the equations for these tangent lines for the parabola.3 -2 0 2 4 Lines Tangent to Standard Conics Lines that are tangent to conics in standard position have particularly simple forms.22474<. Segment2D@83. The following result was computed using Mathematica Version 3.1.

y<DDD. 2D< In[27]: Sketch2D@8p1. In[26]: Clear@x. Map@Point2D@#. Line2D@−2. crv1 = First@Loci2D@Quadratic2D@Hy + 1L ^ 2 == 2 Hx − 1L. In the formulas a is the length of the semi-major axis of the ellipse and b is the length of the semi-minor axis. y1 ) y 2 = 4f x yy1 = 2f (x + x1 ) x2 = 4f y xx1 = 2f (y + y1 ) 2 (y − k)(y1 − k) = 2f (x + x1 − 2h) 2 (x − h)(x1 − h) = 2f (y + y1 − 2k) (y − k) = 4f (x − h) (x − h) = 4f (y − k) Solution. there will be two tangents with a given slope. 4. The function Point2D[line. y1 ).1: Tangents to a parabola at a point. Parabola Equation Tangent at P1 (x1 . crv1. −1<D.3 provides formulas for the line tangent to an ellipse in standard form at a point P1 (x1 . yD.4 provides the formulas for tangents to an ellipse in standard form with a given slope m. 6D. but unlike that of the parabola. curve] will return the point of tangency for each tangent line. lns. Table 18. crv1D&. Table 18. The function TangentLines2D[point. curve] returns a list of the lines through the point and tangent to the curve. 8x. lns = TangentLines2D@p1. p1 = Point2D@8−1.274 Chapter 18 Tangent Lines Table 18. crv1D Out[26] 8Line2D@2. lnsD<D. As in the case of the circle. 2 1 0 -1 -2 -3 -4 -2-1 0 1 2 3 4 5 Tangents to an Ellipse A line that intersects an ellipse in two coincident points is a tangent line. . 4.

The function TangentLines2D[point. −4.94842. 0<. e1. Parabola Equation Tangent with Slope m y 2 = 4f x y = mx + f /m x2 = 4f y y = mx − f m2 (y − k)2 = 4f (x − h) y − k = m(x − h) + f /m 2 y − k = m(x − h) + f m2 (x − h) = 4f (y − k) Example. lns = TangentLines2D@p1.3 Lines Tangent to Standard Conics 275 Table 18. 1. Find the lines tangent to the ellipse (x − 1)2 + y2 = 1 9 rotated 45◦ counter-clockwise about its center point and passing through the point (4. Solution. −1) and plot. 3.48728. 11. Line2D@−2. −0. e1 = Ellipse2D@81. e1D êê N Out[28] 8Line2D@1. e1D&.2: Tangents to a parabola with slope m.0107D< In[29]: Sketch2D@8p1. Map@Point2D@#.782995. 45 DegreeD êê N. 6 4 2 0 -2 -4 -4 -2 0 2 4 . lnsD<D. lns. curve] will return the tangent point of the line with respect to the curve. In[28]: p1 = Point2D@84. curve] returns a list of lines through the point tangent to the curve. −1<D.18. Point2D[line. −9.19166.25392D.

y1 ) Ellipse Equation 2 x a2 (x − h)2 a2 x2 b2 (x − h)2 b2 2 y =1 b2 (y − k)2 + =1 b2 y2 + 2 =1 a (y − k)2 + =1 a2 + xx1 a2 (x − h)(x1 − h) a2 xx1 b2 (x − h)(x1 − h) b2 yy1 =1 b2 (y − k)(y − k1 ) + =1 b2 yy1 + 2 =1 a (y − k)(y − k1 ) + =1 a2 + Table 18.276 Chapter 18 Tangent Lines Table 18.4: Tangents to an ellipse with slope m.3: Tangents to an ellipse at a point. Tangent at P1 (x1 . Ellipse Equation 2 x a2 (x − h)2 a2 x2 b2 (x − h)2 b2 2 y =1 b2 (y − k)2 + =1 b2 y2 + 2 =1 a (y − k)2 + =1 a2 + Tangent with Slope m y = mx ± √ a2 m 2 + b 2 y − k = m(x − h) ± y = mx ± √ √ a2 m 2 + b 2 b 2 m 2 + a2 y − k = m(x − h) ± √ b 2 m 2 + a2 .

h1. lns = TangentLines2D@p1. the tangents are real for a particular hyperbola. 30 DegreeD êê N. curve] returns a list of lines through the point tangent to the curve.38369.2738. 3. In the formulas a is the length of the semi-transverse axis of the hyperbola and b is the length of the semi-conjugate axis. Line2D@1.6 provides the formulas for tangents to a hyperbola in standard form with a given slope m. 0<D. Example. y1 ). 0D< In[31]: Sketch2D@8p1. for a given slope. Table 18. h1D&. Note that for real tangents with slope m the quantity under the radical must be positive. If. 8.5 -10 -5 0 5 10 . 7. Solution. 0) and plot. Find the lines tangent to the hyperbola (y + 1)2 (x − 1)2 − =1 9 4 rotated 30◦ counter-clockwise about its center point passing through the point (0.04481. then the tangents are complex for the conjugate hyperbola.5 -5 -7. 2. coincident with an asymptote. Map@Point2D@#. The function TangentLines2D[point. Point2D[line. −1.8453. −1<. For the hyperbola there will be two tangent lines (real and distinct. or complex) with a given slope.3 Lines Tangent to Standard Conics 277 Tangents to a Hyperbola A line that intersects a hyperbola in two coincident points is a tangent line.5 provides formulas for the line tangent to a hyperbola in standard form at a point P1 (x1 . lns. h1D êê N Out[30] 8Line2D@5.18. In[30]: p1 = Point2D@80. CurveLength2D −> 15D. curve] will return the tangent point of the line with respect to the curve. Table 18.5 5 2. 0D. h1 = Hyperbola2D@81. lnsD<.5 0 -2.

278 Chapter 18 Tangent Lines Table 18.5: Tangents to a hyperbola at a point. Hyperbola Equation 2 2 y x − 2 =1 2 a b (y − k)2 (x − h)2 − =1 a2 b2 x2 y2 − 2 + 2 =1 a b (x − h)2 (y − k)2 − + =1 a2 b2 Tangent with Slope m y = mx ± √ a2 m 2 − b 2 y − k = m(x − h) ± y = mx ± √ a2 m 2 − b 2 √ b 2 − a2 m 2 y − k = m(x − h) ± √ b 2 − a2 m 2 .6: Tangents to a hyperbola with slope m. Tangent at P1 (x1 . y1 ) Hyperbola Equation 2 2 y x − 2 =1 a2 b (y − k)2 (x − h)2 − =1 a2 b2 x2 y2 − 2 + 2 =1 a b (x − h)2 (y − k)2 − + =1 a2 b2 yy1 xx1 − 2 =1 a2 b (x − h)(x1 − h) (y − k)(y − k1 ) − =1 a2 b2 xx1 yy1 − 2 + 2 =1 a b (x − h)(x1 − h) (y − k)(y − k1 ) − + =1 a2 b2 Table 18.

7<<D. curve. 6<. 4. Line2DA−2. 4 I−1 − 2 ME. PlotRange −> 88−8. The Descarta2D function TangentLines2D[line. Perpendicular2DD< è!!!!! è!!!!! 17 E. 2. Line2DA1. −3 − 2 In[33]: Sketch2D@8l1. 1.3 Lines Tangent to Standard Conics 279 Parallel and Perpendicular Tangents Using the equations from the tables in the previous sections in the columns labeled Tangent with Slope m. e1. −3 + 2 17 E=. Solution. 2. e1. Parallel2D] constructs a list of lines parallel to the given line and tangent to the curve. Perpendicular2D] returns a list of lines perpendicular to the given line and tangent to the curve. Example. TangentLines2D@l1. Parallel2DD. e1 = Ellipse2D@8−1. 6 4 2 0 -2 -4 -6 -4 -2 0 2 4 6 . Find the lines parallel and perpendicular to the line x + 2y − 2 = 0 and tangent to the ellipse (y − 2)2 (x + 1)2 + =1 4 16 and plot. 4 I−1 + 2 ME== Out[32] 99Line2DA1. lns<. 8−5. the function TangentLines2D[line.18. curve. 2<. we can easily construct lines parallel or perpendicular to a given line and tangent to a given second-degree curve. lns = 8TangentLines2D@l1. e1. 2. 1. 2. è!!! è!!! 9Line2DA−2. −2D. Pi ê 2D. In[32]: l1 = Line2D@1.

. . . . . . . . lnquad. . lntancir. . . . . . . . . . . . . . . . .nb y r1 r2 x d The tangents to each of two circles from the center of the other are drawn as shown in the figure. . . . . . . . . . . . . eyeball. . . . . . . . . . . y1 ) on the quadratic whose equation is Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 is given by k1 x − k2 y − k1 x1 + k2 y1 = 0 where k1 = Bx1 + 2Cy1 + E and k2 = 2Ax1 + By1 + D. . . . . . pbslp. . . . . . . . . . . . . . . . —– Tangent to a Parabola with a Given Slope.nb Show that if L1 and L2 are two lines tangent to a parabola that intersect on the directrix of the parabola. . . . . . . . . Prove that the chords illustrated are equal in length. . . . . . . . . . . . . . . . then L1 and L2 are perpendicular to each other. . . . . . . . . . . . . . . . . —– Eyeball Theorem. . . . . . . . . . —– . . . . . .280 18. . . . —– Perpendicular Tangents to a Parabola. . . . . . . . . . . .nb Show that the line tangent to the parabola y 2 = 4px with slope m is y = mx + p/m. . . . . . . . . . . . .4 Chapter 18 Tangent Lines Explorations Line Tangent to a Circle. . . . . . . . . . . . . . . . . . .nb Show that the normal line passing through the point (x1 . .nb √ Show that the line y = m(x − a) + a 1 + m2 is tangent to the circle x2 + y 2 = 2ax for all values of m. . . . . . . . . . . . . . . . . . . pbtnlns. . . . . . . . . . . . . . . . . . . . . . —– Line Normal to a Quadratic. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . Use the points P to find the minimum distance from P0 to Q. . . h− Ah + Bk + C Ah + Bk + C —– Monge’s Theorem. . —– Tangent to a Hyperbola with Given Slope.k − . —– Tangency Point on Circle. . show that the three intersection points of the three tangent pairs lie on a straight line. . . . . . . . . . . . . . . . . . . . . . . . . . .nb Show that if a line Ax + By + C = 0 is tangent to a circle (x − h)2 + (y − k)2 = r2 then the coordinates of the point of tangency are   Br2 Ar2 . . . y) on Q such that the line P P0 is perpendicular to Q at P . .nb 2 2 2 2 Show that √ the lines tangent to the ellipse x /a + y /b = 1 with slope m are given by 2 2 2 y = mx ± a m + b . . . . . . . . . —– . .4 Explorations 281 Tangent to an Ellipse with Given Slope. . . . . . . . . . . . . . . . hypslp. . . . . . . . . . . . . .nb Given a point P0 (x0 . . . .18. find point(s) P (x. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . monge. . . . . . . lntancon. . . . —– Line Tangent to a Conic. . . . . . . . . . . . . . . . . . . . . . .nb Show that the relationship between the coefficients of a line px + qy + r = 0 tangent to the conic Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 is given by (4CF − E 2 )p2 + (4AF − D2 )q 2 + (4AC − B 2 )r2 + 2(BD − 2AE)qr + 2(BE − 2CD)pr + 2(DE − 2BF )pq = 0. . . y0 ) and a quadratic Q. . . ellslp. . . tancirpt. . . . . . . . . . . . . . . . . .nb Given three circles and the external tangent lines of the circles taken in pairs. Such a line is called a normal to the quadratic. . . . . . . . . . —– Normals and Minimum Distance. . . . . . . . normal. . . . . Assume that P0 and Q are defined numerically. . . . . . . . . . . . . . . . . . .nb Show that √ the lines tangent to the hyperbola x2 /a2 − y 2 /b2 = 1 with slope m are given by y = mx ± a2 m2 − b2 . . . . . . . . . . . . . . . . . . . . . . . . . . .

.

therefore. line or circle. By specifying a combination of conditions so that the degrees of freedom add up to three. [6] or [7]. point] returns a list of circles tangent to a circle with a given center point. Example. is said to have three degrees of freedom (DOF). we can then solve three simultaneous equations in three unknowns (h. 19.Chapter 19 Tangent Circles In our study of circles we noted that the equation of a circle (x − h)2 + (y − k)2 = r2 has three parameters. Solving these three equations in three unknowns produces the values for the parameters h. The function TangentCircles2D[{circle}. Some common conditions and the corresponding equations that establish the condition are shown in Table 19. A circle. k and r. satisfies the equation of the circle) will be said to be tangent to the circle. we select equations as follows from Table 19. h. Center Point To construct a circle tangent to an object (a point. k and r) and determine the (possibly empty) set of circles that satisfy the conditions. For economy of expression in the following sections.1.1.e. we select the appropriate equation from cases [5]. Construct the circle(s) tangent to the circle x2 + y 2 = 4 with center point (−1. line or circle) with a given center point. Solution. These degrees of freedom allow us to construct a circle so that it meets three conditions. that may be varied independently. to establish the condition that a circle have a given center point we select the two equations from case [1]. To establish the condition that a circle be tangent to a point. 0) and plot. k and r of the circles which satisfy the stated conditions. 283 .1 Tangent Object. we will use the convention that a point which is on a circle (i.

1: Circle tangency equations. Case Condition Equation(s) DOF [1] Fixed radius r = r1 1 [2] Fixed center point h = x1 and k = y1 2 A1 h + B1 k + C1 = 0 1 (h − h1 )2 + (k − k1 )2 = r12 1 r1 (x1 . y1 ) [3] Center on line A1 x + B1 y + C1 = 0 [4] Center on circle 2 2 (x − h1 ) + (y − k1 ) = r12 [5] Through a point (x1 .284 Chapter 19 Tangent Circles Table 19. y1 ) (x1 − h)2 + (y1 − k)2 = r2 1 [6] Tangent to a line A1 x + B1 y + C1 = 0 (A21 + B12 )r2 = (A1 h + B1 k + C1 )2 1 [7] Tangent to a circle (D − (r1 − r)2 )× 1 2 2 (x − h1 ) + (y − k1 ) = r12 2 (D − (r1 + r) ) = 0. where D = (h1 − h)2 + (k1 − k)2 .

Radius 285 In[1]: cirs = TangentCircles2D@8c1 = Circle2D@80. Radius To construct a circle tangent to an object (a point. cirs<D. r] returns a list of circles tangent to a given circle. 3D< In[2]: Sketch2D@8p1.1. Solution. The function TangentCircles2D[{circle}. line or circle. to establish the condition that the center of the circle be on a given line or circle we select the appropriate equation from cases [3] or [4]. Solving these three equations in three unknowns produces the values for the parameters h. we select the appropriate equation from cases [5]. 0<. point] is the general function that returns a list of circles tangent to an object (a point. 0<. 19. k and r of the circles which satisfy the stated conditions. 1D. center on the line x − 2y + 1 = 0 and with radius 1 and plot. p1 = Point2D@8−1. line or circle) with a given center point. Example. To establish the condition that a circle be tangent to a point. line and circle arguments indicates that a point. Construct the circle(s) tangent to the circle x2 + y 2 = 4. 0<. Center on Object. 0<DD Out[1] 8Circle2D@8−1. with center on a line. Circle2D@8−1. [6] or [7].2 Tangent Object. The vertical bar syntax separating the point. we select equations as follows from Table 19. Center on Object. TangentCircles2D[{pt | ln | cir}. line or circle may be specified. 3 2 1 0 -1 -2 -3 -4 -3 -2 -1 0 1 2 Descarta2D Hint. c1. with a given radius. . with a given radius. to establish the condition that the circle have a given radius we select the equation from case [1]. 2D<.19.2 Tangent Object. line. line or circle) with center point on an object (a line or circle).

1E. 1D Out[3] 9Circle2D@8−1. 5 5 5 5 1 2 è!!!!! è!!!!! Circle2DA9 €€€€€ I−1 + 4 11 M. line or circle. 0<. cir}. [6] or [7]—this produces two equations (one for each tangent object). 1D. we select the appropriate equation from cases [5]. Circle2DA9 €€€€€ I−1 − 4 11 M. with a given radius. 1D. line or circle) with center on a line or circle. 3 4 1 2 è!!!!! è!!!!! Circle2DA9 €€€€€ . l1 = Line2D@1. 0<. €€€€€ I1 − 11 M=. Solving these three equations in three unknowns produces the values for the parameters h. €€€€€ I1 + 11 M=. Example. lines or circles) with center point on an object (a line or circle).1. with center point on the line x − 2y + 1 = 0 and plot. 1E= 5 5 In[4]: Sketch2D@8l1. r] is the generalized function that returns a list of circles tangent to an object (a point.286 Chapter 19 Tangent Circles In[3]: cirs = TangentCircles2D@8c1 = Circle2D@80. . k and r of the circles which satisfy the stated conditions. line] returns a list of circles tangent to two circles. −2. Center on Object To construct a circle tangent to two objects (points. €€€€€ =. with center point on a given line.3 Two Tangent Objects. ln | cir. TangentCircles2D[{pt | ln | cir}. Solution. to establish the condition that the center be on a line or circle we select the appropriate equation from cases [3] or [4]. 2 1 0 -1 -2 -4 -2 0 2 4 Descarta2D Hint. we select equations as follows from Table 19. 1E. The function TangentCircles2D[{cir. Construct the circle(s) tangent to the two circles (x + 2)2 + y 2 = 1 and (x − 2)2 + y 2 = 1. r. cirs<D. 19. 2D<. To establish the condition that a circle be tangent to a point. c1.

lines or circles) with a given radius. 0<. c2 = Circle2D@82. we select equations as follows from Table 19. Radius 287 In[5]: cirs = TangentCircles2D@8c1 = Circle2D@8−2. Circle2DA9 €€€€€€€€€ . ln | cir] is the general function that returns a list of circles tangent to two objects (points. €€€€€€€€€ =. Circle2DA90.4 Two Tangent Objects. −2. c2.1. 0<.19. lines or circles) with center point on a line or circle. circle}. pt | ln | cir}. [6] or [7]—this produces two equations (one for each tangent object). k and r of the circles which satisfy the stated conditions. line or circle. €€€€€ =. €€€€€ I2 + 17 ME. r] returns a list of circles tangent to two circles. Solution. 1 1 13 12 26 è!!!!! Circle2DA90. TangentCircles2D[{pt | ln | cir. 3 2 1 0 -1 -2 -4 -2 0 2 4 Descarta2D Hint. 1D<. €€€€€€€€€ E= 2 2 11 11 11 In[6]: Sketch2D@8l1. Radius To construct a circle tangent to two objects (points. To establish the condition that a circle be tangent to a point. Solving these three equations in three unknowns produces the values for the parameters h. cirs<D. €€€€€ I−2 + è!!!!! 17 ME. with a radius of 1 and plot. to establish the condition that the circle have a given radius we select the equation from case [1]. 19. 1D. with a given radius. Example. c1. Construct the circle(s) tangent to the two circles (x + 2)2 + y 2 = 9 and (x − 2)2 + y 2 = 9. €€€€€ =. we select the appropriate equation from cases [5]. . 1DD 1 2 1 2 Out[5] 9Circle2D@8−1. 2D. l1 = Line2D@1. 0<.4 Two Tangent Objects. The function TangentCircles2D[{circle.

0<. è!!!!! è!!!!! 15 15 3 3 Circle2DA9 €€€€€ . 1D. 19. − €€€€€€€€€€€€€€€ =. Circle2DA9− €€€€€ . we select equations as follows from Table 19. r] is the general function that returns a list of circles tangent to two objects (points. ln}] that returns a list of circles tangent to the three lines. c2 = Circle2D@82. Use the function TangentCircles2D[{ln.1. 2 3 =. x + y − 1 = 0 and y + 1 = 0. . we select the appropriate equation from cases [5]. lines or circles) with a given radius. 1E. 1E. cirs<D. Circle2DA90.5 Three Tangent Objects To construct a circle tangent to three objects (points. [6] or [7]—this produces three equations (one for each tangent object). 4 2 0 -2 -4 -4 -2 0 2 4 Descarta2D Hint. To establish the condition that a circle be tangent to a point. r. pt | ln | cir}. c2. line or circle. 1E. k and r of the circles which satisfy the stated conditions. Construct and plot the circle(s) tangent to the three lines x−y +1 = 0.288 Chapter 19 Tangent Circles In[7]: cirs = TangentCircles2D@8c1 = Circle2D@8−2. Solution. lines or circles). Example. €€€€€€€€€€€€€€€ =. 3D<. ln. 1E= 2 2 2 2 Out[7] 9Circle2DA9− €€€€€ . 1E. Circle2DA90. 1E. −2 3 =. − €€€€€€€€€€€€€€€ =. €€€€€€€€€€€€€€€ =. Solving these three equations in three unknowns produces the values for the parameters h. TangentCircles2D[{pt | ln | cir. 1D è!!!!! è!!!!! 15 15 3 3 2 2 2 2 è!!! è!!! Circle2D@80. Circle2DA9 €€€€€ . 0<. In[8]: Sketch2D@8c1. 3D. 0<.

2E. . 1=. . . . lines or circles).archimed. . . . . Circle2DA90. . . . . 2 + 2 2 E. 5<<D. . . . . 1D. è!!! è!!! Circle2DA9−2 2 . . . Circle2DA92 2 . . . The function TangentCircles2D[{obj1. −1D. 19.6 Explorations 289 In[9]: cirs = TangentCircles2D@8 l1 = Line2D@1. 2E= Out[9] 9Circle2DA90. . . . 8−5. . . . . . . . . . . . −1.19. . l3. . . l2 = Line2D@1. cirs<. . . 1. . . 4 2 0 -2 -4 -4 -2 0 2 4 Descarta2D Hint. .6 Explorations Archimedes’ Circles. . −3 − 2 In[10]: Sketch2D@8l1. . −3 + 2 2 =. l2. . . 1D<D êê Simplify è!!! è!!! è!!! è!!! 2 =. PlotRange −> 88−5. l3 = Line2D@0. −2 + 2 2 E. 1. . . obj3 }] is the general function that returns a list of circles tangent to three objects (points. . . . . 5<.nb y C¢ C¢¢ r3 r1 r2 x . obj2 . . 1=. . .

This formula is a special case of the Descarta2D function TangentCircles2D[{pt | ln | cir}. obj2 }. . This construction is a special case of the Descarta2D function TangentCircles2D[{obj1. . k1 ) and tangent to the circle (x − h2 )2 + (y − k2 )2 = r22 are given by r = |d ± r2 | p where d = (h1 − h2 )2 + (k1 − k2 )2 . . . . (−A1 − B1 . . . .nb Show that the radii of the two circles centered at (h1 . point]. . . .nb Show that the centers (h. Radius. . . . . . . . k) = = = = (A1 − B1 . tancir2. . . . Assume that the two lines are normalized. ln | cir. . . A1 + B1 ). the large semicircle. . . .nb Show that the centers (h. y1 ) with center on the circle x2 + y 2 = 1 and radius r = 1 are given by ! p p y1 4 − d21 y1 x1 4 − d21 x1 ± ∓ . c3 and c1 and c2 are congruent (have equal radii). —– . −A1 − B1 ). . . . . . in an arbelos (shoemaker’s knife. . . Given Center . Prove that the two circles C 0 and C 00 tangent to this line. . . . . tancir3. . . . . . k) = 2 2d1 2 2d1 where d1 = p x21 + y12 . . . . . c1 and c2 . . . . . . . . . . . r] when the two objects are lines. . . . . . This is a special case of the Descarta2D function TangentCircles2D[{pt | ln | cir}. .290 Chapter 19 Tangent Circles Draw the vertical tangent line at the intersection point of the two smaller tangent circles. . Center on Circle. A1 − B1 ) and (−A1 + B1 . see figure). . . . (h. . Radius. . —– Circle Tangent to Two Lines. . . . These circles are known as Archimedes’ Circles. −A1 + B1 ). . (A1 + B1 . A21 + B12 = 1. —– Circle Tangent to Circle. k) of the four circles tangent to the perpendicular lines A1 x + B1 y = 0 and − B1 x + A1 y = 0 with radius r = 1 are given by (h. r] that constructs a list of circles. . . . tancir1. . . . . —– Circle Tangent to Circle. . . . . k) of the two circles passing through the point (x1 .

. . . . . . . . . . . . ln | cir] where the two objects are points. . . . . .19. . . . . .. . . . . This is a special case of TangentCircles2D[{obj1. tancir4. . . Center on Circle. are given by . . .6 Explorations 291 Circle Through Two Points. . .nb Show that the radii of the two circles passing through the points (0. . . . . . . . . . . . . −a) with centers on the circle x2 + y 2 = r22 are both given by q r = a2 + r22 . . . . . . a) and (0. . —– Circle Tangent to Three Lines. . y = 0 and Ax + By + C = 0. . . . . . . obj2 }. . .tancir5. . . . .nb Show that the radii of the four circles tangent to the lines x = 0. . . .

.

.

.

C .

r = .

.

1 ± A± B.

. . . . . . Show that the radius of the second circle is s (a − b)3 . .nb A circle is inscribed in an isosceles triangle with sides a. . . . A second. . . . . . . tncirtri. r=b (a + b)3 Assume that a > b. . This is a special case of the function TangentCircles2D[{obj1. a and 2b in length. . obj2 . . . . . . . . smaller circle is inscribed tangent to the first circle and to the equal sides of the triangle. . . obj3 }] where all three of the objects are lines. . . —– . taking all four combinations of signs and assuming the lines are normalized. —– Circles Tangent to an Isosceles Triangle.

.

The resulting equations are sufficiently complex that obtaining the solutions in symbolic. then the point will satisfy the equation yielding the relationship (20.1) Ax21 + Bx1 y1 + Cy12 + Dx1 + Ey1 + F = 0. ellipses and hyperbolas) that satisfy a set of five conditions. but since we can divide the coefficients by any non-zero constant. without altering the equality obtaining A0 x2 + B 0 xy + C 0 y 2 + D0 x + E 0 y + 1 = 0 a quadratic equation only has five degrees of freedom.1 Constraint Equations As mentioned in previous chapters. so we will illustrate the solution techniques and use the numerical capabilities of Mathematica to compute specific solutions. if the curve represented by the quadratic equation Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 passes through the point P1 (x1 . Thus we may specify five conditions (or constraints) on a quadratic equation. or tangent to a given line.Chapter 20 Tangent Conics The most general quadratic equation in two unknowns Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0 has six coefficients. parabolas. 293 (20. y1 ).2) . say F . In this chapter we will investigate the construction of conic curves (circles. closed form is of no practical value. 20. when the conditions are of two specific types: either passing through a given point. It has also been shown in previous chapters that the line px + qy + r = 0 will be tangent to the curve represented by the quadratic equation if the coefficients satisfy the equation (4CF − E 2 )p2 + (4AF − D2 )q 2 + (4AC − B 2 )r2 + 2(BD − 2AE)qr + 2(BE − 2CD)pr + 2(DE − 2BF )pq = 0.

respectively). −39D. Quadratic2D@−1. The equation Q is called a system or pencil of quadratics.2 Systems of Quadratics In this section we will outline the general technique for finding quadratics that pass through the four points of intersection of two quadratic curves. for any constant k. 0. 0. 0). and this must be satisfied by (−4. is the equation of a quadratic through the points of intersection of Q1 and Q2 . −1D. 6 4 2 0 -2 -4 -6 -5 0 5 10 15 . 0. 6<<D. Example. to be in the pencil (for k = 0 and k = 1. 15<. −2. 0. 1. 0). 0. then Q ≡ Q1 + kQ2 = 0. Solution. 0. −8D. 8−6. Find the quadratic that passes through the intersection of the ellipse x2 + 4y 2 − 10x − 39 = 0 and the hyperbola −x2 + y 2 − 1 = 0 and also passes through the point (−4. Two quadratics intersect in four points (four real. and placing one additional condition on the equation for Q allows us to solve for k and find a specific quadratic in the pencil. PlotRange −> 88−10. two real and two complex. −10. In[1]: Sketch2D@8Quadratic2D@1. The equation of the pencil is sometimes written as Q ≡ (1 − k)Q1 + kQ2 in order to allow the original quadratics. 0<D<. CurveLength2D −> 40. 0. 1.294 Chapter 20 Tangent Conics 20. Hence. 4. If Q1 Q2 ≡ ≡ A1 x2 + B1 xy + C1 y 2 + D1 x + E1 y + F1 = 0 and A2 x2 + B2 xy + C2 y 2 + D2 x + E2 y + F2 = 0 represent the equations of the two quadratics. The equation of the quadratic pencil containing the solutions is (x2 + 4y 2 − 10x − 39) + k(−x2 + y 2 − 1) = 0. solving for k yields k = 1 and the final equation of the conic sought is x2 + 2y − 8 = 0 (a parabola). Q1 and Q2 . Quadratic2D@0. or four complex) since each equation is of the second degree. These techniques will be the basis for subsequent sections wherein we will find quadratics satisfying a variety of conditions. Point2D@8−4.

12. Quadratic2D@1. Find the quadratic tangent to Q ≡ x2 − y 2 − y + 1 = 0 at the points of intersection of Q and L ≡ 3x − 2y − 1 = 0 and passing through the point (−1. −1D. 0<D<D. −1.20.2 Systems of Quadratics 295 Descarta2D Hint. k. 0) into this equation we get k = 1/8. Line2D@3. 0. 12. Solution. then Q + kL2 = 0 is the equation of a quadratic tangent to Q at the intersection points of Q = 0 and L = 0. Point2D@8−1. quad. 4 2 0 -2 -4 -4 -2 0 2 4 . 1D. 0). Pencil2D] returns a quadratic parameterized by the variable k representing the pencil of quadratics passing through two quadratics. −6. −7D. 0. which yields as the equation of the conic sought x2 − 12xy + 12y 2 − 6x + 12y − 7 = 0 (a hyperbola). The equation is of the form (x2 − y 2 − y + 1) + k(3x − 2y − 1)2 = 0. In[2]: Sketch2D@8Quadratic2D@1. We may think of L2 = 0 as a (degenerate) quadratic (two coincident lines) intersecting Q = 0 in two pairs of coincident points each. A Degenerate Case If Q = 0 is the equation of a quadratic and L = 0 is the equation of a straight line. Quadratic2D[quad. −12. Example. −1. Substituting (−1. −2.

P4 and P5 . P3 . L34 .3. Let . • no triple of lines is mutually parallel. satisfying the validity conditions stated in Section 20. ellipses and hyperbolas). P2 .4 Five Points Given five points. parabolas.1: Quadratic through five points. • no triple of points is collinear. • no more than one point is on each line.1. we wish to find the quadratic that passes through all five points.296 Chapter 20 Tangent Conics P4 P5 P3 P1 P2 Figure 20.3 Validity Conditions In the remainder of this chapter we will outline techniques for finding conics that satisfy five conditions. The conditions will be of two types: either passing through a given point. but we will focus our attention on cases that produce proper conics (circles. 20. 20. L13 and L24 passing through the points in pairs as shown in Figure 20. • no pair of lines is coincident. The following assumptions are made with respect to the five points and/or lines: • no pair of points is coincident. or tangent to a given line. P1 . • no triple of lines is concurrent. Consider the lines L12 . Degenerate conics may exist that satisfy configurations of points and lines that violate these restrictions. and • no more than one line passes through each point.

1). by substituting the coordinates of the point P5 into the equation for Q. Applying Equation (20. although the result is quite cumbersome in expanded form.4 Five Points 297 Q1 ≡ L12 L34 be a (degenerate) quadratic (a pair of lines) passing through P1 . A determinant can be used to represent the resulting quadratic in a more convenient and simplified form and is given by . The equation Q ≡ Q1 + kQ2 = 0 will then represent the pencil of quadratics parameterized by the variable k passing through the four points.20. we can solve this linear equation for the value of k. thereby yielding the specific quadratic in the pencil of quadratics that passes through all five points. Mathematica can be used to solve for k and form the symbolic equation for Q. Similarly. let Q2 ≡ L13 L24 = 0 be a second quadratic passing through the same four points. P3 and P4 . P2 .

.

.

x2 xy y 2 x y 1 .

.

.

.

.

2 .

x1 x1 y1 y12 x1 y1 1 .

x2 x y y 2 x y 1

2 2
2
2

2
2
Q=

2

.

x3 x3 y3 y32 x3 y3 1

x2 x y y 2 x y 1

4 4
4
4

4
4

.

2 .

x5 x5 y5 y52 x5 y5 1 .

pt. −1<D<. The conic can be determined directly from the result of the previous example using the function Loci2D[quad]. 0). p4 = Point2D@8−3. 1). pt. p5 = Point2D@80. Plot the points and the conic curve. The function Quadratic2D[pt. pt. (−3. −108. 0. In[3]: pts = 8p1 = Point2D@83. 0) and (0. p4. Example. p3 = Point2D@80. −324D Example. 1<D. Solution. pt. pt}] that constructs a list containing the conic directly from the five points. pt. (0. Find the conic represented by the quadratic found in the previous example. (3. 0. 1). p2 = Point2D@83. p5D Out[3] Quadratic2D@36. p3. 0<D. pt] returns the quadratic passing through the five points. Solution. Descarta2D also provides the function TangentConics2D[{pt. −1). 324. pt. q1 = Quadratic2D@p1. Find the quadratic passing through the five points (3. 0<D. . p2. 1<D.

P3 and P4 and line L5 as shown in Figure 20. P2 . 0<.179385D<< In[5]: Sketch2D@8pts.179385D<. this function is equivalent to Quadratic2D[pt. 0. We now apply the condition that line L5 is tangent to Q by using Equation (20.51606. To find the equation of the quadratic passing through the four points and tangent to the line. Points Not on a Tangent Line Assume that points P1 .2 satisfy the validity conditions stated in Section 20. the second constructs the quadratic or conic when one of the given points does lie on the tangent line. TangentQuadratics2D[{pt.5 -1 -3 -2 -1 0 1 2 3 Descarta2D Hint. we form a pencil of quadratics passing through the four points parameterized by the variable k that is given by Q ≡ L12 L34 + kL13 L24 = 0. Solving this equation yields two values for k that can be substituted into the equation for Q.3.3 and that none of the four points lie on L5 . pt. crv1 = TangentConics2D@ptsD< êê N Out[4] 88Ellipse2D@80. Except for the fact the TangentQuadratics2D checks for the validity conditions stated in Section 20.985223. 3. 3. 0<. 20. . crv1<D. pt}] constructs a list containing the single quadratic passing through five points. 0. pt. One Tangent Line In this section we will consider the construction of quadratics and conics passing through four points and tangent to a line. 1 0. giving two quadratics satisfying the stated conditions. pt.51606. 8Ellipse2D@80. 0. 0. pt. Two cases are distinguished: the first constructs the quadratic or conic when none of the given points lie on the tangent line.5 Four Points. pt.985223. pt.5 0 -0.2) resulting in a quadratic equation in the variable k. pt].298 Chapter 20 Tangent Conics In[4]: 8Loci2D@q1D.

16 J1 + €€€€€ I23 − 385 MNE= 8 8 Out[6] 9Quadratic2DA €€€€€ I−23 − In[7]: crvs = TangentConics2D@objsD êê N Out[7] 8Ellipse2D@80. −1) and (2. 4.5708D. Point2D@8−2. TangentQuadratics2D@objsD 1 1 è!!!!!!!! è!!!!!!!! è!!!!!!!! 385 M. 0.5 Four Points. 0. 0. 2. 1). no points on the line. Ellipse2D@80. pt.2: Four points. In[6]: objs = 8Point2D@82. Both functions allow the points and line to be listed in any order. (−2. Example. ln}] constructs a list of quadratics passing through the four points and tangent to the line. −1<D. . Find the quadratics passing through the points (2. −1<D. 2 8 1 1 è!!!!!!!! è!!!!!!!! 0. 0.67034. Solution. −12D<.20. One Tangent Line 299 P2 P3 L5 P1 P4 Figure 20. −2 I−23 − 385 M − 16 J1 + €€€€€ I23 + 385 MN. Plot the conic curves associated with the quadratics. Line2D@3. Quadratic2DA €€€€€ I−23 + 385 M. 1. (−2. 0. ln}] constructs a list of conic curves passing through the four points and tangent to the line. Point2D@82. The Descarta2D function TangentQuadratics2D[{pt. pt. TangentConics2D[{pt. pt.19261. 8 2 1 1 è!!!!!!!! è!!!!!!!! è!!!!!!!! −2 I−23 + 385 M − 16 J1 + €€€€€ I23 − 385 MN. 1. 0<. pt. 1<D. −1) and tangent to the line 3x+4y−12 = 0. 1<D. 0<. 3. pt. 2. 0D< In[8]: Sketch2D@8objs. pt.17963. one line. crvs<D. 1).51549. 16 J1 + €€€€€ I23 + 385 MNE. Point2D@8−2.

Since the desired quadratic is tangent to L1 at P1 . We now form the pencil of quadratics parameterized by the variable k and given by Q ≡ L12 L13 + kL1 L23 = 0. Consider the points P1 . (0. one line. must satisfy the equation of the quadratic.3: Four points.300 Chapter 20 Tangent Conics P4 P3 L1 P2 P1 Figure 20. and by applying Equation (20. 5 4 3 2 1 0 -1 -2 -2 0 2 4 One Point on Tangent Line We now examine the case when one of the four points is on the tangent line. where the point P1 is on L1 . 0) and (0. we can consider P1 to be a pair of coincident intersection points of the pencil of quadratics passing through the four points P1 . Find the conic curve passing through the points (2. Example. 1). P2 and P3 (P1 is counted as two coincident intersection points). −1) and tangent to the line y = 1.1) we generate a linear equation in the variable k that can be solved yielding the single quadratic equation satisfying the stated conditions. one point on the line.3 satisfying the validity conditions stated in Section 20. The coordinates of the remaining point. P2 . (−2. P4 . .3. P3 and P4 and the line L1 as shown in Figure 20. 0).

4. P2 and P3 and two lines L4 and L5 satisfying the validity conditions stated in Section 20.3. Points Not on Tangent Lines Consider three points P1 . The function TangentQuadratics2D is also available in all these cases and will return a list of quadratics instead of a list of conic curves. The points and line may be listed in any order. Point2D@8−2. Two Tangent Lines We now consider the construction of a conic passing through three points and tangent to two lines. We also assume that none of the points are on either line as shown in Figure 20. −1D<D Out[9] 8Ellipse2D@80.6 Three Points. Line2D@0. 1<D. pt.20. 1. The line L45 passing through the points of tangency between lines L4 and L5 and the desired conic curve can be written in the form L45 ≡ ax + by − 1 = 0 . Point2D@80.5. and. 0<. 1.5 -1 -1. Point2D@80. ln}] returns a list of conic curves passing through four points and tangent to a line.5 1 0. two points lie on two of the tangent lines. 8−1.5 -2 -1 0 1 2 3 Descarta2D Hint. −1<D. The function TangentConics2D[{pt. pt. 3<. 1. pt.5<<D. 20. Two Tangent Lines 301 Solution. 0<D. PlotRange −> 88−3. In[9]: crv = TangentConics2D@ objs = 8Point2D@82.5 0 -0. 1. 0<D. 2. the second constructs the conic when one of the given points lies on one of the tangent lines. crv<. Three cases need to be considered: the first constructs the conic when none of the given points lie on either of the tangent lines.6 Three Points. 0D< In[10]: Sketch2D@8objs. In the remaining sections of this chapter we will use the function TangentConics2D to find the tangent curves satisfying a variety of conditions. finally.

if we translate all five of the original objects so that point P1 is at the origin.302 Chapter 20 Tangent Conics P1 L45 L4 P2 L5 P3 Figure 20. collinear points. . which clearly violates the validity conditions. we can write the system of equations L4 L5 L4 L5 L4 L5 [P1 ] = 2 [P2 ] = 2 [P3 ] 2 L45 L45 L45 since all of these expressions must equal k. The point P1 is clearly not on L45 because that would imply that the conic passes through three distinct. Consider the pencil of quadratics parameterized by the variable k and represented by the equation Q ≡ L4 L5 − kL245 = 0. Using the expression f [Pn ] to indicate the expression f evaluated at the point Pn . y) on the desired quadratic. we can guarantee that L45 does not pass through the origin. a and b. Rewriting these equations as a system of two equations and cross-multiplying yields two quadratic equations in two unknowns. We now proceed with L45 ≡ ax + by − 1 = 0. P2 and P3 must all produce the same value for k. In particular. Of course we need to perform the inverse translation on the resulting conic curves to produce the solution for the geometry in its original position. a line that does not pass through the origin. no points on the lines. L245 The right side of this equation is an expression in x and y involving the unknowns a and b.4: Three points. (L4 [P1 ])(L5 [P1 ])(L245 [P2 ]) (L4 [P2 ])(L5 [P2 ])(L245 [P1 ]) = (L4 [P2 ])(L5 [P2 ])(L245 [P1 ]) = (L4 [P1 ])(L5 [P1 ])(L245 [P2 ]). The expression must produce the same value for k for any point (x. two lines. points P1 . Solving this equation for k yields k= L1 L2 . Therefore. assuming we can guarantee that L45 does not pass through the origin.

−1 ê Sqrt@2D<D. Two Tangent Lines 303 Solving these equations for a and b yields four pairs of solutions which can be substituted into k= L1 L2 [P1 ] L245 producing four quadratics Q satisfying the stated conditions. 0. ln}] returns a list of conic curves passing through three points and tangent to two lines. 0. 2. (1/ 2.135729. Point2D@80.785398D. crvs = TangentConics2D@objsD êê N Out[11] 8Circle2D@80. 2 1 0 -1 -2 -3 -4 -1 0 1 2 3 4 2 1 0 -1 -2 -3 -4 -1 0 1 2 3 4 . The function TangentConics2D[{pt. Solution. 0. 2. #<. 1. Ellipse2D@80. (0.262711. 2. crvsD. Line2D@0.135729<. 1D<. 1.259. 1. −0. pt. −0. Find the conics passing through (1.600884.32236<. 2<<D&. 0). −1/ 2) and tangent to the lines x = 1 and y = −1. PlotRange −> 88−2.6 Three Points. Ellipse2D@81. −1.20. Point2D@81 ê Sqrt@2D. 0<D. ln. pt. −1<D.262711. In[11]: objs = 8Point2D@81.32236. 0. 8−4. 0. −1).57181.600884<. The resulting quadratics may be translated back to the original position of the defining objects by translating the origin back to P1 .D. Line2D@1.150221. 0. 4<. −1D.446587D< In[12]: Map@Sketch2D@8objs. 0<. The points and lines may be listed in any order.12421D. Ellipse2D@80.57181. √ √ Example.

3. L13 and L23 are the lines passing through points P1 and P2 .304 Chapter 20 Tangent Conics P2 L4 L1 P3 P1 Figure 20. Solving the equation for k gives the two quadratics passing through the points and tangent to the lines. respectively. two lines. We form the pencil of quadratics Q ≡ L1 L23 + kL12 L13 where L12 . P1 and P3 and P2 and P3 . Example. one point on a line. Assume that point P1 is on line L1 and points P2 and P3 are on neither line L1 or L4 as shown in Figure 20.5: Three points. We now apply the tangency condition by using Equation (20. . Also. 1). 0) and (0.5. 2 1 0 -1 -2 -3 -4 -1 0 1 2 3 4 2 1 0 -1 -2 -3 -4 -1 0 1 2 3 4 One Point on Tangent Line We now consider the case where one of the three points is on one of the two tangent lines. −1) and tangent to the lines y = 1 and x − 2y − 3 = 0.2) with Q and line L4 to form a quadratic equation in the variable k. (−3. Find the conic curves passing through the points (0. we assume the points and lines satisfy the validity conditions stated in Section 20.

00402.6: Three points. In[13]: objs = 8Point2D@80.26827<. The function TangentConics2D[{pt. −2. 1 0 -1 -2 -3 -6 -4 -2 0 2 4 Two Points on Tangent Lines Let P1 be a point on line L1 . −3D<.7504.54874. P3 be a point on line L3 . Line2D@0. Point2D@80. 1<D.6 Three Points.8739. pt. −0. crvs<D. Solution. −1<D.530218D. two points on the lines. ln. Point2D@8−3. The points and lines may be listed in any order. ln}] returns a list of conic curves passing through three points and tangent to two lines.00955005<. Line2D@1. 2. −1D. 1. 0. 0<D. two lines.0412054D< In[14]: Sketch2D@8objs.267309. 0. −1. Ellipse2D@8−0. and P2 a point not on either line as shown in Figure 20.20. Two Tangent Lines 305 L3 P2 P3 L13 L1 P1 Figure 20. crvs = TangentConics2D@objsD êê N Out[13] 8Ellipse2D@8−2.32515. 3. pt.6 and assume that these points and lines satisfy the validity conditions . 1. 1.

the coordinates (x2 . Point2D@8−2. 1.37086<.689197. 3D<. and a technique that will allow us to solve tangent conic problems involving more than two tangent lines. 1). 4 3 2 1 0 -1 -4 -2 0 2 4 Notice that a ConicArc2D object is a special case of this construction where the start and end points are the points P1 and P3 and the apex point defines the lines L1 and L3 . 1<D. 2. . Line2D@2. Find the conic curve passing through the points (2. 1D. In[15]: objs = 8Point2D@82. ln.3. crvs = TangentConics2D@objsD êê N Out[15] 8Ellipse2D@80.122489D< In[16]: Sketch2D@8objs. Line2D@1. Example. pt. The points and lines may be listed in any order. 0. Solution. therefore.7 Conics by Reciprocal Polars In this section we will introduce the concept of reciprocal polars. 2) and tangent to the lines x − 3y + 1 = 0 and 2x + y + 3 = 0.463576. The function TangentConics2D[{pt. 0. 20. −3. 1<D.306 Chapter 20 Tangent Conics stated in Section 20. y2 ) must satisfy Q. We now apply Equation (20. (−2.50231. but applying the techniques to solve tangent conic problems is easily grasped. 1. We can solve this linear equation for k and determine the coefficients of the quadratic Q satisfying the stated conditions. We form the pencil of quadratics Q ≡ L1 L3 + kL213 = 0 where L13 is the line passing through points P1 and P3 . crvs<D. Point2D@80. 1) and (0. 2<D. Proofs of all the concepts involved in these techniques are beyond the scope of this book.1) establishing the condition that P2 must be on Q and. pt. ln}] returns a list of conic curves passing through three points and tangent to two lines.

we obtain another figure which is called the polar reciprocal of the former with respect to the auxiliary circle C. The reciprocal of P with respect to C is simply the polar line of P with respect to C. any line tangent to Q will correspond to a point P 0 on Q0 . Furthermore. the point and line are said to correspond to one another. there will be two or fewer lines in its reciprocal. −1) and (1. and any line L0 tangent to Q0 will correspond to a point P on Q (always using C as the auxiliary circle). . The relationship between Q and Q0 is only valid when the auxiliary circle is a unit circle at the origin (x2 + y 2 = 1). If the equation of the quadratic in the reciprocal figure is Q0 ≡ ax2 + bxy + cy 2 + dx + ey + f = 0 then its equation in the original figure is given by Q0 = (4cf − e2 )x2 + (2de − 4bf )xy + (4af − d2 )y 2 + (4cd − 2be)x + (4ae − 2db)y + (4ac − b2 ) = 0. Similarly. It is noteworthy that the center point of the circle has no reciprocal. The reciprocal of L with respect to C is the pole point of L with respect to C. Two Points. thereby producing a new figure of corresponding lines and points. First we apply an arbitrary translation to the objects to insure that none of the points lie at the origin and that none of the lines pass through the origin. let L be a line. four or five lines and passing through a corresponding number of points so the total number of conditions equals five. Finally. Three Tangent Lines Example. C. The validity of this relationship is demonstrated in the exploration recquad. We now take the reciprocal of the points or lines with respect to a unit circle centered at the origin. When a point in one figure and a line in the reciprocal figure are pole and polar with respect to the auxiliary circle. If we have any figure consisting of any number of points and straight lines. with respect to a circle C. We now apply the techniques developed in the previous sections of this chapter to find the quadratics(s) satisfying the conditions imposed by the elements in the reciprocal figure. and we take the polars of those points and the poles of the lines. x + 2y − 3 = 0 and y = −2. An important theorem from the analytic geometry of conics states that taking the reciprocal of all the points of a conic Q with respect to some auxiliary circle C will produce an envelope of lines tangent to another conic Q0 . We use this theorem as follows to find conics tangent to three. and any line passing through the center of the circle has no reciprocal.20. Note that if there are three or more lines in the original figure.7 Conics by Reciprocal Polars 307 Let C be a circle in the plane and P a point.nb. 0) and tangent to the lines 4x − y − 3 = 0. we find the reciprocal of the resulting quadratic with respect to the auxiliary circle yielding the sought-after quadratics in the original figure. Find the conic curves passing through the points (3.

3. if two of the points are on the tangent lines. x = −3 and y = −2. x + 2y − 3 = 0. if the point is on one of the lines. Solution.71297. CurveLength2D −> 20. In[17]: objs = 8Point2D@83. 8<. ln. if one of the points is on one of the lines.99446<.13329. The function TangentConics2D[{pt. 2. 0.77722. If the point is not on any of the lines. ln.811805<. The points and lines may be listed in any order.374464. 1. 2 1 0 -1 -2 -3 -4 0 2 4 6 8 One Point.82987D< In[18]: Sketch2D@8objs. 2.18508. 1) and tangent to the lines 4x − y − 3 = 0.854517<.77469D. 0<D. Ellipse2D@83. ln.04088. Four Tangent Lines Example. Line2D@4. The points and lines may be listed in any order.64793. −3D. Line2D@0.21117D. . Ellipse2D@83. then there is at most one real conic curve. −0. Find the conic curves passing through the point (−1. 2<<D. −0. ln. 2. there are at most four real conic curves.587329D. Line2D@1. 1. PlotRange −> 88−1. 0. −1. −1<D.308 Chapter 20 Tangent Conics Solution. If neither point is on any of the lines. then there will be at most one real conic curve. then there are at most two real conic curves. 0. The function TangentConics2D[{pt. ln. Point2D@81.03133. 8−4. there will be at most two real conic curves. pt.250467. −0. 3. −0. Ellipse2D@82. −3D. crvs = TangentConics2D@objsD êê N Out[17] 8Ellipse2D@81. 2. 2D<. 0.30361. crvs<.577222<. 1. 1. ln}] returns a list of conic curves passing through a point and tangent to four lines.79784. ln}] returns a list of conic curves passing through two points and tangent to three lines.620762.

8−3.88243. −3. 4<. Line2D@1. PlotRange −> 88−4. crvs = TangentConics2D@objsD êê N Out[19] 8Ellipse2D@8−1. −2D. ln. 2. −2D. ln. 0.29656. Line2D@4. Line2D@1. objs<.352906D< In[22]: Sketch2D@8objs. 8−2.20.833333<.14575D.344658<. 1. ln. 2D<. Ellipse2D@8−1. 0. 1. crvs<. 2. 1. 3 2 1 0 -1 -2 -3 -3-2-1 0 1 2 Five Tangent Lines Example. Line2D@2. 0. −0. 0. 0.35291. 2.11191. Line2D@0. 3<<D.770563. crvs = TangentConics2D@objsD êê N Out[21] 8Ellipse2D@80. 2D<. 3D. 3 2 1 0 -1 -2 -3 -2 -1 0 1 2 3 4 . ln}] returns a list of at most one conic curve tangent to five lines.64903. 2. 0.656401D< In[20]: Sketch2D@8crvs.7 Conics by Reciprocal Polars 309 In[19]: objs = 8Point2D@8−1. Line2D@1. Find the conic curve tangent to the five lines x − 2y + 3 = 0. 0. 0. PlotRange −> 88−4. 1<D. y = 2 and x = −2. 3D.5. Line2D@0. −1. 2<. Plot the lines and the conic curve. Line2D@1.602889. The function TangentConics2D[{ln. −2. x = 3. 2. −3D. 2x − 3y − 2 = 0.441105<. −3D.05825. 3<<D. Solution. −3D. 0. In[21]: objs = 8Line2D@1.

. . . . . . . . . . . . . . . . . .nb Given a general quadratic Q ≡ ax2 + bxy + cy 2 + dx + ey + f = 0 show that the reciprocal of Q is the quadratic (4cf − e2 )x2 + (2de − 4bf )xy + (4af − d2 )y 2 + (4cd − 2be)x + (4ae − 2bd)y + (4ac − b2 ) = 0 when the auxiliary conic is C ≡ x2 + y 2 = 1. . . . . . . . . . . . −B1 /C1 ). . . . . a parabola.8 Chapter 20 Tangent Conics Explorations Reciprocals of Points and Lines. . . . . .nb Given a circle C1 ≡ (x − h)2 + (y − k)2 = r2 show that its polar reciprocal in the auxiliary conic x2 + y 2 = 1 is given by the quadratic Q ≡ (r2 − h2 )x2 − 2hkxy + (r2 − k 2 )y 2 + 2hx + 2ky − 1 = 0. . . . .310 20. . if the origin is outside C. . pb4pts. . . .nb Show that the polar reciprocal of A1 x+B1 y +C1 = 0 in the auxiliary conic C ≡ x2 +y 2 = 1 is the point (−A1 /C1 . . . . . . y) with respect to C. −3) by plotting the hyperbola(s) and the four points. . . . . . . . (−1. assuming that the line does not pass through the origin.nb Describe a method for finding the equilateral hyperbola(s) passing through four points. 1). . —– Parabolas Through Four Points. . . . . . . . . Furthermore. . . . . —– Reciprocal of a Quadratic. . . recptln. . . . . . . . . . . . . . . . . . 1). .nb Describe a method for finding the two parabolas passing through four points. . . . . . (−2. . . . show that the line x + y − 1 = 0 is the polar reciprocal of the point (x. −1) and (4. —– Reciprocal of a Circle. . . . . . recquad. show that Q is an ellipse. . . if the origin (0. . . . . . . . . . . . . . . Also. . . . Show that the technique produces the correct results for the points (2. . . . . . . . . . . . . and a hyperbola. . . . . . . (−2. . . . . . . . . . . . . . . . . . . −1) and (4. . −3) by plotting the parabolas and the four points. . . . reccir. . . . . 0) is inside C. . . . . . . . —– . . . if the origin is on C. . . . . . . . . . 1). . . . (−1. . . . . . . . . . . . . . . . Show that the technique produces the correct results for the points (2. . hyp4pts. . . . . . . . —– Equilateral Hyperbolas. . . . . . 1). . . . . . . . . . . . . . . . . .

To make the demonstration realistic. Tˆ10 (−v1 . Referring to Figure 21. Biarcs are used in some graphical computer systems to connect a set of data points with smoothly joined arcs. v1 ) and Tˆ2 (u2 . Tˆ1 and Tˆ2 are called the biarc configuration parameters. suppose we wish to construct a smooth curve between points P1 (x1 . The geometric condition that two circles are tangent can always be expressed as sum or difference of radii = distance between the centers (21.1 Biarc Carrier Circles A biarc is a composite curve consisting of two circular arcs. y1 ) and P2 (x2 .1). We introduce a radius sign constant.Chapter 21 Biarcs In this chapter we will demonstrate some techniques for adding new functions to Descarta2D. The two circles underlying the arc are called the biarc carrier circles. placed end to end with continuity of slope at the join point. 21. u2 ) are unit vectors constructed by rotating tangent vectors Tˆ1 and Tˆ2 90◦ counter-clockwise. C1 and C2 . P1 . The carrier circles may be internally or externally tangent to each other. The mathematics of biarcs is by itself interesting and will serve as a good example of extending the capabilities of Descarta2D. in order to 311 . and the point of tangency that joins the two arcs is called the knot point of the biarc. We take positive values of r1 and r2 to indicate that the center points of the carrier circles.1. u1 ) and Tˆ20 (−v2 .1) according to the kind of contact. which may take on the values ±1. y2 ) such that the tangents to the curve at P1 and P2 are the unit vectors Tˆ1 (u1 . v2 ). external (sum of radii) or internal (difference of radii). are offset in the direction of Tˆ10 and Tˆ20 . P2 . respectively. sr . Suppose we now wish to form an expression for the left-hand side of Equation (21. we will introduce the mathematics for a new type of tangent circle construction called a biarc. It can be shown that the expressions (r1 +r2 )2 and (r1 −r2 )2 represent all cases for the sum (squared) and difference (squared) of the biarc radii for all combinations of positive or negative r1 and r2 for both internally and externally tangent carrier circles.

C1 and C2 . the sum or difference of the radii (squared) equals the distance (squared) between C1 and C2 .2) and (21.3) Combining Equations (21. (21.1). (r1 + sr r2 )2 = r12 + 2sr r1 r2 + s2r r22 = r12 + 2sr r1 r2 + r22 . since Tˆ1 and Tˆ2 are defined as unit vectors.4).4) and using the following substitutions f0 = u1 u2 + v1 v2 f1 f2 = −v1 (x2 − x1 ) + u1 (y2 − y1 ) = −v2 (x2 − x1 ) + u2 (y2 − y1 ) d2 = (x2 − x1 )2 + (y2 − y1 )2 . The carrier circle center points. since after squaring and applying s2r = 1.4) When simplifying Equation (21. the relationship is symmetric. (21. y1 + u1 r1 ) = (x2 − v2 r2 .312 Chapter 21 Biarcs T1 P1 T2 P2 r1 r2 C1 C2 Figure 21. yields (r1 + sr r2 )2 = ((x2 − v2 r2 ) − (x1 − v1 r1 ))2 + ((y2 + u2 r2 ) − (y1 + u1 r1 ))2 . note that the relationships u21 + v12 = 1 and u22 + v22 = 1 can be used.3) as suggested by Equation (21. (21.2) Note that it makes no difference whether we associate sr with r1 or r2 . may be written as C1 C2 = (x1 − v1 r1 . (sum or difference of radii)2 = (r1 + sr r2 )2 .1: Biarc configuration parameters. accommodate internally or externally tangent carrier circles in the same equation. Rearranging Equation (21. y2 + u2 r2 ).

Equation (21.7) In the special case where the tangent vectors are in the same direction. Constants f0 .1 Biarc Carrier Circles 313 produces the equation d2 (21. of the carrier circles. f1 is the (signed) distance from P2 to the line defined by Tˆ1 and P1 . Tˆ1 and Tˆ2 . In this case. 2(κf1 − f2 ) 2(κf1 − f2 ) (21.5) can be solved for the radii.21. In certain configurations only one arc is needed to satisfy the position and tangent constraints. and the quadratic equation degenerates and the solution of the resulting linear equation is r1 = κd2 d2 and r2 = .5) produces the equation κ(sr + f0 )r22 + (κf1 − f2 )r2 = d2 .6) by using the quadratic formula yields p (f2 − κf1 ) ± (f2 − κf1 )2 + 2κd2 (sr + f0 ) r2 = 2κ(sr + f0 ) p (f2 − κf1 ) ± (f2 − κf1 )2 + 2κd2 (sr + f0 ) . as the defining relationship.3) allows us to calculate the corresponding coordinates of the carrier circle centers.6) (21. Note that these defining constants depend only on the relative position of the defining geometry and are independent of the choice of coordinate axes. 2 Solving Equation (21. Substituting r1 = κr2 into Equation (21. Number of Solutions Given a specific pair of points. r1 and r2 . we now consider how many different carrier circle pairs exist for a given radii ratio. f0 is the cosine of the angle between the tangent vectors. r1 and r2 . κ = r1 /r2 .5) 2 which establishes the general relationship between the radii. f2 is the (signed) distance from P1 to the line defined by P2 and Tˆ2 and d2 is the distance (squared) between points P1 and P2 . r1 = 2(sr + f0 ) (21. and applying Equation (21. then Equation (21. the equations will produce centers and radii for two identical circles. Geometrically. r1 r2 (sr + f0 ) + f1 r1 − f2 r2 = Radii Ratio If a relationship between the carrier circle radii. P1 and P2 and tangent vectors.8) we may calculate values for r1 and r2 .7) or (21. f2 and d are referred to as the biarc defining constants. The solutions may be enumerated as follows: . We choose to specify the biarc radii ratio.8) Thus. f1 . is specified. κ. the denominator (sr + f0 ) will equal zero. C1 and C2 . by specifying a biarc radii ratio. κ.

called the knot circles.2. 0) and with radii r1 and r2 . both κ and −κ may produce valid biarcs with a specified radii ratio. we might instead want to specify the position of the knot point.7) or (21. • The quadratic formula yields two different solutions due to the sign preceding the radical sign as shown in Equation (21.314 Chapter 21 Biarcs • Equations (21. Corollary. The following theorem and corollary from elementary geometry (which are stated without proof) will be central to exploring the nature of the knot circles. respectively. .7). 0) and C2 (r2 . By construction the two circles are internally tangent at the origin. The sign indicates the directions the center points C1 and C2 should be offset from P1 and P2 .9) where d2 = (h1 − h2 )2 + (k1 − k2 )2 and R = r12 − r22 . which is the point of tangency between the two carrier circles. as many as 2 × 2 × 2 = 8 unique carrier circle pairs may exist for a given biarc configuration and radii ratio. Pick two arbitrary points P1 and P2 on the circles with coordinates P1 (r1 + r1 cos θ1 . as shown in Figure 21. While it is a simple matter to compute the knot point once we have the two carrier circles. Theorem. Consider two internally tangent carrier circles centered at C1 (r1 . The coordinates of the knot point can be found by intersecting the two circles and taking advantage of the fact that they intersect in a single point yielding x0 = y0 = (h1 + h2 )d2 − (h1 − h2 )R 2d2 2 (k1 + k2 )d − (k1 − k2 )R 2d2 (21. sr . P0 (x0 . Given two fixed points P1 and P2 and a variable point Q. respectively. but must lie on one of two specific circles.8) may produce negative values for r1 or r2 . ±1. r1 sin θ1 ) and P2 (r2 + r2 cos θ2 . Angles at the circumference of a circle subtended by the same arc are equal. 21. • The radius sign constant. r2 sin θ2 ). As a result.2 Knot Point Suppose we wish to compute the coordinates of the knot point. the locus of Q is a circle if 6 P1 QP2 is a constant. We will show in this section that the knot point cannot be selected arbitrarily. y0 ). may take on two different values. Therefore.

21. The slopes of lines OP1 and OP2 .2 Knot Point 315 y p-w w P2 L2 r2 a O P1 r1 q1 C1 q2 C2 x L1 Figure 21. α. m1 and m2 . and. having established this fact.2: Knot point angles. ± 1 + cos(θ2 − θ1 ) 1 2 θ1 1 2 θ2   . between OP1 and OP2 is tan α = = = = m2 − m1 1 + m1 m2   tan 12 θ2 − tan 12 θ1   1 + tan 12 θ1 tan 12 θ2  tan 12 (θ2 − θ1 ) s 1 − cos(θ2 − θ1 ) . are given by m1 = m2 = r1 sin θ1 sin θ1 = = tan r1 + r1 cos θ1 1 + cos θ1 r2 sin θ2 sin θ2 = = tan r2 + r2 cos θ2 1 + cos θ2 and the angle. we will apply the corollary stated above to establish that the knot point must be on one of two circles. We will show that the angle α ≡ 6 P1 OP2 is a constant angle for all such points P1 and P2 when the angle ω is constant.

the circle will become tangent to line L2 at the point labeled P10 (or P100 . we could have increased the radius of the second carrier circle. The three points P1 . Now imagine a circle anchored at P1 . Since α is a function of θ2 − θ1 it must also be a constant. Now applying the corollary. Notice that since ω is a constant. by definition. as shown in Figure 21.3 Knot Circles In the previous section it was established that all the valid knot points for a given biarc configuration must lie on either of two circles. First. r2 . the knot point must be on one of two circles corresponding to the two constant values of α. 21. and increasing in radius from zero. At this value of r1 . from zero and found points P20 and P200 which are on the same two knot circles .316 Chapter 21 Biarcs P¢2 P¢¢1 P1 w r¢ P¢¢2 P¢1 r¢¢ P2 Figure 21. notice that the tangency points P1 and P2 must be on the knot circles because they correspond to the knot point in the trivial cases when r1 = 0 and r2 = 0. r2 will be infinite and the second biarc circle will become a line. P2 . At some value of r1 . and P100 determine the second knot circle.3: Knot circles. tangent to line L1 . for any given biarc configuration. if the circle is on the opposite side of L1 ). θ2 − θ1 is also a constant.3. The angle ω between the two tangent lines L1 and L2 is given by θ2 +  π 2 L2 − 6 L1  − θ1 + π2 6 θ2 − θ1 = ω (or π − ω) = ω (or π − ω) = ω (or π − ω). These two circles can be constructed geometrically by considering the limiting cases of the carrier circle radii. Since the construction is symmetrical. Similar proofs hold for other geometric configurations and also for externally tangent circles. P2 and P10 determine the first knot circle. and P1 . r1 and r2 .

P1 and P2 . H∗2∗L pA : 8xA_. Better implementations would check for special cases and report errors in the input arguments when such errors are detected. Line 4 opens a Module statement that defines two local variables pt1 and pt2. pt2<. V1 and V3 . Line 5 constructs a point at the center of a circle inscribed in the triangle. H∗8∗L Map@Circle2D@Point2D@p1D. y1_<. Knot Circles The first example illustrates a Mathematica function that will return a list of two knot circles given a biarc configuration (tangent points and tangent lines). p1.21. H∗5∗L pt1 = Point2D@t1. pA. pt2<D D. so we will use the facilities available in Descarta2D along with the programming capabilities provided by Mathematica to demonstrate how new functions can be added to Descarta2D. y2_<DD := H∗4∗L Module@8pt1. to the tangency point. are the tangent points. r0 and r00 . and sides V1 V2 and V2 V3 of the triangle are the tangent lines. 21. Using a triangle as an input parameter has the added advantage that many invalid cases are avoided because they would involve invalid triangles. In[1]: H∗1∗L KnotCircles2D@t1 : Triangle2D@p1 : 8x1_. we will ignore special cases and possible error conditions. L1 and L2 . . Using simple trigonometric relationships it can be shown that the radii of the two knot circles. In order to keep the examples simple. H∗9∗L 8pt1. H∗3∗L p2 : 8x2_. Lines 8 and 9 construct two circles from the two tangency points and a third point. pADD. Point2D@p1D.4 Biarc Programming Examples Descarta2D does not provide built-in functions for computing biarcs directly. Line 6 constructs a point offset from the apex point. yA_<. The center points of the knot circles can be constructed by intersecting the perpendicular bisector of P1 P2 with the angle bisectors of lines L1 and L2 . pt1 or pt2.4 Biarc Programming Examples 317 as those defined by P10 and P100 . Inscribed2DD. For simplicity we will use a triangle to define the biarc configuration with the implicit understanding that the first and third vertices of the triangle. #D&. a negative distance defined by p2 and pA. H∗7∗L −Distance2D@p2. are given by r0 = d d  and r00 =  1 2 cos 2 ω 2 sin 12 ω where d is the distance between P1 and P2 and ω is the angle between L1 and L2 . 2 and 3 define a Mathematica function called KnotCircles2D that takes one parameter that is required to pattern match a Descarta2D triangle object. Lines 1. H∗6∗L pt2 = Point2D@Point2D@pAD. Point2D@p2D.

5. 0). However.318 Chapter 21 Biarcs Example. In the KnotCircles2D function whose implementation is shown above. 1<D. Construct the two knot circles associated with the triangle whose vertices are (0. Arc Construction In this section we will implement functions for constructing bulge factor arcs given defining points and tangent vectors.5. First. v2_<D := u1 ∗ v2 − u2 ∗ v1. that computes a vector cross-product in two dimensions. −2. 0<DD. 1) and (3. 3 2 1 0 -1 -1 0 1 2 3 4 Descarta2D Hint. p2. (2. returns a list of two knot circles associated with a triangle. The function KnotCircles2D[triangle].84902D< In[3]: Sketch2D@8p1. The exploration knotin. Solution. These will be used later to construct biarcs.56537D. Circle2D@81. v1_<.08114<. Plot the geometric objects. 1.08114<. p2 = Point2D@82. 0).nb at the end of the chapter shows that this point is actually on the first knot circle. Using this point has the added advantage that it avoids an error condition that would otherwise occur when P1 and P2 are equidistant from the third point of the triangle (an isosceles biarc configuration). defined above. 8u2_. 1. In[2]: t1 = Triangle2D@p1 = Point2D@80. the third point on the second knot circle is constructed following the technique described earlier in the chapter. . Inscribed2DD<D. p3 = Point2D@83. kc = KnotCircles2D@t1D êê N Out[2] 8Circle2D@81. t1. Point2D@t1. 0<D. kc. 2. In[4]: Cross2D@8u1_. p3. the third point of the first knot circle is constructed as the center of the circle inscribed in the triangle. Cross2D. we define a utility function.

Arc2D@p0. Construct the biarc associated with the triangle whose vertices are (0. and a Descarta2D point object defining the knot point (line 4). plus a point associated with the start point indicating the direction of the tangent to the arc at the start point. s = Cross2D@chd. is used twice to actually construct the biarc which is returned as a list of two arcs (lines 5–6). yA_<. Point2D@p1 : 8x1_. y0_<D. Plot the geometric objects. chdD. p1. 1) and (3.nb. The function Arc2D[{point. ptK : Point2D@8xk_. v1D. Example. 0). The next arc construction function is similar to the previous one. yk_<DD := 8Arc2D@8Point2D@p0D. The function Biarc2D takes two arguments.4 Biarc Programming Examples 319 Now we define an arc construction function that takes the arc’s start and end points. s. as input. Arc2D@8Point2D@p1D. except the point indicating the tangent direction is associated with the end point of the arc. a Descarta2D triangle object defining the biarc configuration (lines 1–3). y_<D<. s = Cross2D@v0. y_<D<D := Module@8v1 = p − p1. s ê Hc + Sqrt@c ^ 2 + s ^ 2DLD D.21. The justification for this function is provided in the exploration arcexit. . 8Point2D@p1 : 8x1_. (2. y1_<D. The justification for this function is provided in the exploration arcentry. chd = p1 − p0. 0) and a knot point on the first knot circle at parameter value π/2. chd = p1 − p0. y1_<D. H∗2∗L H∗3∗L H∗4∗L H∗5∗L H∗6∗L pA : 8xA_. s. Point2D@p : 8x_. s ê Hc + Sqrt@c ^ 2 + s ^ 2DLD D. In[6]: Arc2D@Point2D@p0 : 8x0_. chdD. Point2D@pAD<. P0 and P1 . Knot Points Now that we have functions for computing knot circles and constructing arcs involving tangent vectors. c<. Point2D@p : 8x_. it is fairly easy to construct biarcs. ptKD<. y0_<D. Point2D@pAD<. v1D. Consider the following Mathematica function: In[7]: H∗1∗L Biarc2D@t1 : Triangle2D@p0 : 8x0_. c = Dot@chd.nb. ptKD. y1_<DD := Module@8v0 = p − p0. point]. p1 : 8x1_. c = Dot@v0. Arc2D@p0. point}. c<. In[5]: Arc2D@8Point2D@p0 : 8x0_. p1. defined in the previous section. y0_<.

p2 = Point2D@82. pk = Point2D@kc@@1DD@Pi ê 2DDD êê N Out[8] 8Arc2D@81. Arc2D@83. 0<. y0_<. yA_<.2 0 0 0. The Biarc2D function does not check to insure that the knot point provided is a valid knot point. 0. H∗5∗L knotPointParameter_ ? IsScalar2DD := H∗6∗L Module@8kc. the second an integer equal to 1 or 2 specifying which biarc circle the knot point should be on. p3 = Point2D@83.5 2 2. ptK<. point] described above returns a list of two arcs (a biarc) given a triangle that defines the biarc configuration and the knot point. Lines 1–5 define the function arguments.5. 0. Other errors will occur if the knot point coincides with one of the triangle vertices. The function Biarc2D[triangle. 0<.484234<.241083D< In[9]: Sketch2D@8p1. 0<D.4 0.8 0. 81.5 1 1. ptKD D. bi1<D.484234<. 0. H∗8∗L ptK = Point2D@kc@knotPointParameterDD êê N. 80. pk. . H∗7∗L kc = KnotCircles2D@t1D@@knotCircleNumberDD. t1. bi1 = Biarc2D@t1.. the first being a triangle defining the biarc configuration. H∗9∗L Biarc2D@t1. This Biarc2D function takes three arguments.320 Chapter 21 Biarcs Solution.5 3 Descarta2D Hint. and line 9 computes the biarc. p3. 0<DD. 0. y1_<D.5. line 7 computes the knot circle. It would be convenient if the biarc construction function computed the knot point internally as shown in the following Mathematica function: In[10]: H∗1∗L Biarc2D@t1 : Triangle2D@p0 : 8x0_.075838D. It will erroneously return two arcs that are not tangent to each other if it is called with a point not on one of the knot circles. p2. and the third an angle (in radians) specifying the parameter location on the knot circle for the desired knot point. kc = KnotCircles2D@t1D êê N. In[8]: t1 = Triangle2D@p1 = Point2D@80. 1<D. H∗4∗L knotCircleNumber_Integer. 1 0.6 0. H∗3∗L p1 : 8x1_. H∗2∗L pA : 8xA_. line 8 computes the knot point.

(2. Arc2D@83. d1 : 8u1_. Construct the biarc associated with the triangle whose vertices are (0. H∗6∗L ptA = Point2D@Line2D@L0D. H∗3∗L knotCircleNumber_Integer. 80. 8Point2D@p1D. ptKD. y0_<.484234<. Coordinates2D@ptAD. 0). Point2D@d0D<. 1) and (3. 1. Solution. p2 = Point2D@82.241083D< The Biarc2D functions implemented above are restrictive in the sense that the tangent vectors always point toward the apex point of the triangle and no provision is available to allow either (or both) of the tangent vectors to point away from the apex. y1_<. Point2D@d1D<D<. bi1 = Biarc2D@t1. . 0. These Biarc2D functions are parallel implementations of the previous two. 0<. d0 : 8u0_. In[12]: H∗1∗L Biarc2D@Segment2D@p0 : 8x0_. L1.484234<. knotCircleNumber. The line segments will define a position (the start point of the line segment) and a direction (from the start point towards the end point). kc. 0. Line2D@L1DD.5. In[11]: t1 = Triangle2D@p1 = Point2D@80. H∗2∗L L1 : Segment2D@p1 : 8x1_.21. p3 = Point2D@83. 0. In[13]: H∗1∗L Biarc2D@L0 : Segment2D@p0 : 8x0_. v0_<D. v1_<D. In order to overcome this restriction we will implement a function that takes two line segments to define the biarc configuration. 0<.075838D.5.4 Biarc Programming Examples 321 Example. yk_<DD := 8Arc2D@8Point2D@p0D. knotCircleParameter] as implemented above returns the required biarc. 0<DD. 0) and a knot point on the first knot circle at parameter value π/2. The function Biarc2D[triangle. d0 : 8u0_.. v0_<D. H∗7∗L t1 = Triangle2D@p0. ptK<. H∗9∗L ptK = Point2D@kc@knotCircleParameterDD. H∗4∗L knotCircleParameter_ ? IsScalar2DD := H∗5∗L Module@8ptA. 0. y0_<. Pi ê 2D êê N Out[11] 8Arc2D@81. v1_<D. Arc2D@ptK. except two line segments are used to define the biarc configuration instead of a triangle. H∗2∗L H∗3∗L H∗4∗L H∗5∗L Segment2D@p1 : 8x1_. 81. ptK : Point2D@8xk_. t1. ptKD D. H∗10∗L Biarc2D@L0. p1D. y1_<. d1 : 8u1_. H∗8∗L kc = KnotCircles2D@t1D@@knotCircleNumberDD. 0<D. 1<D.

8Pi ê 6. . Pi ê 2. 4 3 2 1 0 -1 -1 0 1 2 3 4 4 3 2 1 0 -1 -1 0 1 2 3 4 4 3 2 1 0 -1 -1 0 1 2 3 4 Building on these basic Mathematica programs for computing biarcs. we might write a function that attempts to automatically select the knot point based on some minimization criteria. . . Given a biarc configuration defined by the line segments from (0. . ls1. π/2 and 2π/3. . . . . . In[14]: ls0 = Segment2D@80. . bi1 = Map@HBiarc2D@ls0. . . 0<. . . ls1. . For example. or we might attempt to construct biarcs that have no reversal of curvature at the knot point (i. ls1 = Segment2D@83.e. .5 Explorations Incenter on Knot Circle. . . #<D. . . 0) to (4. . . . . . . −2<D êê N.L&. . . . #D êê NL&. 5 Pi ê 6<D. 1. . . . . 21. the carrier circles are internally tangent to each other). −2) construct a set of biarcs whose knot points are on knot circle 1 at parameter values π/3. . piecewise curve consisting of biarcs. 2<D êê N. 84. .nb Show that the incenter of a triangle (the center point of the circle inscribed in the triangle) is on one of the knot circles for the biarc configuration defined by the triangle. 0<. 8−3. . . 2) and from (3. . Another interesting exercise is to devise a strategy for connecting a predefined set of points with a smooth. .322 Chapter 21 Biarcs Example. Use the function Biarc2D whose implementation is provided above. . . . . Solution. 0) to (−3. bi1D. . . knotin. . . . . . In[15]: Map@HSketch2D@8ls0. more elaborate construction functions could be provided. —– . .

Part VI Reference .

.

At the approximation level iterative algorithms are used to converge to an approximation of a value. Analytic. Depending on the complexity of the problem. sizes. which means that it provides a collection of objects (e. etc. Often. Descarta2D takes advantage of these capabilities to provide the following four levels of computation: Symbolic. Descarta2D is an object-oriented application.Chapter 22 Technical Notes This chapter provides an overview of how Descarta2D is implemented using Mathematica. Descarta2D often provides a choice of the level of computation undertaken for a particular geometric investigation. Mathematical functions such as square roots and trigonometric functions are carried without evaluation.1 Computation Levels Mathematica provides support for both symbolic and numerical computations. 325 . angles and coefficients are expressed as variables and general formulas may be derived. lines. 22. Numerical. At the symbolic level. Approximation. At the numerical level numbers and functions are replaced with floating point representations that are approximations carried to any number of decimal places in Mathematica.) and a set of methods that compute on these objects. At the analytic level variables are replaced with exact numerical quantities that are not approximated by floating point numbers. the accuracy is determined by the floating point hardware available in the computer and is sufficient for such computations. points.g. The programs that comprise Descarta2D are organized into a small number of Mathematica packages that specify the behavior of the objects. the tolerance of the approximation can be controlled to approach the floating point precision of the computer hardware or better. Generally.

Following these conventions will avoid most naming conflicts..]. If Descarta2D detects invalid input when constructing an object.326 Chapter 22 Technical Notes Table 22. Mathematica is case-sensitive with respect to the interpretation of symbolic names). arg2 . .. Descarta2D follows the same naming conventions as Mathematica. generally. Functions that return a list of objects are generally plural. but. this chapter provides suggestions for naming Descarta2D objects to encourage consistency and clear understanding when using Descarta2D. Table 22. will always have the form objectName[arg1 . such as Points2D.2 Hyperbola2D Line2D Parabola2D Point2D Quadratic2D Segment2D Triangle2D Names In Mathematica symbolic names containing upper case letters are considered different than names using corresponding lower case letters (i. 22. the first letter is advised to be lower case to prevent conflicts with built-in Mathematica functions and Descarta2D functions.1: Reserved names in Descarta2D (objects). Arc2D Circle2D ConicArc2D Ellipse2D 22.1 is a list of the object names . Descarta2D functions that return a list of objects will generally return an empty list.e. it generally displays an error message and returns the $Failed symbol. TangentLines2D and Foci2D. Functions that return (construct) a Descarta2D object. Mathematica uses the convention that systemdefined names always begin with upper case letters or the dollar sign symbol and recommends that user-defined symbols begin with lower case letters to avoid naming conflicts. In order to prevent conflicts with the names of Descarta2D functions. Each object is represented using a Mathematica expression whose head is the name of the object and whose parameters are the arguments of the expression. instead of the $Failed symbol (indicating that no objects can be constructed). or FocalLength2D). For example. Point2D[point. If more than one word is used (for example. All Descarta2D function names are fully spelled out English words and each name has the ending 2D appended. such as Point2D. Descarta2D symbolic names begin with upper case letters. Descarta2D adheres to several syntactic conventions for consistency and ease of use. then the first letter of each word is upper case.3 Descarta2D Objects In Descarta2D an object is a textual representation of a mathematical concept. user symbolic names may contain upper case or lower case letters. TangentConics2D. point] returns the midpoint of two given points.

a. d. k}. B.22. k}. k}.1: Descarta2D object hierarchy. B. y} Point2D[{x. k}. b. e. F] Segment2D[{x0. θ] Hyperbola2D[{h. θ] Quadratic2D[A. y1 }. y}] Line2D[A. θ] conic Ellipse2D[{h. {x1 . b. {x3 . y0 }. y3 }] Line2D[a. E. b. y1 }. {x1 . yA }. B] ConicArc2D[{x0. y2 }. c] ax + by + c Quadratic2D[a. C. f. . {xA . {x1 . r] Parabola2D[{h. y0 }. y1 }] Arc2D[{x0. C] Circle2D[{h. a. b.3 Descarta2D Objects object geometry coordinates point curve line circle parabola ellipse hyperbola quadratic curve segment line segment arc conic arc composite triangle polynomial linear quadratic 327 {x. D. f] ax2 + bxy + cy 2 + dx + ey + f Figure 22. c. y1 }. y0 }. ρ] Triangle2D[{x1. {x2 .

328 Chapter 22 Technical Notes y r H C P1 D P0 2H B = ÄÄÄÄÄÄÄÄÄÄÄÄÄÄ DÄ x Figure 22. names typically used to refer to the object. The following sections provide detailed descriptions of each object provided by Descarta2D. so B = 2H/D. The third argument is a positive scalar. . a2. (A1. representing the bulge factor of the arc. . . .). respectively.). H. The hierarchy also includes meta-objects. a description of the object (using a mathematical equation when appropriate) and restrictions on the arguments of the object. The parametric equations of an Arc2D using parameter t are x(t) = h + (x0 − h) cos(βt) − (y0 − k) sin(βt) . but serve to organize the Descarta2D objects. to half the chord length. {x1 . built into Descarta2D. objects that have no implementation. y1 }. B] is the standard representation of an arc in Descarta2D as illustrated in Figure 22. The first and second arguments are the coordinates of the start and end points of the arc. The Line2D and Quadratic2D objects are listed twice in Figure 22. Arc2D Arc2D[{x0.1. . as in Radius2D[arc]. B. . y0 }.2. All objects have the restriction that their arguments cannot involve complex numbers. A2. The arc is traversed counter-clockwise from P0 to P1 . D/2. . Meta-objects are shown in italic font. arc[1] gives the coordinates of the end point and Bulge2D[arc] gives the bulge factor. The objects are organized into a hierarchy as shown in Figure 22. arc[0] gives the coordinates of the start point.1 because they can be interpreted to represent geometry or polynomials. The bulge factor is the ratio of the arc’s height. arc2.) and (arc1. .2: Standard representation of an Arc2D. Each section provides the name of the object. Suggested symbolic names for an Arc2D include the series: (a1. In the argument sequence of a function an arc is shown as arc. . the syntax of the Mathematica expression for the object.

The parametric equations of a Circle2D using parameter θ are x(θ) = y(θ) = h + r cos θ k + r sin θ. Values of t in the range 0 ≤ t ≤ 1 generate coordinates on the complete span of the arc.22. The center of the circle is given as a coordinate list. r] is the standard representation of a circle in Descarta2D as illustrated in Figure 22. yL r CHh.). a Circle2D is shown as circle or cir. k) is the center point of the arc. such as Sketch2D. y0 }. r][θ] returns the coordinates of the point on a circle at parameter . c2. k}. {x1 . The expression Arc2D[{x0. y1 }. as in Radius2D[circle] or Radius2D[cir]. y1 }. Suggested symbolic names for a Circle2D include the series: (c1.) and (cir1. B][t] returns the coordinates of a point on an arc at parameter t. r. Circle2D[{h. . B][{t1 . y0 }. k}. will cause the portion of the arc between parameters t1 and t2 to be plotted. k}. Arc2D[{x0. and the radius is the positive scalar. . . Values of θ in the range 0 ≤ θ < 2π generate coordinates on the complete circumference of the circle. {h. The function Coordinates2D[circle] gives the center point coordinates of a circle and Radius2D[circle] gives the radius. . The equation of the circle is (x − h)2 + (y − k)2 = r2 . and β is the angular span of the arc. t2 }] when used in a plotting command. cir2. . y(t) = k + (x0 − h) sin(βt) + (y0 − k) cos(βt) where (h. Both the center point and the angular span are functions of the defining points and the bulge factor as described in the “Arcs” chapter.). . In the argument sequence of a function. C2.3. r. (C1.3 Descarta2D Objects 329 y PHx. . . kL x Figure 22. . {x1 .3: Standard representation of a Circle2D. Circle2D Circle2D[{h.

The function Coordinates2D[cnarc.). {x1 . . b1 = 2t(1 − t) and b2 = t2 . ConicArc2D[{x0. values in the range 1/2 < ρ < 1 are hyperbolic arcs. and the value 1/2 is a parabolic arc. will cause the arc of the circle between parameters θ1 and θ2 to be plotted. a ConicArc2D is shown as cnarc. {xA . The first and third arguments are the coordinates of the start and end points of the conic arc.) and (cnarc1. ρ. such as Sketch2D.330 Chapter 22 Technical Notes PA h r = ÄÄÄÄÄÄ kÄ k h P0 P1 Figure 22. is a scalar representing the projective discriminant of the conic arc. . as in Rho2D[cnarc]. Values of ρ in the range 0 < ρ < 1/2 are elliptical arcs. respectively. θ2 }] when used in a plotting command.). {xA . . {x1 . Conic Arc ConicArc2D[{x0. ρ] is the standard representation of a conic arc in Descarta2D as illustrated in Figure 22. The parametric equations of a ConicArc2D using parameter t are x(t) = y(t) = b0 (1 − ρ)x0 + b1 ρxA + b2 (1 − ρ)x1 b0 (1 − ρ) + b1 ρ + b2 (1 − ρ) b0 (1 − ρ)y0 + b1 ρyA + b2 (1 − ρ)y1 b0 (1 − ρ) + b1 ρ + b2 (1 − ρ) where b0 = (1 − t)2 . Apex2D] returns the coordinates of the apex point of a conic arc and Rho2D[cnarc] gives the value of ρ. r][θ][{θ1 . ca2. such as Sketch2D. t2 }] when used in a plotting command. . {xA . . yA }. y1 }. ρ][{t1 . Values of t in the range 0 ≤ t ≤ 1 generate coordinates on the complete span of the conic arc. y1 }. y0 }. The fourth argument. . yA }. ρ][t] with t = 0 gives the coordinates of the start point and with t = 1 gives the coordinates of the end point. y1 }. θ. The expression ConicArc2D[{x0. CA2. k}. yA }. Suggested symbolic names for a ConicArc2D include the series: (ca1. y0 }. . {x1 . will cause the portion of the conic arc between parameters t1 and t2 to be plotted. y0 }. The second argument is the coordinates of the apex point of the conic arc (the apex point is the intersection point of the tangent lines at the start and end points).4. (CA1. The expression Circle2D[{h. In an argument sequence. . . cnarc2. .4: Standard representation of a ConicArc2D.

The third argument is a positive scalar. a. Coordinates Coordinates {x.) and (coords1.). θ. The fourth argument. coords2. . y) position in Descarta2D. or in explicit forms such as {h. The second argument is a positive scalar. c2. is the angle of rotation of the ellipse measured from the +x-axis counter-clockwise to the major axis of the ellipse and is normalized to the range 0 ≤ θ < π. a. The first argument. as in Angle2D[ellipse]. b. k}. . representing the length of the semi-major axis. an ellipse is shown as ellipse. a > b. kL a q x Figure 22. a. {h.). k} or {x.22. and the function .3 Descarta2D Objects 331 y b CHh. y} are used to represent an (x. C2. . The underlying equation of the (non-rotated) ellipse is (y − k)2 (x − h)2 + = 1. y}].5. In an argument sequence coordinates are shown as coords such as Point2D[coords]. Ellipse2D Ellipse2D[{h. . is a list of coordinates representing the center of the ellipse. . the length of the semi-major axis must be greater than the length of the semi-minor axis. . . k}. θ] is the standard representation of an ellipse in Descarta2D as illustrated in Figure 22. Suggested symbolic names for coordinates include the series: (c1. The function Coordinates2D[ellipse] returns the center point coordinates of an ellipse. 2 a b2 In an argument sequence. the function SemiMajorAxis2D[ellipse] gives the length of the semi-major axis. y} as in Point2D[{x. b. . representing the length of the semi-minor axis.5: Standard representation of an Ellipse2D. In a valid ellipse. (C1. .

e2. a. . θ][α] returns the coordinates of the point on an ellipse at parameter α. The expression Ellipse2D[{h.332 Chapter 22 Technical Notes y b CHh. a. (E1. Suggested symbolic names for an Ellipse2D include the series: (e1. a. θ. k}. b. The second argument is a positive scalar. b. representing the length of the semi-conjugate axis. b. The parametric equations of a (non-rotated) Ellipse2D using the parameter α are x(α) = h + a cos α y(α) = k + b sin α. . k}.) and (ell1. The first argument. . θ] is the standard representation of a hyperbola in Descarta2D as illustrated in Figure 22. Hyperbola2D Hyperbola2D[{h. and Angle2D[ellipse] gives the angle of rotation. . a. Values of α in the range 0 ≤ α < 2π generate coordinates on the complete circumference of the ellipse. The underlying equation of the (non-rotated) hyperbola . is a list of coordinates representing the center of the hyperbola. θ. Ellipse2D[{h. . E2. SemiMinorAxis2D[ellipse] gives the length of the semi-minor axis.). b. k}. b. The fourth argument. . The third argument is a positive scalar. ell2. representing the length of the semi-transverse axis. is the angle of rotation of the hyperbola measured from the +x-axis counter-clockwise to the transverse axis of the hyperbola and is normalized to the range 0 ≤ θ < π. {h. θ][{α1 .6.6: Standard representation of a Hyperbola2D. . kL q a x Figure 22. . will cause an arc of the ellipse between parameters α1 and α2 to be plotted. . such as Sketch2D. k}. α2 }] when used in a plotting command.).

b= √ and c = √ . B. C][t]. k}. H2. . . Suggested symbolic names for a Hyperbola2D include the series: (h1. the arc will be on the left branch of the (non-rotated) hyperbola.). a= √ A2 . C] is the standard representation of an infinite line Ax + By + C = 0. will cause a segment of the line between parameters t1 and t2 to be plotted. . k}. a. θ][{t1 .). a hyperbola is shown as hyperbola. 2 a b2 In an argument sequence. (H1. t2 }] when used in a plotting command. b. −∞ < t < ∞. The expression Hyperbola2D[{h. b. and Angle2D[hyperbola] gives the angle of rotation. B.22. θ. A or B. Values of t in the range −∞ < t < ∞ generate coordinates on the branch of the hyperbola opening to the right in the non-rotated position. The parametric equations of a (non-rotated) Hyperbola2D using parameter t are x(t) = h + a cosh(st) y(t) = k + b sinh(st) where s = cosh−1 (e) and e is the eccentricity of the hyperbola. 2 2 2 2 +B A +B A + B2 The coordinates of the point on the line nearest the origin will be at parameter t = 0 and other coordinates. . The values t = ±1 generate coordinates at the ends of the focal chord of the hyperbola. if t1 > t2 . . a. . . h2. b. B. t2 }] when used in a plotting command. the function SemiTransverseAxis2D[hyperbola] gives the length of the semi-transverse axis. as in Angle2D[hyperbola]. At least one of the first two coefficients.3 Descarta2D Objects 333 is (y − k)2 (x − h)2 − = 1. must be non-zero. and the function SemiConjugateAxis2D[hyperbola] gives the length of the semi-conjugate axis. hyp2. along the line are given by Line2D[A. . . Hyperbola2D[{h. such as Sketch2D. The expression Line2D[A. parameterized by distance t. C][{t1 . The function Coordinates2D[hyperbola] returns the center point coordinates of a hyperbola. Line2D Line2D[A. the arc will be on the right branch of the (non-rotated) hyperbola. such as Sketch2D. If t1 < t2 . θ][t] returns the coordinates of the point on a hyperbola at parameter t. a. The parametric equations of a line using parameter t are x(t) = ac + bt and y(t) = bc − at where B C A . will cause an arc of the hyperbola between parameters t1 and t2 to be plotted.) and (hyp1.

The function Coordinates2D[parabola] returns the vertex point coordinates of the parabola. FocalLength2D[parabola] gives the focal length of the parabola. .). f. . θ] is the standard representation of a parabola in Descarta2D as illustrated in Figure 22. θ][t] returns the coordinates of the point on a parabola at parameter t. pb2. Values of t in the range −∞ < t < ∞ generate coordinates on the parabola opening to the right in the non-rotated position. f.) and (ln1. ln2. . . {h. The values t = ±1 generate coordinates at the ends of the . representing the focal length of the parabola. k}. . as in Angle2D[line] or Angle2D[ln]. . .) and (pb1. In an argument sequence. The underlying equation of the (non-rotated) parabola is (y − k)2 = 4f (x − h). is the angle of rotation of the parabola measured from the +x-axis counter-clockwise to the axis of the parabola and is normalized to the range 0 ≤ θ < 2π. a parabola is shown as parabola. .7. . Suggested symbolic names for a Line2D include the series: (l1. f . k}. θ. P2. l2. . kL q x Figure 22. L2. The third argument. a Line2D object is shown as line or ln. p2. The parametric equations of a Parabola2D using parameter t are x(t) = h + f t2 and y(t) = k + 2f t.). . Parabola2D Parabola2D[{h. is a list of coordinates representing the vertex of the parabola. . as in Angle2D[parabola]. θ. (P1. . In an argument sequence. The first argument. Parabola2D[{h. The second argument is a positive scalar. . Suggested symbolic names for a Parabola2D include the series: (p1. (L1. and Angle2D[parabola] gives the angle of rotation. .).334 Chapter 22 Technical Notes y f axis F VHh.7: Standard representation of a Parabola2D. . . k}.). .

.). Point2D Point2D[{x. F] is the standard representation of the quadratic Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0.). y}] (which is the same as Point2D[coords]) is the standard representation of a point. a Quadratic2D is shown as quad. such as Sketch2D.).) and (lnseg1.3 Descarta2D Objects 335 focal chord of the parabola. pt2. XCoordinate2D[point] and YCoordinate2D[point] return the x. . . {x1 . will cause an arc of the parabola between parameters t1 and t2 to be plotted. The coordinates {x0 . x(t) Values of t in the range 0 ≤ θ ≤ 1 generate coordinates over the complete length of the line segment. y0 }. respectively. y) coordinates of a point as a coordinate list. D. . of the line segment. as in Point2D[quad]. respectively. l2. q2. . f. . t2 }] when used in a plotting command. . . y) position of the point. a Segment2D is shown as lnseg. as in Angle2D[lnseg]. E. P2.). L2. . B. . . . Suggested symbolic names for a Segment2D include the series: (l1. The parametric equations of a Segment2D using parameter t are = x0 + t(x1 − x0 ) y(t) = y0 + t(y1 − y0 ). Suggested symbolic names for a Point2D include the series: (p1. y0 } and {x1 . Descarta2D provides no parametric representation for a quadratic (the specific conics have parametric representations). y1 } are the start and end coordinates. p2. Q2. y0 }. In an argument sequence.). Coordinates2D[point] returns the (x.). In an argument sequence. as in Coordinates2D[point] and Coordinates2D[pt]. (P1. Quadratic2D Quadratic2D[A. the quadratic will represent a conic curve.) and (pt1. . of a point. . The . . . The expression Parabola2D[{h. k}. C. but certain combinations of coefficients may represent degenerate conics (lines and points) or no locus at all. In general. . Segment2D The form Segment2D[{x0. The parameter value t = 0 generates the coordinates of the start point of the line segment and the value t = 1 generates the end point coordinates. The coordinates define the (x. θ][{t1 . In an argument sequence. .) and (quad1. Suggested symbolic names for a Quadratic2D include the series: (q1. . . (L1. a point is shown as point or pt.22. . lnseg2. . y0 }][t] returns the coordinates of the point on a line segment at parameter t. (Q1. . At least one of the first five coefficients must be non-zero. . {x0 . y1 }] is the standard representation of a line segment in Descarta2D. Segment2D[{x0. . . .and y-coordinate. quad2.

(T1. y2 ) and (x3 . expression Segment2D[{x0. IsValid2D returns True if the object is a Descarta2D object and each of its parameters is of the proper type and form. n] returns the coordinates of vertex n of a triangle. . n = 1. {x2 . .8. t2. Suggested symbolic names for a Triangle2D include the series: (t1. In an argument sequence a Triangle2D is shown as triangle. . will cause a portion of the line segment between parameters t1 and t2 to be plotted. y1 ). Object Queries Each object in Descarta2D responds to a set of special queries essential to the operation of Descarta2D. y2 }. . The vertex points cannot be coincident or collinear. . y3 ). . such as Sketch2D. Is2D returns True if the object’s head is in a given list. as illustrated in Figure 22. y1 }. as in Area2D[triangle].8: Standard representation of a Triangle2D.). . Triangle2D Triangle2D[{x1. y3 }]. y1 L x Figure 22. Coordinates2D[triangle. ObjectNames2D returns a list of strings that are the names of all Descarta2D objects. is the standard representation of a triangle with vertex points (x1 . (x2 . tri2.).) and (tri1. .336 Chapter 22 Technical Notes y V3 Hx3 . . T2. t2 }] when used in a plotting command. 3. y2 L V1 Hx1 . 2. y1 }][{t1 . y0 }. {x3 . These special queries are listed below: IsDisplay2D returns True if the object can be displayed using the Sketch2D command. {x1 . y3 L V2 Hx2 . .

point] that constructs a line between two points). etc. in a standard Mathematica installation. In order to set up Mathematica to use the Descarta2D package files. After this command is entered. The package names are listed in Table 22.4 Descarta2D Packages A relatively small number of Mathematica packages (*. Descarta2D must be copied into a folder that Mathematica searches when loading packages. Your computer system must be set up to allow Mathematica to find these files before you can use any of the Descarta2D functions. The definitions in each package provide either support for Descarta2D objects (such as Point2D.) or functions (such as Radius2D[circle] that returns the radius of a circle. Mathematica will automatically find and load all the packages as required to execute Descarta2D commands.0\AddOns\Applications\ although this directory path may be different for your installation of Mathematica. Each package defines symbols that are then owned by the package. this will be the folder c:\Program Files\Wolfram Research\Mathematica\3.22. Circle2D. .2. 22.4 Descarta2D Packages 337 Table 22. you need copy the folder Descarta2D from the Descarta2D CD-ROM onto your hard drive. D2DArc2D D2DArcLength2D D2DArea2D D2DCircle2D D2DConic2D D2DConicArc2D D2DEllipse2D D2DEquations2D D2DExpressions2D D2DGeometry2D D2DHyperbola2D D2DIntersect2D D2DLine2D D2DLoci2D D2DMaster2D D2DMedial2D D2DNumbers2D D2DParabola2D D2DPencil2D D2DPoint2D D2DQuadratic2D D2DSegment2D D2DSketch2D D2DSolve2D D2DTangentCircles2D D2DTangentConics2D D2DTangentLines2D D2DTangentPoints2D D2DTransform2D D2DTriangle2D If you add a new object to Descarta2D.2: Reserved names in Descarta2D (packages). Typically.m files) provide support for all the Descarta2D functions. or Line2D[point. The master package file for Descarta2D will be loaded by issuing the command <<Descarta2D‘. Refer to the source code listings to determine how each of these queries can be implemented. the object will need to respond properly to these queries if you desire that the object behave in an integrated manner. Line2D.

Table 22.5.3: Reserved names in Descarta2D (general functions).5 MedialLoci2D Parameters2D Perimeter2D Points2D Polynomial2D PrimaryAngle2D PrimaryAngleRange2D Radius2D Reflect2D ReflectAngle2D Rho2D Rotate2D Scale2D SectorArea2D SegmentArea2D SemiConjugateAxis2D SemiMajorAxis2D SemiMinorAxis2D SemiTransverseAxis2D SimplifyCoefficients2D Sketch2D Slope2D SolveTriangle2D Span2D TangentCircles2D TangentConics2D TangentEquation2D TangentLines2D TangentPoints2D TangentQuadratics2D TangentSegments2D Translate2D Vertices2D XCoordinate2D YCoordinate2D Descarta2D Functions Descarta2D provides geometric computing facilities by introducing a number of general functions and queries whose names are listed in Table 22.3 and 22.4: Reserved names in Descarta2D (general queries). There are a number of low-level functions provided by Descarta2D that are useful for implementing new functions.338 Chapter 22 Technical Notes Table 22. IsCoincident2D IsCollinear2D IsConcentric2D IsConcurrent2D IsOn2D IsParallel2D IsPerpendicular2D IsTangent2D IsTripleParallel2D . These are listed in Table 22.6.4. A complete list of keywords is listed in Table 22. Angle2D ArcLength2D Area2D Asymptotes2D Bulge2D Centroid2D Circumference2D Coordinates2D Directrices2D Distance2D Eccentricity2D Equation2D FocalChords2D FocalLength2D Foci2D Length2D Loci2D MedialEquations2D 22. Some Descarta2D functions require keywords.

Assuming that the Descarta2D folder has been copied from the CD-ROM into the appropriate Mathematica folder on your system. The PDF files can be read directly off the CD-ROM or they can be copied into any convenient location on your disk drive.6: Reserved names in Descarta2D (low-level functions). www. PDF files may be viewed and printed using Adobe’s Acrobat Reader program that can be downloaded at no charge from Abode’s web site. AskCurveLength2D ChopImaginary2D CurveLength2D CurveLimits2D D2DPath2D Is2D IsApproximate2D IsComplex2D IsDisplay2D IsNegative2D IsNumeric2D IsReal2D IsScalar2D IsScalarPair2D IsTinyImaginary2D IsValid2D IsZero2D IsZeroOrNegative2D MakePrimitives2D ObjectNames2D SetDisplay2D Solve2D . The material will be listed by clicking the AddOn button in the Help Browser and then selecting the item named Descarta2D. Apex2D Circumscribed2D Complement2D 22. the documentation notebooks can be fully integrated into the Mathematica Help Browser.22.adobe..com. all of the text and documentation for the book will be available interactively in the Help Browser.6 Conjugate2D Inscribed2D MaxSeconds2D Parallel2D Pencil2D Perpendicular2D Descarta2D Documentation This entire book..com. The second format provided is Wolfram Research’s Mathematica notebook format. www. or in a passive manner using Wolfram’s MathReader program. including the subject matter chapters.5: Reserved names in Descarta2D (keywords). This is accomplished by clicking the Mathematica Front End menu item Help.6 Descarta2D Documentation 339 Table 22. is provided on the CD-ROM in two formats.. Notebooks whose links are clicked in the Help Browser category listing windows will be opened in the Help Browser. reference chapters and exploration notebooks. After the index has been rebuilt. Both Mathematica and MathReader can print notebook files. Notebooks can be viewed interactively using Mathematica itself.wolfram. MathReader is available at no charge and can be downloaded from Wolfram’s web site. links clicked in the notebooks themselves Table 22. The first format provided is Adobe’s Portable Document Format (PDF) and is useful for passive reading and printing of typeset renderings of the book identical to the printed version of the book. Rebuild Help Index.

installation files for Adobe Arcrobat Reader and MathReader are provided on the CD-ROM. . For Windows systems.340 Chapter 22 Technical Notes will be opened at live notebooks in the Front End.

ReflectAngle2D. but they are not generally mentioned in the subject matter chapters of the book. Angle2D Angle2D[line] computes the angle a line makes with the +x-axis. Additionally. Angle2D[line. hyperbola [448] or parabola [481]. [547] See also: PrimaryAngle2D. Low-level commands may be used freely. [460] Angles in Descarta2D are always specified and returned in radians. The syntax and usage of each command is described. Commands described as being low-level are used in the internal implementation of Descarta2D. PrimaryAngleRange2D. n] computes the vertex angle at vertex n of a triangle. a cross-reference pointing to related commands is provided in each section. Apex2D Apex2D is a keyword indicating the construction of the apex control point of a conic arc. The conic may be an ellipse [423]. Page numbers enclosed in square brackets indicate the page in the package listings where the implementation of the command is found.Chapter 23 Command Browser This chapter is an alphabetical listing of all the commands provided by Descarta2D. [389] Angle2D[arc. t] computes the angle a radial diameter passing through the point at parameter t on the arc makes with the +x-axis. [389] Angle2D[conic] returns the rotation angle of a conic curve. [419] 341 . [460] Angle2D[triangle. as well as notes outlining special options and defaults. Angle2D[arc] computes the angular span of an arc. line] computes the angle measured counter-clockwise from the first line to the second line. when measured counter-clockwise from the +x-axis to the line.

[392] Arc2D[point. The curve may be an arc [396].342 Command Browser See also: Point2D. {x1 . is the ratio of the arc’s height. d/2. The bulge factor is the positive number B. are measured counter-clockwise from the +x-axis. y1 }. {x1 . Area2D Area2D[curve] computes the area associated with a curve. [387] The bulge factor. point. y1 ). B][{t1 . Arc2D Arc2D[{x0. y1 }. ellipse [397]. to half the chord length. circle [396]. r. The angles. {t1 . B][t] and arc[t] return the {x. line [397]. r. The coordinates of the start point are (x0 . [396] See also: Circumference2D. θ1 and θ2 . B] is the standard representation of an arc. . Complement2D] constructs the complement of an arc. Complement2D. point] constructs an arc from a start point with entry angle and an end point. Arc2D[{x0. B. [393] Arc2D[{point. y0 }. Perimeter2D. h. [388] Arc2D[{x0. y0 }. y} coordinates of a point at parameter t on an arc. hyperbola [397]. line segment [397] or parabola [398]. y1 }. point2 }] constructs an arc from the center point. θ2 }] constructs an arc from the center point. radius and the start and end points of the span. y0 ) and the coordinates of the end point are (x1 . t2 }] produces graphics primitives for a portion of an arc between parameters t1 and t2 when plotted. Length2D. [391] Arc2D[point. although they cannot be coincident with the center. radius and span. The start/end points do not need to lie on the arc. {x1 . t2 }]] numerically computes the arc length of a conic arc between two parameter values. Parameter values in the range 0 ≤ t ≤ 1 produce coordinates covering the complete span of the arc. {θ1 . point] constructs an arc passing through three points. Span2D. [388] Arc2D[arc. The arc is traversed counter-clockwise from the start point to the end point. so B = 2h/d. The first and third points define the span of the arc. {t1 . {point1 . N[ArcLength2D[cnarc. t2 }] computes the arc length of a curve between two parameter values. θ}. y0 }. [392] See also: Bulge2D. [393] Arc2D[point. ArcLength2D ArcLength2D[curve.

[551] See also: Point2D. [403] See also: SectorArea2D. [413] Bulge2D Bulge2D[arc] returns the bulge factor of an arc. The coordinates of the center point of the circle are {h. AskCurveLength2D AskCurveLength2D[ ] is a low-level function that returns the value of the CurveLength2D option of the Sketch2D command. ChopImaginary2D ChopImaginary2D[expr. circle.Command Browser 343 The curve may be an arc. SegmentArea2D. [477] The tolerance. ellipse or triangle. Area2D[arc] computes the area between an arc and its chord. [513] See also: CurveLength2D. k} and the radius is r. defaults to 10−10 . Circle2D Circle2D[{h. Asymptotes2D Asymptotes2D[hyperbola] constructs a list containing the two asymptote lines of a hyperbola. conic arc. r] is the standard representation of a circle. [399] Area2D[circle] computes the area of a circle. tol] is a low-level function that removes insignificant imaginary parts of complex numbers in an expression. [390] See also: Arc2D. [405] . [401] Area2D[ellipse] computes the area of an ellipse. The imaginary part is considered insignificant if its absolute value is less than the tolerance. Centroid2D Centroid2D is a keyword indicating the construction of a triangle’s centroid point. [400] Area2D[cnarc] computes the area between a conic arc and its chord. if omitted. [401] Area2D[triangle] computes the area of a triangle. k}. Sketch2D.

Pencil2D] constructs a circle. [553] Circle2D[triangle. point. line] constructs a circle with a given center point and tangent to a line. . Circumscribed2D] constructs a circle circumscribed about a triangle. [409] Circle2D[triangle. r][{θ1 . [409] Circle2D[quad] constructs the circle associated with a quadratic. k. θ2 }] produces graphics primitives for the arc of the circle between parameters θ1 and θ2 when plotted. TangentCircles2D. y} coordinates of a point at parameter θ on a circle. point] constructs a circle through three points. The family of circles is valid even if the two circles do not intersect as they will share a common radical axis. Inscribed2D] constructs a circle inscribed inside a triangle. [553] See also: Inscribed2D. r] constructs the circle centered at a point with a given radius.344 Command Browser Circle2D[{h. Point2D. k}. point] constructs the circle given a center point and a point on the circle. Pencil2D. [509] Circle2D[point. [391] Circle2D[circle. Circumscribed2D Circumscribed2D is a keyword indicating a construction involving a triangle’s circumscribed circle. [406] Circle2D[{h. Circumference2D Circumference2D[circle] computes the circumference of a circle. [396] Circumference[ellipse] computes the circumference of an ellipse. circle. Circumscribed2D. [406] Circle2D[arc] constructs the circle underlying an arc. [397] See also: ArcLength2D. [486] Circle2D[lnseg] constructs the circle whose diameter chord is a given line segment. r][θ] and circle[θ] return the {x. k}. parameterized by the variable k. that represents the family (pencil) of circles passing through the intersection points of the two given circles. [409] Circle2D[point. [409] Circle2D[point. [410] Circle2D[point. [552] See also: Circle2D. Parameter values in the range 0 ≤ θ < 2π produce coordinates covering the complete circumference of the circle.

[391] See also: Arc2D. is 10. y0 }. See also: AskCurveLength2D. [490] See also: Point2D. ellipse. [416] ConicArc2D[line. yA }. y0 }. Parameter values in the range 0 ≤ t ≤ 1 produce coordinates covering the entire length of the conic arc... {xA . y1 }. ρ] is the standard representation of a conic arc. y1 }. [419] Conjugate2D Conjugate2D is a keyword indicating the construction of a conjugate hyperbola. y1 }. The default can by changed using the Mathematica SetOptions command. the coordinates of the apex point are {xA . ConicArc2D ConicArc2D[{x0. [416] ConicArc2D[{x0. [450] See also: Hyperbola2D. {x1 . {xA . [415] ConicArc2D[{x0. yA }.Command Browser 345 Complement2D Complement2D is a keyword indicating the construction of an arc’s complement. . {xA . Coordinates2D Coordinates2D[args. yA }. conic] constructs a conic arc defined by a conic (circle. The coordinates of the start point are {x0 . XCoordinate2D. {x1 . Sketch2D. y} coordinates of the point that would be returned by the function Point2D[args.]. t2 }] produces graphics primitives representing the portion of the conic arc between parameters t1 and t2 when plotted. The projective discriminant is ρ. ρ][t] and cnarc[t] return the {x. yA } and the coordinates of the end point are {x1 . {x1 . ρ][{t1 . y} coordinates of a point at parameter t on a conic arc.] returns the {x. hyperbola or parabola) and a line containing the conic arc’s chord. y0 }. [512] The initial default. y0 }. y1 }. if not specified. CurveLength2D CurveLength2D is an option for the Sketch2D command specifying the approximate length that an unbounded curve should be rendered when plotted. YCoordinate2D.

b. The coordinates of the center point are {h. line] computes the distance between a point and a line. θ2 }] produces graphics primitives on the portion of the ellipse between parameter values θ1 and θ2 when plotted. [422] Ellipse2D[point. [460] Distance2D[point. θ] is the standard representation of an ellipse. k}. [426] . line. Ellipse2D Ellipse2D[{h. CurveLength2D. [491] Distance2D[point. Parameter values in the range 0 ≤ θ1 < 2π produce coordinates covering the complete circumference of the ellipse. y} coordinates of a point at parameter θ1 on an ellipse. [407] Eccentricity2D Eccentricity2D[conic] computes the eccentricity of a conic. b. the length of the semi-minor axis is b and the angle of rotation. Distance2D Distance2D[coords. a. if the conic is a parabola there is one directrix line in the list. hyperbola [413] or parabola [413]. k}. [422] Ellipse2D[{h. b. point] computes the distance between two points. curve] is a low-level function that computes a list of two parameter values on a curve such that the point whose coordinates are given is a distance CurveLength2D/2 from the points on the curve at the parameter values. a. is θ. coords] computes the distance between two positions given by coordinates. If the conic is an ellipse or hyperbola there are two directrix lines in the list. The conic may be a ellipse [412]. counter-clockwise with respect to the +x-axis. The conic may be an ellipse [413]. k}. the length of the semi-major axis is a. directrix line and eccentricity. e] constructs an ellipse defined by a focus point. circle] computes the distance between a point and a circle. θ][θ1 ] and ellipse[θ1 ] return the {x. k}.346 Command Browser CurveLimits2D CurveLimits2D[coords. θ][{θ1 . [421] Ellipse2D[{h. [491] Distance2D[point. Sketch2D. hyperbola [412] or parabola [412]. a. [513] See also: AskCurveLength2D. Directrices2D Directrices2D[conic] returns a list of the directrix line(s) of a conic curve.

which is the equation of the quadratic. b. The conic may be an ellipse [414]. point. [426] Ellipse2D[{point. hyperbola [412] or parabola [412]. which is the equation of the line. the length of the semi-conjugate axis is b and the angle of rotation. Hyperbola2D Hyperbola2D[{h. The coordinates of the center point are {h. k}. [481] See also: Parabola2D. {x.Command Browser 347 Ellipse2D[point. a. FocalChords2D FocalChords2D[conic] returns a list containing the focal chords of a conic curve (line segments). y}] returns Ax2 + Bxy + Cy 2 + Dx + Ey + F == 0. Foci2D Foci2D[conic] returns a list containing the focus point(s) of a conic. [425] Equation2D Equation2D[line. The primary branch opens about the +x-axis when the angle of rotation is zero. Parameter values in the range −∞ < t < +∞ cover the complete hyperbola branch. b. [446] . k}. hyperbola [414] or parabola [414]. e] constructs an ellipse from two vertex points and the eccentricity. k}. y}] returns the equation Ax + By + C == 0. If the conic is an ellipse or hyperbola the list contains two focus points. {x. [445] Hyperbola2D[{h. is θ. e] constructs an ellipse from two focus points and the eccentricity. if the conic is a parabola the list contains a single focus point. The conic may be an ellipse [412]. [428] See also: Polynomial2D. a. If the conic is an ellipse or hyperbola the list contains two focal chords (line segments). if the conic is a parabola the list contains a single focal chord (line segment). y} coordinates of a point at parameter t on the primary branch of a hyperbola. FocalLength2D FocalLength2D[parabola] returns the focal length of a parabola. the length of the semi-transverse axis is a. θ][t] and hyperbola[t] return the {x. θ] is the standard representation of a hyperbola. point}. [428] Equation2D[quad. counter-clockwise with respect to the +x-axis.

objHeadList] is a low-level function that returns True if the object is a valid Descarta2D object and its head is included in the head list. point}. b. otherwise. obj] returns True if two objects are of the same type and are coincident. [431] The function will attempt to detect if the pending evaluation will eventually be approximated using the N[expr] function. returns False. [439] The function returns unevaluated if the two objects are of a different type. Is2D Is2D[object. [450] Hyperbola2D[{point. if t1 > t2 the parameters represent a portion of the other branch. θ][{t1 . returns False. If t1 < t2 the parameters represent a portion of the primary branch of the hyperbola. [446] Hyperbola2D[{h. b. If this condition is detected the function will also return True. True][t] returns the {x. θ. coordinates. otherwise. [450] Hyperbola2D[point. t2 }] produces graphics primitives for a portion of the hyperbola between parameters values t1 and t2 when plotting. k}. lines. e] constructs a hyperbola defined by a focus point. k}. Inscribed2D Inscribed2D is a keyword indicating a construction involving a triangle’s inscribed circle. directrix line and eccentricity. point. [446] Hyperbola2D[hyperbola. [552] See also: Circle2D. a.348 Command Browser Hyperbola2D[{h. otherwise. . Point2D. points or quadratics. e] constructs a hyperbola from two focus points and the eccentricity. [472] IsApproximate2D IsApproximate2D[expr] is a low-level function that returns True if the expression contains approximate real numbers. e] constructs a hyperbola from two vertex points and the eccentricity. y} coordinates of a point at parameter t on the non-primary (reflected) branch of a hyperbola (used only for graphics rendering). Conjugate2D] constructs the conjugate of a hyperbola. The objects may be circles. returns False. [451] Hyperbola2D[point. IsCoincident2D IsCoincident2D[obj. [450] See also: Conjugate2D. a. line.

contain complex numbers. returns False. [441] IsConcurrent2D[lnList] returns True if any triple of lines in a list is concurrent. returns False. otherwise. when evaluated. [432] IsComplex2D[exprList. [432] IsComplex2D[exprList. returns False. otherwise. if omitted. otherwise. point. And. [440] IsComplex2D IsComplex2D[expr. line] returns True if three lines are concurrent (intersect in a common point). contains a complex number. defaults to 10−10 . tol] returns True if all the expressions in a list. line. Or. [440] IsConcentric2D[cirList] returns True if any pair of circles in a list are concentric. returns False. tol] returns True if any expression in a list. contains a complex number. otherwise. [440] IsCollinear2D[ptList] returns True if any triple of points in a list is collinear. otherwise. otherwise. [440] IsConcurrent2D IsConcurrent2D[line. otherwise. otherwise. when evaluated. otherwise. [431] The tolerance.Command Browser 349 IsCoincident2D[objList] returns True if any pair of objects in a list are of the same type and are coincident. otherwise. returns False. [440] IsCollinear2D IsCollinear2D[point. contains a complex number (a number is considered complex if the absolute value of its imaginary part is greater than the tolerance). [441] IsDisplay2D IsDisplay2D[object] is a low-level function that returns True if the object is a displayable Descarta2D object. otherwise. returns False. circle] returns True if two circles are concentric. tol] returns True if any expression in a list. returns False. [512] . returns False. [432] IsConcentric2D IsConcentric2D[circle. otherwise. returns False. returns False. when evaluated. returns False. when evaluated. tol] is a low-level function that returns True if the expression. point] returns True if three points are collinear. returns False. IsComplex2D[exprList.

returns False. when evaluated. returns False. otherwise. is negative. returns False. The curve may be a line [441]. The conic may be a circle. [434] The tolerance. IsParallel2D IsParallel2D[line. circle [441] or quadratic [441]. otherwise. if omitted. otherwise. returns False. IsNegative2D[exprList. returns False and displays a message stating that the function. tol] returns True if any expression in a list. IsOn2D[point.350 Command Browser IsNegative2D IsNegative2D[expr. line] returns True if two lines are parallel. if omitted. otherwise. [442] IsParallel2D[lnList] returns True if any pair of lines in a list is parallel. returns False. otherwise. hyperbola or parabola. otherwise. tol] is a low-level function that returns True if all the atoms in an expression can be evaluated to real numbers (a complex number is considered real if the absolute value of its imaginary part is less than the tolerance). otherwise. otherwise. is negative. IsNumeric2D IsNumeric2D[expr. returns False. This form is a low-level function and is intended to be used for argument checking. when evaluated. returns False. [434] IsNegative2D[exprList. [432] The tolerance. are negative. funcName. requires numerical arguments. And. otherwise. [432] IsOn2D IsOn2D[point. ellipse. Quadratic2D[conic]] returns True if a point is on a conic. otherwise. returns False. is negative (a number is considered negative if it is less than zero and its absolute value is greater than the tolerance). tol] returns True if any expression in a list. IsZeroOrNegative2D. defaults to 10−10 . when evaluated. IsNumeric2D[expr. curve] returns True if a point is on a curve. returns False. funcName. [434] See also: IsZero2D. tol] returns True if all the atoms in an expression can be evaluated to real numbers. [442] . tol] returns True if all the expressions in a list. defaults to 10−10 . Or. when evaluated. [434] IsNegative2D[exprList. tol] is a low-level function that returns True if the expression.

otherwise. hyperbola or parabola. [443] IsReal2D IsReal2D[expr. otherwise. The conic may be a circle. otherwise. otherwise. returns False. circle] returns True if a line is tangent to a circle. [443] . IsScalarPair2D IsScalarPair2D[{expr. See also: IsScalar2D. is a real number (a complex number is considered real if the absolute value of its imaginary part is less than the tolerance).Command Browser 351 See also: IsTripleParallel2D. returns False. returns False. returns False. IsTangent2D IsTangent2D[line. Quadratic2D[conic]] returns True if a line is tangent to a conic. IsScalar2D IsScalar2D[expr] is a low-level function that returns True if the expression appears to be a scalar quantity—that is. quad] returns True if a line is tangent to a quadratic. otherwise. See also: IsScalarPair2D. complex numbers or Descarta2D objects. returns False. otherwise. returns False. otherwise. line] returns True if two lines are perpendicular. [433] The tolerance. [442] IsPerpendicular2D[lnList] returns True if any pair of lines in a list is perpendicular. [443] IsTangent2D[line. they cannot be recognized as lists. it cannot be recognized as a list. returns False. [433] This function is used by Descarta2D for argument checking. if omitted. [443] IsTangent2D[line. defaults to 10−10 . a complex number or a Descarta2D object. returns False. IsPerpendicular2D IsPerpendicular2D[line. expr}] is a low-level function that returns True if both expressions appear to be scalar quantities—that is. [434] This function is used by Descarta2D for argument checking. ellipse. when evaluated. otherwise. tol] is a low-level function that returns True if the expression.

conic arc [417]. tol] is a low-level function that returns True if the expression. [435] IsZero2D[exprList. when evaluated. is zero (a number is considered zero if its absolute value is less than the tolerance). hyperbola [447]. otherwise. are zero. tol] returns True if all the expressions in a list. And. line. line [459]. defaults to 10−10 . Or. returns False.352 Command Browser IsTangent2D[circle. is zero. IsZero2D IsZero2D[expr. returns False. IsZeroOrNegative2D. IsZero2D[exprList. IsValid2D IsValid2D[object] is a low-level function that returns True if the object is syntactically valid. when evaluated. line] returns True if three lines are mutually parallel. returns False. when evaluated. point [490]. [434] The tolerance. returns False. returns False. otherwise. otherwise. [443] IsTinyImaginary2D IsTinyImaginary2D[expr. circle] returns True if two circles are tangent to each other. tol] is a low-level function that returns True if any complex number in an expression has a tiny imaginary part (the imaginary part is considered tiny if its absolute value is less than the tolerance). if omitted. parabola [481]. returns False. [435] IsZero2D[exprList. [435] The tolerance. otherwise. otherwise. if omitted. quadratic [498] or triangle [546]. when evaluated. [442] IsTripleParallel2D[lnList] returns True if any triple of lines in a list is mutually parallel. [442] See also: IsParallel2D. tol] returns True if any expression in a list. otherwise. returns False. IsTripleParallel2D IsTripleParallel2D[line. otherwise. defaults to 10−10 . line segment [506]. . returns False. tol] returns True if any expression in a list. circle [406]. [435] See also: IsNegative2D. [472] The object may be an arc [389]. otherwise. otherwise. is zero. returns False. ellipse [423].

y} coordinates of a point at parameter t on a line. otherwise. otherwise. defaults to 10−10 . Length2D Length2D[lnseg] computes the length of a line segment. if omitted. when evaluated. [436] See also: IsNegative2D. t2 }] produces graphics primitives for the line segment between parameters t1 and t2 when plotting. B. And. returns False. IsZeroOrNegative2D[exprList. B. [462] Line2D[ellipse] constructs a line which contains the major axis of an ellipse. coords] constructs a line through two positions specified by {x. tol] returns True if any expression in a list. d] constructs a line offset a distance d from a given line. [449] Line2D[line] constructs a line with normalized coefficients. y}] constructs a line from the equation Ax + By + C == 0. when evaluated. [436] IsZeroOrNegative2D[exprList. [507] See also: ArcLength2D. otherwise. tol] returns True if all the expressions in a list. [435] The tolerance. [425] Line2D[eqn. C] is the standard representation of the line Ax + By + C = 0. [458] Line2D[circle. [461] Line2D[line. [462] . [436] IsZeroOrNegative2D[exprList. is zero or negative. Line2D Line2D[A. are zero or negative. returns False. {x. [458] Line2D[A. tol] returns True if any expression in a list. The distance may be positive or negative producing one of two possible offsets. is zero or negative. B. y} coordinates. when evaluated. IsZero2D. tol] returns True if the expression.Command Browser 353 IsZeroOrNegative2D IsZeroOrNegative2D[expr. [458] Line2D[hyperbola] constructs a line which contains the transverse axis of a hyperbola. otherwise. C][t] and line[t] return the {x. [458] Line2D[A. circle] constructs the radical axis line of two circles. C][{t1 . when evaluated. [408] Line2D[coords. Parameter values in the range −∞ < t < +∞ produce coordinates covering the complete line. is zero or negative. returns False. Or. returns False.

n2 ] constructs a line containing vertices n1 and n2 of a triangle. Perpendicular2D] constructs a line equidistant from two points. Perpendicular2D. m] constructs a line with slope m passing through a point. Perpendicular2D] also constructs a line through a point perpendicular to a line. point] constructs a line through two points. [465] Loci2D[cnarc] returns a list containing the curve underlying a conic arc. hyperbola [450]. parameterized by k. [468] . passing through a point. point. Line2D[point. {x. parameterized by k. [463] Line2D[point. line. [552] See also: Parallel2D. [462] Line2D[point. line. [462] Line2D[point. [463] Line2D[point. e] returns a list containing the conic defined by the vertex equation parameters. [458] Line2D[triangle. This line is the perpendicular bisector of the line segment defined by the two points. [419] Loci2D[point. Parallel2D] constructs a line through a point parallel to a line. line. then the polar (line) is the tangent to the curve at the pole (point). ellipse [425]. passing through the intersection point of two given lines. length. one or two lines. y}] constructs a line from the polynomial Ax + By + C. k. Pencil2D. [485] Line2D[point. Pencil2D] constructs a family of lines (pencil). The list may contain a conic. the length is the focal length and the constant. parabola [483] or quadratic [463]. [483] Line2D[point. [463] Line2D[point. [463] Line2D[poly. Loci2D Loci2D[quad] returns a list of objects represented by a quadratic. curve] constructs the polar (line) of a curve given the pole (point). n1 . line] constructs a line through a point perpendicular to a line. Perpendicular2D] constructs a line that is the perpendicular bisector of a line segment. [485] Line2D[lnseg] constructs a line containing a line segment. a point or it may be empty. [508] Line2D[parabola] constructs a line which contains the axis of a parabola. [462] Line2D[point. [508] Line2D[lnseg. is the eccentricity.354 Command Browser Line2D[line. e. If the pole (point) is on the curve. Infinity] constructs a vertical line through a point. The curve may be a circle [408]. k. The conic is constructed in standard position. Pencil2D] constructs a family of lines (pencil). The point is the vertex point.

MedialLoci2D MedialLoci2D[{obj. The given objects may be points. e. [473] See also: MedialLoci2D. is the eccentricity and θ is the angle of rotation. θ] returns a list containing the conic defined by the vertex equation parameters. ellipse. k}. lines or circles. ObjectNames2D ObjectNames2D[ ] returns a list of strings which are the names of all the Descarta2D objects. Parameter values in the range −∞ < t < +∞ produce coordinates covering the complete parabola. conic arc. The coordinates of the vertex point are {h. obj}] returns a list of lines or quadratics equidistant from two given objects. the focal length is f and the angle of rotation. lines or circles. [480] . obj}] returns a list of objects equidistant from two given objects. the length is the focal length. MaxSeconds2D MaxSeconds2D is a keyword indicating the maximum number of seconds allowed for solving equations. directrix line and eccentricity. k}. y} coordinates of a point at parameter t on a parabola. [516] See also: Solve2D. θ][t] and parabola[t] return the {x. θ] is the standard representation of a parabola. [479] Parabola2D[{h. [474] See also: MedialEquations2D. t2 }] is a low-level function that returns a list of Mathematica graphics primitives approximating a curve between two parameter values. [472] Parabola2D Parabola2D[{h. [468] Loci2D[point. The given objects may be points. length. is θ. {t1 . MedialEquations2D MedialEquations2D[{obj. line. [513] The curve may be an arc. f. e] returns a list containing the conic defined by a focus point. the constant. line segment or parabola.Command Browser 355 Loci2D[point. hyperbola. [468] MakePrimitives2D MakePrimitives2D[curve. circle. counter-clockwise with respect to the +x-axis. k}. The point is the vertex point. e. f. line.

f. The curve may be a circle [455]. [489] Point2D[x. k}. Point2D Point2D[{x. TangentLines2D. [483] Parallel2D Parallel2D is a keyword indicating a parallel construction. y). curve] computes a list of the two parameters where a line intersects a curve. See also: ArcLength2D. y}] or Point2D[coords] is the standard representation of a point with coordinates {x. Quadratic2D. line] constructs a parabola defined by a focus point and a directrix line. [408] . [480] Parabola2D[point. [492] Point2D[arc] constructs the center point of an arc. [391] Point2D[circle] constructs the center point of a circle. y] constructs a point at coordinates (x. [398] See also: ArcLength2D. SectorArea2D. Circle2D. y}. hyperbola [455] or parabola [456]. [463] See also: Line2D. [485] See also: Line2D. [463] See also: Line2D. The list of parameters is useful for computing areas and arc lengths defined by the line and the curve. t2 }] produces graphics primitives for the portion of the parabola between parameters t1 and t2 when plotting.356 Command Browser Parabola2D[{h. ellipse [455]. SegmentArea2D. θ][{t1 . Parameters2D Parameters2D[line. Pencil2D Pencil2D is a keyword indicating the construction of a pencil of curves. TangentLines2D. Perpendicular2D Perpendicular2D is a keyword indicating a perpendicular construction. Perimeter2D Perimeter2D[triangle] computes the perimeter of a triangle.

[552] Point2D[triangle. 357 . The distance may be positive or negative resulting in one of two possible offset points. in the direction of a line. curve] constructs the pole (point) of a curve given the polar (line). [482] Point2D[point. d. [493] Point2D[point. Apex2D] constructs the apex control point of a conic arc. [419] Point2D[conic] constructs the center point of a central conic. v} in the coordinate system defined by a point and a line. Inscribed2D] constructs the center point of a circle inscribed inside a triangle.Command Browser Point2D[cnarc] constructs the center point of the conic underlying a conic arc. ellipse [425]. parabola [482] or quadratic [494]. [493] Point2D[point. r2 ] constructs a point dividing the segment between two points into the ratio r1 /r2 . The conic may be a circle [408]. ellipse [424] or hyperbola [449]. n] constructs a point at vertex n of a triangle. Centroid2D. Inscribed2D. Circumscribed2D] constructs the center point of a circle circumscribed about a triangle. the point is offset in the opposite direction. [419] Point2D[cnarc. d. [551] Point2D[triangle. If the distance is negative. Circumscribed2D. [493] Point2D[quad] constructs the center point of a quadratic. line. r1 . Point2D[curve[t]] constructs a point at a parameter value on a curve. The curve may be a circle [408]. d] constructs a point by offsetting a point a distance. [552] See also: Apex2D. point. [493] Point2D[point. If the polar (line) is tangent to the curve. The line defines the y-axis and the point is on the +x-axis. v}] constructs the point with coordinates {u. [494] Point2D[triangle. line] constructs a point by projecting a point onto a line. hyperbola [449]. point] constructs the midpoint of two points. then the pole (point) is the point of tangency. point. {u. Point2D[line. in the direction of a second point. [494] Point2D[point. line] constructs the intersection point of two lines. [494] Point2D[lnseg] constructs the midpoint of a line segment. [493] Point2D[point. d] constructs a point by offsetting a point a distance. assuming the quadratic is a central conic. line. [552] Point2D[triangle. Centroid2D] constructs a point at the centroid of a triangle. [508] Point2D[parabola] constructs the vertex point of a parabola. Point2D[line.

C. y}] returns the polynomial Ax + By + C. hyperbolas. E. {φ1 . 2π] returns a primary angle in the range 0 ≤ φ < 2π where φ is given by Mod[θ. such that 0 ≤ φ1 < 2π and φ1 < φ2 < (φ1 + 2π). {φ1 . which is the polynomial of the quadratic. D. hyperbola [446] or parabola [480]. [497] Quadratic2D[cnarc] constructs the quadratic underlying a conic arc. ellipse [422]. 2π]. θ2 }] returns a list of two primary angles. {x. PrimaryAngleRange2D PrimaryAngleRange2D[{θ1. [428] Polynomial2D[quad. [478] PrimaryAngleRange2D[arc] returns a list of two primary angles. [390] See also: PrimaryAngle2D. F] is the standard representation of the quadratic given by Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0. ellipses. parabolas or quadratics. φ2 }. φ2 }. B. curve] constructs a list containing the intersection points of two curves. circles. [428] See also: Equation2D. [416] Quadratic2D[conic] constructs the quadratic associated with a conic. [453] The curves may be lines. The conic may be a circle [405]. y}] returns Ax2 + Bxy + Cy 2 + Dx + Ey + F. [500] . which are the spanning angles of the arc. [478] PrimaryAngle2D[θ. [478] PrimaryAngle2D[θ. 2π]. π]. π] returns a primary angle in the range 0 ≤ φ < π where φ is given by Mod[θ. {x. Quadratic2D[coords] constructs the quadratic representing a position specified by coordinates (a circle of zero radius). Polynomial2D Polynomial2D[line. [478] See also: PrimaryAngleRange2D.358 Command Browser Points2D Points2D[curve. Quadratic2D Quadratic2D[A. PrimaryAngle2D PrimaryAngle2D[θ] returns a primary angle in the range 0 ≤ φ < 2π where φ =Mod[θ. which is the polynomial of the line.

Radius2D Radius2D[circle] returns the radius of a circle. [501] Quadratic2D[point] constructs the quadratic representing a point (a circle of zero radius). [486] See also: Pencil2D. The point is the vertex point. The point is the vertex point. [502] Quadratic2D[point. y}] constructs a quadratic from an equation given in the form Ax2 + Bxy + Cy 2 + Dx + Ey + F == 0. [390] See also: Arc2D. point. the length is the focal length and the constant. line] constructs the quadratic representing the product of two lines. line. parameterized by k. line. point. line}.Command Browser Quadratic2D[eqn. the length is the focal length. point. k. The quadratic is constructed in standard position. [491] Quadratic2D[point. point] constructs the quadratic representing the circle passing through three points. is the eccentricity and θ is the angle of rotation. and passing through the intersection points of two quadratics. {x. is the eccentricity. [500] Quadratic2D[quad. line] constructs the quadratic tangent to five lines. point. e. [500] Quadratic2D[quad] constructs a quadratic with normalized coefficients. Pencil2D] constructs a family of quadratics. e. e] constructs the quadratic defined by the vertex equation parameters. point. k. [500] Quadratic2D[line. [501] Quadratic2D[point. [502] Quadratic2D[{line. θ] constructs the quadratic defined by the vertex equation parameters. line. e] constructs the quadratic defined by a focus point. k. point. parameterized by k. Pencil2D] constructs a family (pencil) of quadratics. the constant. length. [407] Radius2D[arc] returns the radius of an arc. [486] Quadratic2D[line. {x. length. [502] Quadratic2D[point. quad. point. line. line}. parameterized by k. Circle2D. [502] Quadratic2D[point. Pencil2D] constructs a family of quadratics. point] constructs a quadratic passing through five points. [487] Quadratic2D[point. passing through the intersection points of four lines taken in pairs. 359 . y}] constructs a quadratic from the polynomial given in the form Ax2 + Bxy + Cy 2 + Dx + Ey + F. directrix line and eccentricity. passing through four points. e. {line. [501] Quadratic2D[poly.

circle [407]. The object may be an arc [390]. line segment [507]. Rotate2D. returning a list of objects. See also: Reflect2D. Ax + By + C == 0. hyperbola [448]. coordinates [541]. line segment [507]. line [461]. Ax + By + C == 0. θ. line] reflects an object in a line. {x. conic arc [418]. θ. parabola [481]. {x. parabola [482] or triangle [551]. coords] rotates a list of objects. [540] See also: ReflectAngle2D. If the coordinates are omitted. line] computes the reflection of an angle in a line. [541] See also: Reflect2D. [541] The equation may be linear. [540] Reflect2D[eqn. ellipse [424]. line] reflects a list of objects in a line. Ax2 + Bxy + Cy 2 + Dx + Ey + F == 0. Reflect2D[objList. line] reflects an equation in a line. or quadratic. ellipse [424]. [541] Rotate2D[eqn. . then the function computes the angle θ0 that L0 makes with the +x-axis. point [492] or triangle [550]. circle [407]. [540] The equation may be linear. [417] See also: ConicArc2D. Translate2D. [540] If a line L makes an angle θ with the +x-axis and line L0 is the reflection of L in the given line (the second argument to the function). or quadratic. The object may be an arc [389]. the default is the origin. Rho2D Rho2D[cnarc] returns the projective discriminant of a conic arc.360 Command Browser Reflect2D Reflect2D[object. θ. Rotate2D[objList. Translate2D. y}. conic arc [418]. ReflectAngle2D ReflectAngle2D[θ. Scale2D. Scale2D. coordinates [540]. coords] rotates an equation by an angle θ (in radians) about a position whose coordinates are given. y}. Rotate2D Rotate2D[object. hyperbola [448]. coords] rotates an object by an angle θ (in radians) about a position whose coordinates are given. Ax2 + Bxy + Cy 2 + Dx + Ey + F == 0. line [461].

[552] SegmentArea2D SegmentArea2D[curve. [542] Scale2D[eqn. Ax + By + C == 0. coordinates [542]. C][{t1 . Parameter values in the range 0 ≤ t ≤ 1 produce coordinates covering the entire length of the line segment. conic arc [418]. circle [407]. SectorArea2D SectorArea2D[curve. y1 }. the default is the origin. [542] See also: Reflect2D. y}. line segment [507]. [505] Segment2D[{x0. t2 }] produces graphics primitives for the line segment between parameters t1 and t2 when plotting. [506] Segment2D[point. s. or quadratic. Scale2D[objList. coords] scales a list of objects from a position whose coordinates are given. If the coordinates are omitted. {t1 . Rotate2D. [541] The object may be an arc [391]. ellipse [401] or hyperbola [402] (the sector is defined from the center point of the curve to the two points defined by the parameters on the curve). y1 }] is the standard representation of a line segment. coords] scales an object from a position given as coordinates. n1 . line [461]. s. See also: Area2D. [505] Segment2D[A. point] constructs a line segment between two points. The coordinates of the start point are {x0 . {x. coords] scales an equation from a position.Command Browser 361 Scale2D Scale2D[object. y1 }][t] and lnseg[t] return the {x. The curve may be a circle [400]. . Ax2 + Bxy + Cy 2 + Dx + Ey + F == 0. [542] The equation may be linear. hyperbola [449]. [508] Segment2D[triangle. s. {t1 . y0 }. y0 }. y} coordinates of a point at parameter t on a line segment. t2 }] computes the area of a sector of a curve between two parameters. ellipse [424]. parabola [482] or triangle [551]. {x1 . Translate2D. {x1 . Segment2D Segment2D[{x0. t2 }] computes the area of a segment of a curve between two parameters. SegmentArea2D. n2 ] constructs a line segment between vertices n1 and n2 of a triangle. y0 } and the coordinates of the end point are {x1 . B.

362 Command Browser The curve may be a circle [400]. SemiMinorAxis2D. opts] produces a plot of the objects in a list. See also: Area2D. [423] See also: Ellipse2D. SemiConjugateAxis2D SemiConjugateAxis2D[hyperbola] returns the length of the semi-conjugate axis of a hyperbola. SectorArea2D. SemiMajorAxis2D SemiMajorAxis2D[ellipse] returns the length of the semi-major axis of an ellipse. [513] . [448] See also: Hyperbola2D. hyperbola [402] or parabola [402] (the segment is the area between the curve and the chord defined by the two parameters). SemiMajorAxis2D. SemiTransverseAxis2D. SemiConjugateAxis2D. [423] See also: Ellipse2D. Sketch2D Sketch2D[objList. SetDisplay2D SetDisplay2D[objPatt. [448] See also: Hyperbola2D. [427] Simplify[line] and FullSimplify[line] use SimplifyCoefficients2D to simplify the coefficients of a line. SemiMinorAxis2D SemiMinorAxis2D[ellipse] returns the length of the semi-minor axis of an ellipse. [513] SimplifyCoefficients2D SimplifyCoefficients2D[coefList] is a low-level function that returns a list of coefficients with common factors removed. objPrim] is a low-level function that specifies the graphics primitives to use when plotting a given object pattern. SemiTransverseAxis2D SemiTransverseAxis2D[hyperbola] returns the length of the semi-transverse axis of a hyperbola. ellipse [401]. Simplify[quad] and FullSimplify[quad] use SimplifyCoefficients2D to simplify the coefficients of a quadratic.

a3 }}] computes a triangle configuration from three sides and/or angles. See also: Triangle2D. s3 }. TangentCircles2D TangentCircles2D[{pt | ln | cir. lines or circles). [548] SolveTriangle2D[{{s1. a3 }}. Any of the options for the Mathematica Graphics command may be specified. [513] See also: AskCurveLength2D. {a1 . [396] See also: ArcLength2D. a2 . a2 . Sketch2D[objList. opts] produces a plot of the objects in a list. Unspecified arguments should be Null. pt | ln | cir. CurveLength2D->n. {a1 . [548] The configuration is returned in the form {{s1 . s2 . [516] Solve2D[eqnList. MaxSeconds2D->n] solves a list of equations for a list of variables with a time limit of n seconds. s2 . a2 .Command Browser 363 The list of objects may be nested. s3 }. True] computes a triangle configuration from three sides and/or angles. [516] See also: MaxSeconds2D. s2 . [460] Slope2D[lnseg] computes the slope of a line segment. returning an alternate solution. [507] Solve2D Solve2D[eqnList. if one exists. Slope2D Slope2D[line] computes the slope of a line. [522] . s3 }. CurveLength2D. [395] N[Span2D[cnarc]] numerically computes the arc length of the complete span of a conic arc. using a specified curve length for unbounded curves. Span2D Span2D[arc] computes the arc length of the complete span of an arc. varList] is a low-level function that solves a list of equations for a list of variables and returns a list of rules representing the solutions. pt | ln | cir}] constructs a list of circles tangent to three objects (points. a3 }}. varList. SolveTriangle2D SolveTriangle2D[{{s1. {a1 .

Perpendicular2D. [521] TangentCircles2D[{pt | ln | cir}. with center on a given line or circle. line or circle). Parallel2D] also constructs a list of lines parallel to a line and tangent to a curve. hyperbolas. curve] constructs a list of lines from a point and tangent to a curve. with a given radius. [532] TangentLines2D[line. pt | ln. [532] TangentLines2D TangentLines2D[curve. ln | cir] constructs a list of circles tangent to two objects (points. parabolas or quadratics. TangentConics2D TangentConics2D[{pt | ln. [533] The curves may be circles. See also: TangentQuadratics2D.364 Command Browser For brevity of expression a circle is said to be tangent to a point if the point is on the circle. whose center is on a line or circle. line or circle) with a given center point. pt | ln}] constructs a list of conics tangent to five objects (points or lines). TangentCircles2D[{pt | ln | cir}. pt | ln. quad] returns an equation involving the coefficients of a line and a quadratic that constrains the two curves to be tangent. [521] TangentCircles2D[{pt | ln | cir. [532] TangentLines2D[point. curve] constructs a list of lines tangent to two curves. [532] See also: Parallel2D. [522] TangentCircles2D[{pt | ln | cir. r] constructs a list of circles tangent to two objects (points. curve. TangentSegments2D. curve] constructs a list of lines parallel to a line and tangent to a curve. with a given radius. pt | ln. pt] constructs a list of circles tangent to an object (point. TangentLines2D[line. TangentEquation2D TangentEquation2D[line. Perpendicular2D] also constructs a list of lines perpendicular to a line and tangent to a curve. ln | cir. r] constructs a list of circles tangent to an object (point. pt | ln | cir}. [526] The expressions in the resulting conics can be very complicated and are usually practical only if evaluated numerically. ellipses. curve. . [532] TangentLines2D[line. lines or circles). [521] See also: Circle2D. lines or circles). pt | ln | cir}.

{x3 . s3 }] constructs a triangle from three side lengths. {x. See also: TangentLines2D. s2 . pt | ln. line segment [508]. See also: TangentConics2D.Command Browser 365 TangentPoints2D TangentPoints2D[point. hyperbola. line [461]. [543] Translate2D[eqn. Scale2D. [554] . hyperbolas. TangentSegments2D TangentSegments2D[curve. [537] The curve may be a circle. parabola or quadratic. parabolas or quadratics. ellipses. coordinates [542]. {u. Triangle2D Triangle2D[{x1. [534] The curves may be circles. or quadratic. {u. v}] translates a list of objects. Ax2 + Bxy + Cy 2 + Dx + Ey + F == 0. The first vertex of the triangle will be the origin and the second vertex will be on the +x-axis. pt | ln. curve] constructs a list of points that are the points of tangency of lines from a point to a curve. pt | ln. {x2 . v}] translates an object delta distance. conic arc [418]. TangentQuadratics2D TangentQuadratics2D[{pt | ln. [543] See also: Reflect2D. ellipse. {u. y}. Ax + By + C == 0. v}] translates an equation delta distance. parabola [482]. circle [408]. Translate2D Translate2D[object. y2 }. y1 }. y3 }] is the standard representation of a triangle defined by three vertex coordinates. curve] constructs a list of line segments tangent to two curves. pt | ln}] constructs a list of quadratics tangent to five objects (points or lines). quadratic [499] or triangle [551]. Rotate2D. Translate2D[objList. The object may be an arc [391]. [526] The expressions in the resulting quadratics can be very complicated and are usually practical only if evaluated numerically. [546] Triangle2D[{s1. [543] The equation may be linear. ellipse [424]. hyperbola [449].

a3 }}] constructs a triangle from three sides and/or angles. {a1 . s3 }. True] constructs a triangle from three sides and/or angles. s2 . YCoordinate2D. [553] Triangle2D[point. [554] Triangle2D[line. The first vertex of the triangle will be the origin and the second vertex will be on the +x-axis. [491] See also: Coordinates2D. point] constructs a triangle whose vertices are specified by three points. hyperbola [413] or parabola [413]. returning an alternate solution. [553] See also: SolveTriangle2D. XCoordinate2D. line. [491] XCoordinate2D[coords] returns the x-coordinate of a location. [491] YCoordinate2D[coords] returns the y-coordinate of a location. s2 . YCoordinate2D YCoordinate2D[point] returns the y-coordinate of a point. if the conic is a parabola the list contains a single vertex point.366 Command Browser Triangle2D[{{s1. Point2D. {a1 . If the conic is an ellipse or hyperbola the list contains two vertex points. a2 . Vertices2D Vertices2D[conic] returns a list containing the vertex point(s) of a conic curve. XCoordinate2D XCoordinate2D[point] returns the x-coordinate of a point. Unspecified arguments should be Null. [554] Triangle2D[{{s1. The conic may be an ellipse [412]. Point2D. . point. if one exists. line] constructs a triangle whose sides are specified by three lines. a2 . s3 }. [491] See also: Coordinates2D. a3 }}.

. . . . . . . . . . . . . . . When specifying an arc through three points. . . . —– Arc2D::imaginary . . . . . . . . . . . . . . . . .Chapter 24 Error Messages This chapter is a listing of all the error messages that can be generated by Descarta2D during computations. . . [388] An invalid arc of the form arc1 has been detected. . . . . . . the points cannot be collinear. . . . Descarta2D will return the $Failed symbol whenever the arguments of an object are determined to be invalid. . the given points {pt1 . . . . —– Arc2D::invalid. . . . . . . . . . . . . . . . . Descarta2D will return the $Failed symbol if it detects that the three specified points lie on a line. . . . . . . . . . pt3 } are collinear. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [393] No arc exists. . . .. . . . pt2 . . . . the arguments cannot be imaginary. . . . . . The bounding points of an arc cannot be coincident and the bulge factor must be positive. . . .[389] An invalid arc of the form arc has been detected. . the bulge factor must be positive and the defining points must be distinct. The messages are listed alphabetically by message name. . . . . . . . . . . . . Mathematica may generate additional error messages. . . . . . . . . . —– 367 . . . . .. . . . Descarta2D will return the $Failed symbol whenever the arguments of an object are determined to be invalid. . . . . . . . . . . . . . . . . . . The arguments of an arc cannot involve imaginary numbers. The number in square brackets indicates the page where the error is defined in the packages. . . . . . . . . . . . . . . . . . . .. . . . Arc2D Arc2D::collinear .

. —– Circle2D Circle2D::coincident . . . . . . . Descarta2D will return the $Failed symbol if invalid entry angle is detected. . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . an arc cannot be constructed. . . . —– Arc2D::invalidSpan . . . . . . . . . The defining points of an arc must be distinct. . . . r. . . . . . . . . . . Descarta2D will return the $Failed symbol if collinear points are detected. . . . . . . no valid circle exists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . —– Arc2D::invalidCollinear . . . . . . . . . . . . . . The $Failed symbol will be returned when an invalid span is specified. . . . . . —– Arc2D::invalidRadius . [393] The three defining points are collinear. . . . . . . [392] The angular span of the arc is invalid. . . . . Descarta2D will return the $Failed symbol if coincident points are detected. . . . . . . . The entry angle of an arc cannot be an integer multiple of π radians. . . the span cannot be an integer multiple of 2Pi radians. . . The radius of an arc must be positive. . the radius must be positive.. . . . . . . . . . an arc cannot be constructed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . the entry angle cannot be an integer multiple of Pi radians. . . . . . An arc cannot be constructed through three collinear points. . . . . . . . . [392] The radius.[392] The defining points are coincident. . . . . . . .. . . . . . .368 Error Messages Arc2D::invalidCoincident . . . . . . . . . . . . . . . . . . . . . . . of the arc is invalid. . The angular span of an arc cannot be a multiple of 2π radians. . . . . . . . —– Arc2D::invalidEntryAngle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . pt2 } are coincident. . . . . . . . . . . . . . Descarta2D will return the $Failed symbol if a nonpositive radius is detected. . . . . [409] The points {pt1 . . . .. . . . . . . . . . .[392] The entry angle of the arc is invalid. . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . the radius must be positive. . . .. . . . . When specifying a circle tangent to a line with a given center point. . . Descarta2D will return the $Failed symbol if the arguments of an object involve imaginary numbers. .[406] An invalid circle of the form cir1 has been detected. . . . . . . . . . . . . no valid circle exists. . . . . . . . . . . .. . . . . . . . . . . . . the radius must be positive. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . the arguments cannot be imaginary. . . . . . . . Descarta2D will return the $Failed symbol if a non-positive radius is specified during a circle construction. . . . . . . . . . . . . . . . . . . —– Circle2D::imaginary. . . . . . . . . . . . —– Circle2D::noCircle . . . . .. . . . . . . . . . . . . .Error Messages 369 When specifying a circle by two points. . . . When specifying a circle through three points. . . . . . . . . . . . . . . . . . . . . . . .[410] The points {pt1 . . . . . [406] An invalid circle of the form cir1 has been detected. . . . . . . is invalid. . pt2 . [409] The radius argument. . . . . . . . . —– Circle2D::on . . . . . . . . . . . If Descarta2D detects that the point lies on the line. . . . . Descarta2D will return the $Failed symbol if it detects that the three specified points lie on a line. . . . . . . . . . . . . the points cannot be collinear. . . . . . . . it will return the $Failed symbol. the points cannot be coincident. . . [409] pt1 is on ln1 . . . the radius must be positive. . . . . When defining a circle the radius must be a positive number. . . . —– Circle2D::collinear. . —– . . . . . . Descarta2D has detected that the curve represented by a Quadratic2D is not a circle. . . . . . . . . . Descarta2D will return the $Failed symbol if two coincident points are specified. . When specifying a circle by center point and radius. . The arguments defining a circle cannot be imaginary numbers. . . . . . The $Failed symbol will be returned. . . . . . —– Circle2D::invalid . . . . . . . . . . . . . . . . . . . . . . . . Descarta2D will return the $Failed symbol whenever the arguments to an object are determined to be invalid. . . . . . [409] The curve represented by quad1 is not a circle. . . . . . . . . .. . . . . . . . . . . . . . . . . . . pt3 } are collinear. . . . —– Circle2D::radius . . . . . . . . . . . . . . . . . . . . . . . . . . . the point cannot be on the line. . . . . . . . r. . . . . . . . . . . . . . . . . . . . . no valid circle exists.. . . . . . .

. . If the line defining the chord passes through the center of the conic. . . . . . . when ρ = 1/2 a parabolic conic arc is created and when 1/2 < ρ < 1 a hyperbolic conic arc is created. a conic arc cannot be constructed. . . . . . . . . . . . the arguments cannot be imaginary. . . . .. . . . . . . . . . . . . . When 0 < ρ < 1/2 an elliptic conic arc is created. . . . . . . . . .. . . . . . . When constructing a conic arc from a line and a conic curve. . . . . . . . —– ConicArc2D::rho . [417] An invalid conic arc of the form cnarc1 has been detected. . . —– ConicArc2D::imaginary . . . . . . . . . . . . . . . . . . If Descarta2D detects an invalid object the $Failed symbol will be returned. . . . . . . . .. . . . . . [417] An invalid conic arc of the form cnarc1 has been detected. . . . . . . . . . . . . . . The three control points defining a conic arc cannot be collinear. . . . . . . . . . . . . . . . . . . a conic arc cannot be constructed. . . . . . . . . . The arguments defining a conic arc cannot be imaginary. . . . . . . . . . . . . . . . . . . . . . . . . . . the control points cannot be collinear. . . . . . . . . . . or it is on opposite branches of a hyperbola. . the line must intersect the conic in two points that form the chord of the conic arc. . . . . The chord of a conic arc cannot pass through the center of a central conic because this configuration is invalid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Descarta2D will return the $Failed symbol whenever the arguments to an object are determined to be invalid. . . —– . . . . . . . . . . . . . . . . [416] An invalid conic arc of the form cnarc1 has been detected. .370 Error Messages ConicArc2D ConicArc2D::center . [419] The chord defined by ln1 passes through the center of crv1 . . —– ConicArc2D::points . . . . . . . . . .. . . . .[419] No chord exists between ln1 and crv1 . . . . . . . . . . . . . . . . . . . . The value of ρ determines the shape and type of the conic arc. . . . . . . . . . . —– ConicArc2D::noChord. If the intersection consists of less than two points. . . . . . . . . . . . . . . . then the $Failed symbol will be returned. . . . the value of rho must be in the range 0<rho<1. Descarta2D will return the $Failed symbol whenever the arguments to an object are determined to be invalid. . . . . . . . . then the $Failed symbol will be returned. . .

. . —– Directrices2D Directrices2D::circular . . . . . .m defines the symbol names associated with each Descarta2D package so that it can be loaded automatically when referenced. . . . . [469] The package ‘D2DMaster2D’ has already been loaded. . . . . . [413] The ellipse ellipse1 is circular. . . . . . . . . . . . . [469] More than one path to ’D2DMaster2D. . . . . . —– . . using path-name. . . The package D2DMaster2D. . . . . —– D2DMaster$2D::tooManyPaths . . . . . . . Tolerance values used to query expressions must be numbers greater than or equal to zero. . . . . . . . . . . .m’ cannot be found. . . . . . . . . . . . . The package D2DMaster2D. . . . . . . . . unable to initialize Descarta2D. subsequent requests to load the file will be ignored and will cause no harm. . . . . The package D2DMaster2D. . . . . . . [431] The tolerance tol is not a valid tolerance specification.. . . . . . . . . . . . . . . . . . . . . . . . . —– D2DMaster$2D::noPath . . . . . . . . . . . . . . . An ellipse whose semi-major and semi-minor axes are equal in length has no (finite) directrix lines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [469] The path to ’D2DMaster2D. This error indicates that the software has found more than one copy of this file and may suggest that the software has not been installed correctly. . . . . . . . . . . .. . . .. . .m defines the symbol names associated with each Descarta2D package so that it can be loaded automatically when referenced. . . . . . . . . . . . . . 10−10 . . . . . . . . will be used. This error indicates that the software has not been installed correctly. . . . . . . . . —– D2DMaster$2D D2DMaster$2D::loaded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .m defines the symbol names associated with each Descarta2D package so that they can be loaded automatically when referenced. . . . . . . . . . the default tolerance. . . . it has no (finite) directrix lines. . . . . . . . . . . . . . . . . . . . . . . . . . . Descarta2D will return an empty list. .m’ was found. . . .Error Messages 371 D2DExpressions2D D2DExpressions2D:badTol . . . . . . . . . . . . . . This file only needs to be loaded once. .

. . . . . . . . . . . . . . . . .372 Error Messages Ellipse2D Ellipse2D::imaginary . . . . . . . . . . . . . . . . —– Ellipse2D::invalid . . . Descarta2D will return the $Failed symbol whenever the arguments to an object are determined to be invalid. . . . . the lengths of the semi-transverse and semi-conjugate axes must be positive. . . . . . .. . . [425] The defining geometry or eccentricity is invalid. . the length of both the semi-major and semi-minor axes must be positive. . . . . . . . . . . . . . . . . . . . . . . . . . . . Descarta2D will return the $Failed symbol whenever the arguments to an object are determined to be invalid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. the eccentricity of an ellipse must be in the range 0<e<1. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . [422] An invalid ellipse of the form ellipse1 has been detected. If imaginary arguments are detected Descarta2D will return the $Failed symbol. . . . [447] An invalid hyperbola of the form hyp1 has been detected. . and the focus cannot lie on the directrix. . . . . . . . . An invalid ellipse was specified and Descarta2D will return the $Failed symbol. . . . . . . . . . . . . . . . . . . . . When constructing an ellipse Descarta2D verifies that both the semi-major and semi-minor axes have positive lengths. . . . . . . . . . . . . . . . . the arguments cannot be imaginary. . . . . . . . . . . . . . . . . . . . . . . . . . . —– Hyperbola2D Hyperbola2D::imaginary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . the arguments of an ellipse cannot involve imaginary numbers. . . . . . . . [423] An invalid ellipse of the form ellipse1 has been detected. . . . . . . . . . . . . —– Ellipse2D::invdef . . . . . . . . . . . . . . the foci and vertices cannot be coincident. —– Hyperbola2D::invalid . . . . . . When constructing an ellipse Descarta2D verifies that none of the arguments involve imaginary numbers. . . . When constructing a hyperbola the arguments cannot be imaginary. . . [447] An invalid hyperbola of the form hyp1 has been detected. . . . .

. Descarta2D will return the $Failed symbol whenever the arguments to an object are determined to be invalid. . . . . . . . . . —– Line2D::invalid . . . . . . . . . . . . . . . . . . . [459] An invalid line of the form ln1 has been detected. . . . . —– Line2D::imaginary . . . cir2 } are concentric. . . . . . . no radical axis exists. . . . —– Line2D Line2D::concentric . . the foci and vertices cannot be coincident and the focus cannot lie on the directrix. . . . . . . . . . . . .. . . . . When specifying the two circles for the construction of a radical axis. . . . . . . . . . . . . . . . Some Descarta2D functions require that their arguments be numeric. . . . . . . These functions will not allow symbolic arguments. . . . . . . . . . symbolic arguments are not allowed. . [408] The circles {cir1 . . .[450] The defining geometry or eccentricity is invalid. . . . . —– IsNumeric2D IsNumeric2D:notNumeric . . . . . . . . . . . . .Error Messages 373 When constructing a hyperbola the lengths of both the semi-transverse and the semi-conjugate axes must be positive. . . . . . . . . . . . . . . . . . . . —– Hyperbola2D::invdef. . . . An invalid hyperbola was specified and Descarta2D will return the $Failed symbol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The arguments defining a line cannot be imaginary. . . . . . . . . . . . . the arguments cannot be imaginary. . . . . . . [432] The funcName function requires numerical arguments. . . . . . . . . . . .. . . . . . . . . . . . . [459] An invalid line of the form ln1 has been detected. . . . . . . . . the eccentricity of a hyperbola must be greater than 1. . . . . . . . . . . . . . . .. . . . . . If Descarta2D detects that an object is invalid the $Failed symbol will be returned. . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . at least one of the first two coefficients must be non-zero. . . . If Descarta2D detects that concentric circles have been specified in the radical axis construction. . . . . . . . . . . . . . . . . . . . . . . . . . it will return the $Failed symbol. . . . . . . . . . . . the two circles cannot be concentric. . . . .

. . . . . . y1 } and {x2 . . . . . . . . . —– Line2D::noPolar . . . . . no valid line can be constructed. . .. . Descarta2D verifies that the point is not coincident with the center of the conic curve represented by the quadratic. . . . . . . . . . . . . . . but its type cannot be determined. .[458] The expression expr cannot be recognized as a linear polynomial or equation in variables x and y. . . . . . . . . . . . . . . . . . . . .374 Error Messages When defining a line at least one of the first two coefficients. . . . . . . the specific conic type cannot be determined. . . Descarta2D will return the $Failed symbol if it detects the coordinates are coincident. . . . [463] Since pt1 is at the center of the conic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . —– Loci2D Loci2D::central . If the point is at the center of the conic represented by the quadratic Descarta2D returns the $Failed symbol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [462] The coordinates {x1 . [468] The eccentricity. . . . . . . Descarta2D will return the $Failed symbol whenever the arguments to an object are determined to be invalid. an empty list will be returned. . When creating the polar line of a quadratic with respect to a point. . . . . . . . . . . . . . . . . . . . . . . . [465] The quadratic is a central conic. . . . . . . . . . . . . . . When converting a polynomial or equation to a line. . . e. y2 } are coincident. . . . . . . . . . . . . . . . . . . . . . no polar line exists. must be non-zero. . . . . . . . . . . . the positions cannot be coincident. . . . —– Line2D::sameCoords . . . . . If the expression is not recognizable Descarta2D returns the $Failed symbol. . . . . . . . . . . . . . . . A or B. . . . . . . . . . . . . . . . When creating a line through a pair of coordinates or a pair of points. . . Due to the nature of the coefficients of the quadratic. . .. . . . —– Line2D::noPoly. the eccentricity must be positive. . . . . . . . . . . . is invalid. . . the expression representing the line must be recognizable as a linear polynomial or equation. . . . . . . . . —– Loci2D::eccentricity . . .

. . . . . . . . . . . . . . . . . —– Parabola2D::invalid. The focal length. .. . . . . . . The arguments of a parabola cannot be imaginary. . . . .Error Messages 375 The eccentricity of a conic must be positive. . . . . —– MedialEquations2D MedialEquations2D::coincident . . . . . . . . . . . . . . . no valid parabola can be constructed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . —– Parabola2D::invptln. . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . —– Parabola2D Parabola2D::imaginary . . . The focus point of a parabola cannot be on the directrix line. . . . .[480] An invalid parabola of the form parabola1 has been detected. . . . . . . . . f . . . . . . . . The equation represented by the quadratic has no real points. . . . . . . . . . . . . . . . . . . . . . . .. . . . —– . . . . . the focal length cannot be zero. . obj2 } are coincident. . . . . . . . . . . . . . . . . . . . . . . . . . . . Descarta2D will return the $Failed symbol whenever the arguments to an object are determined to be invalid. . . . . . . . When two objects are identical the medial points include all the points in the plane and no unique curve locus exists. . . . Descarta2D will return the $Failed symbol whenever the arguments to an object are determined to be invalid. . . of a parabola cannot be zero. . . . . . . .. . . . . . . . .[473] The objects {obj1 . . . . . . . . . . —– Loci2D::noLocus . the $Failed symbol will be returned. . [480] An invalid parabola of the form parabola1 has been detected. . . . . . . . . [465] The quadratic has no real locus. no finite number of medial curves exist. . . . the arguments cannot be imaginary. . . . . When this situation occurs Descarta2D will return an empty list indicating that no unique curves satisfy the geometric constraints specified. . . . . . . . . .[483] The focus pt1 is on the directrix ln1 . . an empty list will be returned. . . . . . . . . . . . . . . . . . . Descarta2D returns the $Failed symbol when it detects an invalid construction. .

. . . .[493] Points {pt1 . . . . . . The Parameters2D function requires that the defining line intersect the curve in two points. . . . . . . . . .. . . . . . . . . . . . . . . . . . . If the line does pass through the center Descarta2D returns the $Failed symbol. . . .[494] No unique intersection point exists. . . . . . . The coordinates of a point cannot be imaginary. .. . pt2 } are coincident and do not define a valid direction. . . . . . . . . . Coincident lines cannot be intersected. . . . . —– Point2D::imaginary . . . . . . . .. . . . . . . . . . . —– Point2D::noDir.376 Error Messages Parameters2D Parameters2D::noChord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . the direction points cannot be coincident. . . . . . . . . . . . . . . . . . . . . . . . . r2 } cannot be zero. . . . . . . . . . . . . no pole point exists. . . . . . —– Point2D Point2D::coincident. . . . . . Descarta2D verifies that the line does not pass through the center of the conic curve represented by the quadratic. . . . . . . . . . Descarta2D will return the $Failed symbol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . If Descarta2D detects an invalid object the $Failed symbol will be returned. . . . . [455] No chord exists between ln1 and crv2 . . . . . . . . . . . . If the line does not intersect the chord. . . . . . . When creating the pole point of a quadratic with respect to a line. . . . . . . . . . . . . . lines ln1 and ln2 are coincident. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Descarta2D will return the $Failed symbol if it detects an attempt to intersect coincident lines. . . . . . . . . . . . . . . . . . . —– Point2D::noRatio . . . . . the coordinates of a point cannot be imaginary. . . . . . . . . When defining a point that is offset in a direction specified by two points. . —– Point2D::noPole . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [493] The sum of the ratio numbers {r1 . . . . . . . . . . . . . . . . . . . [490] An invalid point of the form pt1 has been detected. . . . . . . . . Descarta2D returns the $Failed symbol if the two points are coincident. . . . . . . . . . . . . . . . [494] Since ln1 passes through the center of the conic. . . . .

. . . lines ln1 and ln2 are parallel.Error Messages 377 When defining a point that divides a segment into a given ratio. . . . . [494] No intersection point exists. . The conic underlying a conic arc is not a central conic and has no center point. . . . . . . . . . . . . . . . . . . . . . —– Quadratic2D::eccentricity . . . . . . . . . . . . . . . .. it has no center point. . . . . . . . . . . . . . . . . . . . . —– . . . . . . . . . . it has no center point. . . . . . . . . . . . . . . . . Descarta2D will return the $Failed symbol. Descarta2D will return the $Failed symbol if the ratio numbers are invalid. . . [419] The conic underlying cnarc is not a central conic. . a line and an eccentricity. . . . . . . . . . . . . Descarta2D will report an error if the eccentricity is not positive and return the $Failed symbol. . . . . . . . . . . . —– Point2D::notCentral. . . . . . . . . . . . . When constructing a quadratic pencil from four points. . . . . . . . Descarta2D will return the $Failed symbol. . . . . . . . . . . . . . . . . the ratio numbers r1 and r2 cannot sum to zero. . When defining a quadratic using a point. . . . . . . . . The quadratic is not a central conic and has no center point. . Parallel lines cannot be intersected. . . . . . . . . . . —– Point2D::parallel . . . . . . —– Quadratic2D Quadratic2D::coincident . . . . . . . . . . —– Point2D::notCentral1 . . . . . . Descarta2D will return the $Failed symbol if its detects an attempt to intersect parallel lines. . . . . . . . .[494] quad is not a central conic. . . . . . . . the eccentricity must be positive. . . . . . . . . . . . . . . . . . . . . . . . The $Failed symbol with be returned if any pair of points is detected to be coincident. . . . [502] The eccentricity e is invalid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [487] Two or more of the points are coincident.. . no pair of points may be coincident. . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . no valid quadratic pencil exists.

. . . . . . . . . the arguments cannot be imaginary. . . . . . . . .[499] A non-positive focal chord length. . The arguments defining a quadratic cannot be imaginary. . . . . . . . . The $Failed symbol is returned whenever the arguments to an object are determined to be invalid. .[500] The expression expr cannot be recognized as a quadratic polynomial or equation in variables x and y. —– Quadratic2D::invLen. . . . . . . . . at least one of the first five coefficients must be non-zero. . . Descarta2D will return the $Failed symbol if an invalid length is specified. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The length of a conic’s focal chord must be positive. . . . . . . . . . . . . . . . . . . . . . . . . . .. . . is invalid. —– . . . . . . . . . . . . . . . When converting a polynomial or equation to a quadratic. —– Quadratic2D::noPoly. . . . . . . . . . . . . . . no valid quadratic can be constructed. . . . . . . . . . . . . . . . . . . [498] An invalid quadratic of the form quad1 has been detected. . . . . . is invalid. . . . . . . . . . expr1 . . . . . . . . . . . . . . If Descarta2D detects that an object is invalid the $Failed symbol will be returned. . . . . . . . . . .[499] A negative eccentricity. . . . . . —– Quadratic2D::invEcc. . . . . . . . .. . . . . expr1 . . . . . If the expression is not recognizable Descarta2D returns the $Failed symbol. . . At least one of the first five coefficients of a quadratic must be non-zero. . . . . . . . . . Descarta2D will return the $Failed symbol if an invalid eccentricity is specified. . . . . . . . . . . . . . . . . . . . . . .. . . . . the expression representing the quadratic must be recognizable as a quadratic polynomial or equation. . . . . . . . . . . . . . . . . . . . . . [461] An invalid quadratic of the form quad1 has been detected. no valid quadratic can be constructed. . . . . . . . . . —– Quadratic2D::invalid . . . . . . . . . . . . .378 Error Messages Quadratic2D::imaginary .. . . . . . . . . . . . The eccentricity of a conic must be non-negative. . . . . . . . . . . . . .

. . . . . . . . . . . . . —– Segment2D::invalid . —– Sketch2D::notReal . . . . . . . . . . . . . . . the arguments cannot be imaginary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . the defining coordinates cannot be coincident. . . In order to be valid. . . . .Error Messages 379 Segment2D Segment2D::imaginary . . . Descarta2D will output the Sketch2D::noObj message to indicate no graphical output will be plotted. . . . . . . . . [512] Setting CurveLength2D→ n1 is invalid. . . . . . . . . . . . . . [506] An invalid line segment of the form lnseg1 has been detected. . Descarta2D will return the $Failed symbol whenever the arguments to an object are determined to be invalid. . The current value of the CurveLength2D parameter will be retained. . . . . . . . . . . . . . . . . —– Sketch2D::noObj . . . . . . . . . .. . . . . A line segment with imaginary arguments has been detected. . . [506] An invalid line segment of the form lnseg1 has been detected. . . . . . . . —– . . ‘CurveLength2D’ must be positive. . . . —– Sketch2D Sketch2D::invalidLength . . . . Such objects cannot be plotted and will not be included in the graphics that are displayed. . . . . . . . . they cannot be coincident. . . . . . . . . . . . . . . .. . . . . . . . . . [513] No valid objects to sketch. . . . . . . . . . . . . . . . . . . . . . . . If there are no valid geometric objects in the list of objects to sketch. . . . Descarta2D will return the $Failed symbol whenever the arguments to an object are determined to be invalid. . . . . . . . . . . . . . . . . . a line segment must have two distinct end points. . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . When using the Mathematica SetOptions command. When plotting objects using the Sketch2D command. . . . the current value of CurveLength2D→ n2 will be retained. . . . . . . . . . . . . . . . . . . Descarta2D will count the number of objects that have symbolic arguments. any attempt to set the CurveLength2D parameter of the Sketch2D function to a non-positive value will be rejected. . . . . . . . . . . . . . . . . . . . . . . . . . . . [513] n object(s) cannot be sketched. .

. . . . . . . Such solutions will not be returned. . . . . . set the alternate solution option to logical to compute the other configuration. . . . When solving a system of equations some solutions may exist in which the solutions are interrelated functions of each other. . . . . .. . . . An empty list of solutions will be returned if the maximum time elapses before a solution is found. . . . . . . The logical will either be True or False indicating the setting required to produce the alternate configuration. . . . . . . . . . [550] Two valid solutions exist for this configuration. . . . . . —– . . . . . . . . To increase the maximum time allowed use the SetOptions command. . . . . . . . . . [516] An infinite number of solutions exist.380 Error Messages Solve2D Solve2D::infinite . . . . . . . . —– Solve2D::time . . . . . . Descarta2D will display this warning if more than one solution is valid. When setting the MaxSeconds2D option of the Solve2D command. the option value must be positive. . . . . . . . . an empty list of solutions will be returned. . . . . . . . . . . . . . . . . . . . . . . . . . . [516] The equations could not be solved in MaxSeconds2D->n1. . . . . . . . . only independent solutions will be returned. . . . . . . . . . . . . . . . . . . . . . . . . . . [516] Option MaxSeconds2D->n1 is invalid. . . . will set the time limit to 60 seconds. . . . . . . . . . . . . . . . . . . . . SetOptions[Solve2D. . . . —– Solve2D::invalidTime . . . . . . . . . . .. . . . . . . . using approximate numbers may produce a more complete list of solutions. . . . . . . . MaxSeconds2D->60]. . . . . . . . . . . . . Some equations are too complex to be solved in the time allowed by the Descarta2D Solve2D command. . the current value of MaxSeconds2D->n2 will be retained. . . . . . . . . . . . . . For example. . . . . . . . . . . . . . . . —– SolveTriangle2D SolveTriangle2D::ambiguous . ’MaxSeconds2D’ must be positive. . When computing a triangle configuration. . . . . .. . . . . . . . . . . . . . . .

. . . . . . . . . . When constructing a tangent conic from defining points. . . a valid configuration with the triangle’s perimeter arbitrarily set to 1 will be computed. . . —– SolveTriangle2D::invConfig . . no triple of three points may be collinear. . . . . . . . . . . . . . . . . all of the points must be unique.Error Messages 381 SolveTriangle2D::anglesOnly . —– TangentConics2D::collinear . . . . . . . . . . . . . . When computing a triangle configuration consisting of angles only. . . . . . . . . no proper conic can be constructed. . . . . . . . . if any of the points are coincident. . . . . . . . . . . [523] Two or more of the defining points or lines are coincident. . . . . . .. . . . . . . [523] Three or more of the defining points are collinear. . . . [548] The triangle configuration is under-constrained. . . three constraints are expected. An invalid triangle configuration has been specified. . . . . . . . . . . . . . . . . . . When constructing a tangent conic from defining points. . . . . . . . no triangle can be constructed. . Descarta2D will return $Failed. . . . . Descarta2D will return $Failed if a configuration is under-constrained. . . if any triple is collinear Descarta2D will return an empty list. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [549] The triangle configuration is under-constrained. . . . . . . . . —– TangentConics2D TangentConics2D::coincident . . . . . . . . . . . . .. . . . At least three parameters are needed to compute a triangle configuration. . . . . . . . . . .. . . . . . . . —– . . . . . . . .. . . . . . . . . . . . . . Descarta2D will return an empty list. . . . . . . . no proper conic can be constructed. . . . . . . . . . . . . . . . . . Descarta2D will display this warning to indicate that the length of the sides are arbitrarily set. . . —– SolveTriangle2D::constrain . . . . being correct for the given angles. . . . . . . . . . . . . . . . . . . . . . . . .. . . . . [547] The configuration of sides and/or angles specified is invalid. . . .

. . . The scale factor. . . . . . —– Transform2D Transform2D::invalidScale . . . . Descarta2D will return the $Failed symbol if a non-positive scale factor is specified. [523] Three or more of the tangent lines are concurrent. . . Descarta2D will return an empty list. . . . no proper conic can be constructed. . . . . no triple of lines can be parallel. . . . . . . . . . s. . . . . . . . . . . . . if any line has more than one point one it. . . . . . . each line can have at most one point on it. . if any triple is concurrent Descarta2D will return an empty list. . . [523] Two or more of the points are on a tangent line. . . . . . . . When constructing a tangent conic from defining lines. . . . . . . . . . . . . . . . . . . . . . . . . . . . [523] Three or more of the defining lines are parallel. . . . . . . . . . . .. . . . . . . . . —– TangentConics2D::linesThru . . . . no proper conic can be constructed. . —– TangentConics2D::parallel . . . . . . . . .382 Error Messages TangentConics2D::concurrent . . When constructing a tangent conic from points and lines. —– TangentConics2D::pointsOn . . if any point is on more than one line. . . . . . . . . . . . . . . . . . no proper conic can be constructed. . . . . . . . . . each point is allowed to be on at most one of the tangent lines. . Descarta2D will return an empty list. . . . . . . . . . . . . . . . . [523] One of the points is on more than one of the tangent lines. . . . . . . . . . . . . . . . . . . . . . . . . . no triple of lines can be concurrent (meet in a point). . . . . . . . . . . . . . if any triple is parallel Descarta2D will return an empty list. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [542] The scale factor s is invalid. no proper conic can be constructed. . .. . . . . . . . for a scaling transformation must be positive. . . . When constructing a tangent conic from points and lines. . . . . . . . When constructing a tangent conic from defining lines. . . . . . . . . . . —– . . . . the scale factor must be positive.

. —– . the arguments cannot be imaginary. . . the lines must intersect in three distinct points. . . . . . Descarta2D will return the $Failed symbol whenever the arguments to an object are determined to be invalid. . —– Triangle2D::noTriangle . . . . . . . . . . . . . . . . . . .Error Messages 383 Triangle2D Triangle2D::imaginary . . . . . . . . —– Triangle2D::invalid. . . . . . . . . . . . . . Descarta2D will return the $Failed symbol whenever the arguments to an object are determined to be invalid. . . . . . .. . . no triangle exists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Descarta2D will return the $Failed symbol. . . . If any pair of lines are parallel. or the three lines are concurrent. . . . . . . . . . . . . . . . The vertex points of a triangle cannot be collinear. . . . . . . ln3 } are parallel. . . . . . . . . . . . or the three are concurrent. .[546] An invalid triangle of the form triangle1 has been detected. . . . . . . . . The arguments of a triangle cannot be imaginary. . . . . . . . . . . . When defining a triangle by three lines. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . [553] Two of the lines {ln1 . . . . [546] An invalid triangle of the form triangle1 has been detected. ln2 . . . . the vertex points cannot be collinear. . . . . .

.

Part VII Packages .

.

B] is the standard form of an arc with start point (x0. "D2DLine2D‘".". to half the chord length.{x1.y0). D2DArc2D::usage= "D2DArc2D is a package that implements the Arc2D object. "D2DMaster2D‘". Description Representation Arc2D[{x0. "D2DExpressions2D‘". {x1 .". "D2DSketch2D‘". {"D2DCircle2D‘". The second argument is a list of coordinates representing the end point of the arc. Initialization BeginPackage["D2DArc2D‘". The arc is traversed counter-clockwise from P1 to P2 .y1) and positive bulge factor ’B’. "D2DPoint2D‘". end point (x1. h.y1}. "D2DNumbers2D‘". 387 . Begin["‘Private‘"]. "D2DGeometry2D‘". so B = 2h/d. Complement2D::usage= "Complement2D is a keyword required in Arc2D[arc. y0 }. y1 }.y0}. B > 0. d/2. "D2DTransform2D‘"}]. The first argument is a list of coordinates representing the start point of the arc.D2DArc2D The package D2DArc2D implements the Arc2D object. B] Standard representation of an arc in Descarta2D. Complement2D]. The bulge factor is the ratio of the arc’s height. The third argument is a scalar representing the bulge factor of the arc.".". Arc2D::usage= "Arc2D[{x0. Bulge2D::usage= "Bulge2D[arc] returns the bulge factor of an arc.

y0}.x1. Circle[Coordinates2D[Arc2D[{x0.". Angle2D[Arc2D[{x0.y0}.$Failed) /.B]]) /.0]). SetDisplay2D[ Arc2D[{x0_.{x1. y0 }.{x1.B].B].y1_}. k+(x0-h)*Sin[beta*t]+(y0-k)*Cos[beta*t]}].{x1. {x1 .{x1.y0}.y0_}.y1}. If the imaginary parts are insignificant.x1.y0.x1.y0.y1}. {x1 . y1 }.{x1._Pattern] && IsComplex2D[{x0.Description Evaluation Arc2D[{x0.{x1.{x1_. .k. Circle[Coordinates2D[Arc2D[{x0.y0}.y0}. {h.B_][{t1_?IsScalar2D. SetDisplay2D[ Arc2D[{x0_. y1 }.t2]}]] ].B}]).beta}.x1.y1}.t1].y1}.y1_}. Arc2D::imaginary= "An invalid arc of the form ’Arc2D[‘1‘. B] Detects an arc with imaginary arguments and returns the $Failed symbol.B]]] ] Validation Arc2D[{x0.y0}.B]].y1}.y0. the arguments cannot be imaginary.{x1_.B}.y1}. Arc2D[{x0_.{x1_.y0}.y1_}. PrimaryAngleRange2D[Arc2D[{x0.{x1. y}.t2_?IsScalar2D}]. Radius2D[Arc2D[{x0.388 D2DArc2D .y1_}.y1}.B].y1}. arc=Arc2D[{x0.y0_}. and returns a list of coordinates {x. ‘2‘.y1.y1. Graphics Provides graphics primitives for an arc by extending the Mathematica Display command. (FreeQ[{x0. Parameters in the range 0 ≤ t ≤ 1 cover the complete span of the arc.y1_}.B_][t_?IsScalar2D] := Module[{arc.B}.B]. ‘3‘]’ has been detected.y0}. B][t] Evaluates an arc at a parameter value.y0_}.{x0.y0_}. t. beta=Angle2D[arc].B]].B_] := (Message[Arc2D::imaginary. Arc2D[{x0_.y1}.{x1_.y0.y1}. PrimaryAngleRange2D[{ Angle2D[Arc2D[{x0._Pattern] && IsTinyImaginary2D[{x0.h.k}=Coordinates2D[arc]. Arc2D[{x0_.y1.y0}.B]].y1.{x1.{x1.{x1_.B}.B_] := (Arc2D @@ ChopImaginary2D[Arc$2D[{x0.B]]. Executed when the package is loaded.y0}. y0 }. {h+(x0-h)*Cos[beta*t]-(y0-k)*Sin[beta*t].y0_}. Radius2D[Arc2D[{x0. they are removed.{x1.B_]. (FreeQ[{x0.

y1_}. Arc2D[{x0_.y0_}.{x1.k}=Coordinates2D[A].y0}.t_?IsScalar2D] := Module[{h.y0. and Angle2D[arc. t] Computes the angle between a line through the arc center parallel to the +x-axis and a line through a point at a parameter value. Arc2D[{x0_. Detects an arc with a zero bulge factor and returns the Arc2D::invalid= "An invalid arc of the form ’Arc2D[‘1‘.{x1.y0}.x1.{x1. B] Detects an arc with a negative bulge factor and returns an arc with the defining points interchanged and the positive bulge factor. Scalars Angular Span of an Arc Angle2D[arc] Computes the angular span of an arc.{x0. {x1 . y1 }.B].yt}=A[t].y1_?IsScalar2D}.{x1_.{x1_. t.y1_}.$Failed) /. θ2 .x1.y1_}.yt-k] ]. y1 }.y0_}.y1}. Angle2D[arc. (FreeQ[{x0.y1_}. ArcTan[xt-h. {x1_?IsScalar2D.B_?IsNegative2D] := Arc2D[{x1.yt}._Pattern] && IsZero2D[Distance2D[{x0. Angle at Parameter on an Arc Angle2D[arc. B_?IsScalar2D]] := True. ‘2‘.y0}.y1.B_] := (Message[Arc2D::invalid.y1. Arc2D[{x0. Angle2D[A:Arc2D[{x0_. Angle2D[Arc2D[{x0_. B] returns the $Failed symbol. IsValid2D[arc] Returns True for a syntactically valid arc. 0] gives the start angle.$Failed) /. the bulge factor must be positive and the defining points must be distinct.B}. (FreeQ[{x0. 1] gives the end angle.y0}.y0_?IsScalar2D}.Scalars 389 Arc2D[{x0.-B].y1}]]).{x0.B].{x1_. y0 }.{x1_.y0_}.". Arc2D[{x0.0]).y0. Detects an arc whose defining points are coincident and Arc2D[{x0_. IsValid2D[Arc2D[{x0_?IsScalar2D.y0_}.B_] := (Message[Arc2D::invalid.B_]. {xt. For example.{x0.k.D2DArc2D . y0 }.y1_}. The result is returned in radians. {x1 . {h.xt.y1}. y1 }. . y0 }.{x1_. B] $Failed symbol.y1}.B}._Pattern] && IsZero2D[B. θ1 . {x1 . on the arc.y0_}. ‘3‘]’ has been detected.B_]] := 4*ArcTan[B].

y1}.Transformations Bulge Factor of an Arc Bulge2D[arc] Returns the bulge factor of an arc. The arc is traversed counterclockwise from the first angle to the second. ArcTan[x1-h.yc}].k}.L:Line2D[a_.c_]] := Arc2D[Reflect2D[{x1. Rotate2D[Arc2D[{x0_.y0_}.theta.B_]] := Module[{h.{x1_.B_].390 D2DArc2D .y0_}. coords] Rotates an arc by an angle θ about a position given by a coordinate list.{x1_. Reflect2D[Arc2D[{x0_.y1_}.L]. Radius2D[Arc2D[{x0_.y1}.yc_?IsScalar2D}] := Arc2D[Rotate2D[{x0. {h. it defaults to the origin (see D2DTransform2D.nb). If the third argument is omitted. {xc_?IsScalar2D.k}=Coordinates2D[A].b_. Bulge2D[Arc2D[{x0_.{x1_.B_].y0_}.{x1_. Transformations Reflect Reflect2D[arc. Primary Angle Range PrimaryAngleRange2D[arc] Computes a list of two primary angles measured counterclockwise from the +x-axis to the defining points of an arc.theta.y0_}.{xc.y0_}. Rotate2D[{x1.y1-k]}] ].y1_}.y1_}. Radius of an Arc Radius2D[arc] Computes the radius of an arc.y0}.B].B_]] := B. . PrimaryAngleRange2D[{ArcTan[x0-h.y1_}.y1_}.L].y0-k]. Rotate Rotate2D[arc. line] Reflects an arc in a line. PrimaryAngleRange2D[A:Arc2D[{x0_.{x1_.{xc. θ.theta_?IsScalar2D.B].y0}.Reflect2D[{x0.yc}].B_]] := Sqrt[(x0-x1)^2+(y0-y1)^2]*(B+1/B)/4.

yc}].y0_}. coords] Scales an arc from a position given by coordinates. s.D2DArc2D . {xc_?IsScalar2D. v}] Translates an arc delta distance. Translate Translate2D[arc. Scale2D[{x1.B_]. Construction Center Point of an Arc Point2D[arc] Constructs the center point of the arc.y0_}.y0_}.1/B].s. {u_?IsScalar2D.B_]] := Module[{K}.Radius2D[A]]. .B_]] := Circle2D[Coordinates2D[A].(y0+y1)/2-K*(x0-x1)}] ].s_?IsScalar2D. Not[IsZeroOrNegative2D[s]]. Circle2D[A:Arc2D[{x0_.nb).{x0.y1_}.v_?IsScalar2D}] := Arc2D[{x0+u.{xc.{x1_.y0_}. If the position is omitted.y0}.Construction 391 Scale Scale2D[arc.y1}. it defaults to the origin (see D2DTransform2D. {u. Point2D[{(x0+x1)/2+K*(y0-y1).y1}.{x1_.{x1+u.{x1_.s.y1+v}.B] /.y0}.{x1_. Translate2D[Arc2D[{x0_. Complement2D] Constructs an arc that is the complement of a given arc. K=(1/B-B)/4. Complement Arc Arc2D[arc.y0_}. Scale2D[Arc2D[{x0_.yc}].y1_}.{xc.B_].{x1_.y1_}.y0+v}.y1_}. Arc2D[Arc2D[{x0_. Point2D[Arc2D[{x0_.B_]. Circle from Arc Circle2D[arc] Constructs the circle associated with an arc.y1_}.B].Complement2D] := Arc2D[{x1.yc_?IsScalar2D}] := Arc2D[Scale2D[{x0.

The angle is positive for counter-clockwise arcs and negative for clockwise arcs.p1]. H=Distance2D[(p0+p1)/2.Construction Arc from Center Point. Arc2D::invalidRadius= "The radius. p1=Circle2D[c. {t0_?IsScalar2D. {t0_?IsScalar2D.392 D2DArc2D .B] ]. The angle cannot be an integer multiple of π radians. the entry angle cannot be an integer multiple of Pi radians.t1_?IsScalar2D}] := (Message[Arc2D::invalidSpan]. r_?IsScalar2D.". Arc2D::invalidCoincident= "The defining points are coincident.B}. the span cannot be an integer multiple of 2Pi radians. Arc2D::invalidEntryAngle= "The entry angle of the arc is invalid.pm. Arc2D[Point2D[c:{h_.k_}].r][T1]. Radius and Span Arc2D[point.t1_?IsScalar2D}] := Module[{T0. the radius must be positive.Circle2D[c. .$Failed) /.". ‘1‘. r. The arc is defined counter-clockwise from the start point associated with θ1 to the end point associated with θ2 . Arc2D[Point2D[c:{h_. r_?IsZeroOrNegative2D. Arc2D[p0.d. point] Constructs an arc from the start and end points and the angle between the chord and the entry vector.H. B=2*H/d.t1}].t1_?IsScalar2D}] := (Message[Arc2D::invalidRadius.". IsZero2D[Distance2D[Circle2D[c. pm=Circle2D[c.".p1. p0=Circle2D[c.k_}]. θ}.r][t1]]].r]. an arc cannot be constructed. d=Distance2D[p0.p0. {θ1 .pm].p1. {t0_?IsScalar2D.r][t0]. r_?IsScalar2D. Arc2D[Point2D[c:{h_. θ2 }] Constructs an arc from a center point.r][(T0+T1)/2].k_}]. of the arc is invalid. radius and angular span range. Arc from Defining Points and Entry Angle Arc2D[{point.T1.r][T0].$Failed). {T0. Arc2D::invalidSpan= "The angular span of the arc is invalid.T1}=PrimaryAngleRange2D[{t0.

k_}]. The private function Minor$2D is the 2D vector cross-product.Construction 393 Arc2D[{P0:Point2D[p0:{x0_. r.r_?IsScalar2D. Message[Arc2D::invalidEntryAngle].c.y1-k]}] ] . Message[Arc2D::invalidRadius. B=s/(c+Sqrt[c^2+s^2]). Message[Arc2D::invalidCoincident]. P1:Point2D[p1:{x1_.k}].$Failed. Pon:Point2D[pon:{xon_. True.$Failed. point. point] Constructs an arc through three points.B}. c=Dot[pon-p0. respectively.y1_}]}] := Which[ IsZeroOrNegative2D[r].B]] ]. and the second point is a general point on the arc.A_?IsScalar2D}.yon_}].p1.p1. Which[ IsCollinear2D[P0. The ray end points do not have to be on the arc.P1].p1-pon]. an arc cannot be constructed.{u2_. Arc2D[P:Point2D[{h_. Message[Arc2D::invalidCoincident].$Failed. Radius and Ray End Points Arc2D[point.$Failed.r. True. Arc2D[P0:Point2D[p0:{x0_. The first and the third points are the start and end points of the arc. but they cannot be coincident with the center point.y0_}].D2DArc2D .$Failed. True. Arc2D[p0.Pi]]. IsCoincident2D[P0.y0_}].Pon. Arc2D::invalidCollinear= "The three defining points are collinear.P1]. {point.v2_}] := u1*v2-u2*v1.p1-pon]. Arc2D[p0. Arc2D[Point2D[{h.y0-k].Tan[A/2]] ]. {ArcTan[x0-h. P1:Point2D[p1:{x1_.r]. {P0:Point2D[{x0_. point}] Constructs an arc given the center point.y1_}]] := Module[{s.P1]. s=Minor$2D[pon-p0. Arc from Center.y1_}]] := Which[ IsZero2D[PrimaryAngle2D[A. Message[Arc2D::invalidCollinear]. radius and ray end points.".y0_}]. Minor$2D[{u1_.v1_}.ArcTan[x1-h.P0] || IsCoincident2D[P. Arc from Three Points Arc2D[point.P1:Point2D[{x1_. IsCoincident2D[P.

394 D2DArc2D . (* end of "‘Private" *) EndPackage[ ]. (* end of "D2DArc2D‘" *) .Epilogue Epilogue End[ ].

"D2DConicArc2D‘".".".D2DArcLength2D The package D2DArcLength2D provides functions for computing the arc length of Descarta2D objects.". "D2DExpressions2D‘". "D2DCircle2D‘". Begin["‘Private‘"]. {"D2DArc2D‘".t1}] computes the arc length of a curve between two parameters. "D2DSegment2D‘". "D2DParabola2D‘". Span2D::usage= "Span2D[arc] computes the span (arc length) of an arc.". "D2DEllipse2D‘". 395 . "D2DLine2D‘". Circumference2D[ellipse] computes the circumference of an ellipse. "D2DTriangle2D‘"}]. Perimeter2D::usage= "Perimeter2D[triangle] computes the perimeter of a triangle. D2DArcLength2D::usage= "D2DArcLength2D is a package for computing the arc length of curves.{t0. ArcLength2D::usage= "ArcLength2D[curve. Initialization BeginPackage["D2DArcLength2D‘". "D2DHyperbola2D‘". "D2DGeometry2D‘". Circumference2D::usage= "Circumference2D[circle] computes the circumference of a circle. N[Span2D[cnarc]] numerically computes the span (arc length) of a conic arc.". Arc Length Arc Span2D[arc] Computes the arc length of a complete span of an arc. "D2DNumbers2D‘".

r*(T2-T1) ].{xA_.Arc Length Span2D[A:Arc2D[{x0_.y1_}.t2_?IsScalar2D}].n_] := NArcLength$2D[C1.$MachinePrecision] /.T2}.y1_}. Conic Segment Span2D[cnarc] //N Computes the arc length of a complete span of a conic arc numerically.t2_?IsScalar2D}]] := NArcLength$2D[C1.T2}. {T1. IsNumeric2D[{C1.y0_}.y1_}.{x1_.y1_}. ArcLength2D[A:Arc2D[{x0_. θ2 }] Computes the arc length of a circle between two parameters.t2_?IsScalar2D}] := Module[{T1. {θ1 .t2}. {θ1 .y0_}. Radius2D[A]*(T2-T1) ]. {t1_?IsScalar2D.n] /.{t1.{0.ArcLength2D]. θ2 }] Computes the arc length of an arc between two parameters.yA_}.t1]. {theta1.yA_}.1}.p_]]. θ2 }] //N parameters numerically.ArcLength2D]. N[Span2D[C1:ConicArc2D[{x0_.{xA_.396 D2DArcLength2D .t1.{x1_. {T1. ArcLength2D[cnarc. Circumference2D[Circle2D[{h_. IsNumeric2D[C1.{t1_?IsScalar2D.p_].T2}=PrimaryAngleRange2D[{Angle2D[A.k_}.yA_}.theta2}.t2}. .Span2D].r_]. N[ArcLength2D[C1:ConicArc2D[{x0_.y1_}.t1.Angle2D[A.y0_}. Circle Circumference2D[circle] Computes the circumference of a circle.t2_?IsScalar2D}] := Module[{T1.y0_}. IsNumeric2D[C1.theta2}=PrimaryAngleRange2D[A]. {t1_?IsScalar2D. IsNumeric2D[{C1. ArcLength2D[Circle2D[{h_. N[Span2D[C1:ConicArc2D[{x0_.1}.k_}. ArcLength2D[circle. {θ1 .p_].T2}=PrimaryAngleRange2D[{t1.{x1_.t2}.t2}. Radius2D[A]*(theta2-theta1) ].{x1_.{t1.B_]] := Module[{theta1. {t1_?IsScalar2D. n_] := NArcLength$2D[C1. Computes the arc length of a conic arc between two N[ArcLength2D[C1:ConicArc2D[{x0_.yA_}.{xA_.{x1_.p_]]] := NArcLength$2D[C1.$MachinePrecision] /.t2]}].t2}].n] /.Span2D].{0. ArcLength2D[arc.y0_}.{x1_.y1_}.r_]] := 2*Pi*r.{xA_.B_].y0_}.

. Line ArcLength2D[line.{0.k_}.L] ]. {t1 . ArcLengthHyperbola$2D[Hyperbola2D[{h_.b_.1+a^2/b^2]]. If[IsNegative2D[L].a_.{0.t1}].theta_].1-a^2/b^2]-EllipticE[T1.b_. Computes the arc length of an ellipse between two para- ArcLength2D[Ellipse2D[{h_.k_}. {T1.L}. The result may be positive or negative.c_]. Computes the arc length of a hyperbola between two ArcLength2D[H1:Hyperbola2D[{h_. Circumference2D[E1:Ellipse2D[{h_. Line Segment ArcLength2D[lnseg. θ2 }] parameters.theta_]] := ArcLength2D[E1. ArcLength2D[ellipse.t2}]ArcLengthHyperbola$2D[H1.Arc Length 397 Ellipse Circumference2D[ellipse] Computes the circumference of an ellipse.t2}]. t}] computes the arc length of a hyperbola between parameter values 0 and t.b_. {0.D2DArcLength2D . The function Length2D[lnseg] computes the length of a complete line segment (defined in package D2DSegment2D). L=ArcLengthHyperbola$2D[H1. t2 }] Computes the arc length of a line segment between two parameters.-L. {t1 . Hyperbola The private function ArcLengthHyperbola$2D[hyperbola.a_.L] ].t_}] := Re[-I*b*EllipticE[I*ArcCosh[Sqrt[a^2+b^2]/a]*t.a_. L=t2-t1.theta_].T2. {θ1 . ArcLength2D[hyperbola. If[IsNegative2D[L].{0. L=b*(EllipticE[T2.1-a^2/b^2]).b_. depending on the value given for t.b_.2Pi}]. {t1_?IsScalar2D. {θ1 . {t1_?IsScalar2D. ArcLength2D[Line2D[a_.k_}.t2_?IsScalar2D}] := Module[{L}.theta_].{0. θ2 }] meters.{t1_?IsScalar2D.t2_?IsScalar2D}] := Module[{L}.-L.T2}=PrimaryAngleRange2D[{t1.k_}. If[IsNegative2D[L].-L. t2 }] Computes the arc length of a line between two parameters.t2_?IsScalar2D}] := Module[{T1.a_.L] ].

t2_?IsScalar2D}] := Module[{S1=Sqrt[1+t1^2]. specifies the numerical precision.{x1_. {Dx.S2=Sqrt[1+t2^2]}. Epilogue End[ ]. L=f*( (S2*t2+Log[2*f^2(S2+t2)]) (S1*t1+Log[2*f^2(S1+t1)]) ). If[IsNegative2D[L].obj[t]].y1_}]. {t1 .L] ].{t1_. If[IsNegative2D[L].L}.-L. The function uses numerical integration.t1.Epilogue ArcLength2D[Segment2D[{x0_. Parabola ArcLength2D[parabola.t]&.t_].y2_}. t2 }] numerically computes the arc length of a parametric curve between two parameter values.t2_?IsScalar2D}] := Module[{L}.y1_}.398 D2DArcLength2D . n.n_] := Module[{t. so the arguments of the function must be numerical.y3_}]] := Sqrt[(x1-x2)^2+(y1-y2)^2]+ Sqrt[(x1-x3)^2+(y1-y3)^2]+ Sqrt[(x2-x3)^2+(y2-y3)^2]. Computes the arc length of a parabola between two ArcLength2D[Parabola2D[{h_.f_. (* end of "D2DArcLength2D‘" *) .{x2_. (* end of "‘Private" *) EndPackage[ ]. Perimeter2D[Triangle2D[{x1_.-L. L=NIntegrate[Sqrt[Dx^2+Dy^2]. NArcLength$2D[obj_.t2_}. {t1_?IsScalar2D.-L.Dy.{t.L] ]. t2 }] parameter values.y0_}.k_}. Triangle Perimeter2D[triangle] Computes the perimeter of a triangle. {t1_?IsScalar2D.t2}. The third argument. L=(t2-t1)*Sqrt[(x0-x1)^2+(y0-y1)^2]. Arc Length (Numerical) Parametric Curves The private function NArcLength$2D[curve. {t1 .Dx.Dy}=Map[D[#. If[IsNegative2D[L].{x3_.L] ].WorkingPrecision->n].

{"D2DArc2D‘".y1_}.t2}] computes the area of a sector of an object.".PrimaryAngleRange2D[A]]. "D2DExpressions2D‘". "D2DTriangle2D‘"}]. Area2D[A:Arc2D[{x0_.".{t1. "D2DPoint2D‘".{x1_. Area2D::usage= "Area2D[object] computes the area of a closed object".{t1. "D2DCircle2D‘". Begin["‘Private‘"]. D2DArea2D::usage= "D2DArea2D is a package for computing areas.t2}] computes the area of a segment of an object.B_]] := SegmentArea2D[Circle2D[A]. SegmentArea2D::usage= "SegmentArea2D[object. "D2DConicArc2D‘". 399 . SectorArea2D::usage= "SectorArea2D[object. "D2DLine2D‘". "D2DEllipse2D‘". "D2DNumbers2D‘". "D2DGeometry2D‘". Areas Associated with an Arc Area Area2D[arc] Computes the area between an arc and its chord.D2DArea2D The package D2DArea2D computes areas associated with Descarta2D objects. Initialization BeginPackage["D2DArea2D‘".".y0_}. "D2DParabola2D‘". "D2DHyperbola2D‘".

k_}.p_]] := Module[{b.t2}].d. {θ1 .{d1_.{a1_. IsZero2D[p-1/2].400 D2DArea2D . Area2D[ConicArc2D[{0.0}.T2. θ2 }] parameters.0}. {r->Sqrt[-1+2p].t2}]. Area2D[ConicArc2D[{0. {T1. Sector Area SectorArea2D[circle.d->Sqrt[d1^2]}] /. Computes the area of a circle segment defined by two SegmentArea2D[Circle2D[{h_. the second case is for ellipses and hyperbolas. A=d*b/3.Areas Associated with a Conic Arc Areas Associated with a Circle Area Area2D[circle] Computes the area of a circle.t2_?IsScalar2D}] := Module[{T1.A] ] /. {θ1 . Computes the area of a circle sector defined by two SectorArea2D[Circle2D[{h_.r_].t2_?IsScalar2D}] := Module[{T1. Not[IsZero2D[p-1/2]].-A. b*d*p*(p*r+(-1+p)^2*Log[(1-p)/(p+r)])/(2*r^3) //.{t1_?IsScalar2D.b1_}. Segment Area SegmentArea2D[circle. {T1. (T2-T1)*r^2/2 ].b->Sqrt[b1^2]. theta=T2-T1.k_}. θ2 }] parameters.theta}.b_}.r_]. . If[IsNegative2D[A].0}.p_]] := Module[{A}.k_}. r^2*(theta-Sin[theta])/2 ].T2}.r}.{d_.{a_. Area2D[Circle2D[{h_.{t1_?IsScalar2D. The first case is for parabolas.T2}=PrimaryAngleRange2D[{t1.T2}=PrimaryAngleRange2D[{t1.r_]] := Pi*r^2. Areas Associated with a Conic Arc Area Area2D[cnarc] Computes the area between a conic arc and its chord for a conic arc in a standard position.0}.

alpha_].T-Pi}].D2DArea2D . Area2D[ConicArc2D[p0:{x0_.p1].{a.alpha_]] := Pi*a*b. {θ1 .t2}].p]] ]. SectorArea2D[ellipse.d}.{d. d=Distance2D[p0.b_.T1}]. θ2 }] parameter values. θ2 }] parameter values.b_. IsNegative2D[2Pi-T2].{T2-2Pi.a_. θ}] values 0 and θ.alpha_]. {t1_?IsScalar2D.t_?IsScalar2D}] := Module[{T=PrimaryAngle2D[t]}.Areas Associated with an Ellipse 401 Area2D[cnarc] Computes the area between a conic arc and its chord.Line2D[p0.k_}. Area2D[ConicArc2D[{0. Sector Area SectorArea2D[ellipse.p1]]. Notice that the x-coordinate of the apex point in standard position has no bearing on the area. Pi*a*b-SectorArea2D[E1.{0. Areas Associated with an Ellipse Area Area2D[ellipse] Computes the area of a complete ellipse. b=Distance2D[Point2D[pA]. SectorArea2D[E1. Pi*a*b/2+SectorArea2D[E1.a_. True. Segment Area SegmentArea2D[ellipse.p_]] := Module[{a. {0. therefore. Computes the area of an ellipse sector between parameter SectorArea2D[E1:Ellipse2D[{h_. Computes the area of an ellipse sector between two SectorArea2D[E1:Ellipse2D[{h_. Pi*a*b.p1:{x1_.k_}.T2}=PrimaryAngleRange2D[{t1. True.pA:{xA_.T2}]-SectorArea2D[E1.b. Computes the area of an ellipse segment between two . {θ1 .T2}. is not computed.t2_?IsScalar2D}] := Module[{T1.a_.b}. Which[ IsZero2D[T].{0.y1_}.0}. Area2D[Ellipse2D[{h_.b_.{0. a*b*(Pi-2*ArcSin[Cos[t]])/4] ]. Which[ IsZero2D[2Pi-(T2-T1)].yA_}. IsNegative2D[Pi-T]. {T1. and. Area2D[E1].{0.y0_}.k_}.0}.T1}]] ].

Segment Area SegmentArea2D[hyperbola. A=a*b*(Sinh[T]-T)/2. Areas Associated with a Parabola Segment Area SegmentArea2D[parabola. e=Sqrt[a^2+b^2]/a.b_.b_. e=Sqrt[a^2+b^2]/a.-A.s.f_. {t1 . {T1.alpha_].A] ].b_. {t1_?IsScalar2D. Computes the area of a hyperbola segment between SegmentArea2D[Hyperbola2D[{h_.k_}. Areas Associated with a Hyperbola Sector Area SectorArea2D[hyperbola. . t2 }] two parameters.T.a_. t2 }] two parameters.t2}].402 D2DArea2D .t_]. t2 }] parameter values. s=ArcCosh[e].T2}=PrimaryAngleRange2D[{t1.k_}.A}.{T1.T2}]-a*b*Sin[T2-T1]/2 ].A] ]. {t1_?IsScalar2D.A}.T2}.s.t_].a_.a_. s=ArcCosh[e].t2_?IsScalar2D}] := Module[{e. {t1_?IsScalar2D.-A. A=a*b*s*(t2-t1)/2.k_}.A] ]. A=f^2*(t2-t1)^3/3. Computes the area of a hyperbola sector between two SectorArea2D[Hyperbola2D[{h_. {t1_?IsScalar2D. {t1 . If[IsNegative2D[A].t2_?IsScalar2D}] := Module[{T1. If[IsNegative2D[A]. SectorArea2D[E1.Areas Associated with a Parabola SegmentArea2D[E1:Ellipse2D[{h_. If[IsNegative2D[A].-A. Computes the area of a segment of a parabola between SegmentArea2D[Parabola2D[{h_.theta_].k_}. T=s*(t2-t1). {t1 .t2_?IsScalar2D}] := Module[{A}.t2_?IsScalar2D}] := Module[{e.

{x3.y2_}.1}}]/2.{x2_.y3_}]] := Module[{A}.A] ].-A.{x2. If[IsNegative2D[A].1}. A=Det[{{x1.Areas Associated with a Triangle Areas Associated with a Triangle Area Area2D[triangle] Computes the area of a triangle.y1_}.1}. Area2D[Triangle2D[{x1_.y2. (* end of "D2DArea2D‘" *) 403 . Epilogue End[ ].y3.y1. (* end of "‘Private" *) EndPackage[ ].D2DArea2D .{x3_.

.

"D2DPoint2D‘". Quadratic2D[Circle2D[{h_. "D2DNumbers2D‘". "D2DLine2D‘". k}.". "D2DGeometry2D‘". D2DCircle2D::usage= "D2DCircle2D is a package that implements the Circle2D object. Begin["‘Private‘"].k}.r_]] := Quadratic2D[1. "D2DTransform2D‘"}]. r] Standard representation of a circle in Descarta2D. "D2DQuadratic2D‘". Circle2D::usage= "Circle2D[{h. Equation Quadratic2D[circle] Constructs the quadratic representing the equation of a circle. Initialization BeginPackage["D2DCircle2D‘".". "D2DMaster2D‘".-2*h.k}. 405 .k_}.0. {"D2DExpressions2D‘". Description Representation Circle2D[{h. k) and the radius is r.D2DCircle2D The package D2DCircle2D implements the Circle2D object.1.h^2+k^2-r^2].-2*k. Radius2D::usage= "Radius2D[circle] gives the radius of a circle. The center of the circle is (h.r] is the standard form of a circle with radius ’r’ centered at {h.". "D2DSketch2D‘".

the radius must be positive.r_] := (Circle2D @@ ChopImaginary2D[Circle$2D[{h.r}. Parameters in the range 0 ≤ θ < 2π cover a complete circle.k. (FreeQ[{h.r_][t_?IsScalar2D] := {h+r*Cos[t]. SetDisplay2D[ Circle2D[{h_.{h.k_}. Circle2D[{h.r]. r] Detects a circle with imaginary arguments and returns the $Failed symbol. k}.k}.r_] := (Message[Circle2D::imaginary. ‘2‘]’ has been detected. on a circle and returns a coordinate list {x.k_}. Circle2D[{h_. Circle[{h.r}]). IsValid2D[circle] Verifies that a circle is syntactically valid. r] symbol.t2}]] ]. θ. . Validation Circle2D[{h.k_}.0]).r}.k.r_?IsScalar2D]] := True.r_][{t1_?IsScalar2D. Graphics Provides graphics primitives for a circle by extending the Mathematica Display command.$Failed) /. If the imaginary parts are insignificant._Pattern] && IsTinyImaginary2D[{h. k}. Circle2D[{h_.k}. Circle2D[{h_. r][θ] Evaluates a parameter. Executed when the package is loaded.k_}.k}.k_}.k_?IsScalar2D}.0]).r_] := (Message[Circle2D::invalid. SetDisplay2D[ Circle2D[{h_. k}.k.PrimaryAngleRange2D[{t1. Circle2D[{h_. (FreeQ[{h.k+r*Sin[t]}.".r] ].k.406 D2DCircle2D .{h. y}.".r}. Circle[{h.r].k. Detects a circle whose radius is non-positive and returns the $Failed Circle2D::invalid= "An invalid circle of the form ’Circle2D[‘1‘. they are removed.‘2‘]’ has been detected.r]]) /._Pattern] && IsZeroOrNegative2D[r.r_]._Pattern] && IsComplex2D[{h.t2_?IsScalar2D}].r.Description Evaluation Circle2D[{h.r}. Circle2D::imaginary= "An invalid circle of the form ’Circle2D[‘1‘. (FreeQ[{h. IsValid2D[Circle2D[{h_?IsScalar2D.k}. the arguments cannot be imaginary.$Failed) /.k_}.k}.

k}.y0_?IsScalar2D}] := Circle2D[Rotate2D[{h. {x0_?IsScalar2D.k_}.{h.y0}].y0_?IsScalar2D}] := Circle2D[Scale2D[{h. Not[IsZeroOrNegative2D[s]]. coords] Rotates a circle by an angle θ about a position specified by a coordinate list.L:Line2D[a_. Scale2D[Circle2D[{h_. {x0_?IsScalar2D. coords] Scales a circle from a coordinate position. Radius2D[Circle2D[{h_.y0}]. Radius Radius2D[circle] Returns the radius of a circle. Distance2D[Point2D[{x_. s.Circle2D[{h_. line] Reflects a circle in a line.{x0.r_].r].k}]-r)^2]. Scale Scale2D[circle.nb).k}. If the third argument is omitted.theta_?IsScalar2D.s. .k_}.r_]] := r.Scalars 407 Scalars Distance Point/Circle Distance2D[point.k}.y_}].r_]] := Sqrt[(Distance2D[{x.k_}. θ.r]. Rotate2D[Circle2D[{h_.D2DCircle2D .nb).k_}.y}.k_}.s_?IsScalar2D.r_].c_]] := Circle2D[Reflect2D[{h. Transformations Reflect Reflect2D[circle. it defaults to the origin (see D2DTransform2D. Reflect2D[Circle2D[{h_.{x0. circle] Computes the distance between a point and a circle.theta.r_].b_. it defaults to the origin (see D2DTransform2D.L]. Rotate Rotate2D[circle.s*r] /. If the position is omitted.

circle] Constructs a line that is the polar line of a point with respect to a circle.C2:Circle2D[{h2_.c1_]. Line2D::concentric= "The circles {‘1‘.r2_]] := Point2D[L1.2*(k2-k1). v}] Translates a circle delta distance. circle] Constructs a point that is the pole point of a line with respect to a circle.Line Construction Translate Translate2D[circle.k1_}. Line2D[C1:Circle2D[{h1_. ‘2‘} are concentric.k2_}.Quadratic2D[C2]].k2_}.k}].$Failed.C2:Circle2D[{h2_.C1.Quadratic2D[C2]]. Point2D[L1:Line2D[a1_. Point Construction Center Point Point2D[circle] Constructs the center point of the circle. Radical Axis Line2D[circle.v_?IsScalar2D}] := Circle2D[{h+u. {u.r2_]] := Line2D[P1.r_].(h1^2-h2^2)+(k1^2-k2^2)+(r2^2-r1^2)]]. If the line is tangent to the circle then the point is the tangency point. {u_?IsScalar2D.C2].".y1_}]. Pole Point Point2D[line.C2:Circle2D[{h2_. Line Construction Polar Line Line2D[point.r].r2_]] := If[IsConcentric2D[C1. Message[Line2D::concentric. Translate2D[Circle2D[{h_. Line2D[2*(h2-h1).k+v}.C2].r_]] := Point2D[{h. If the point is on the circle then the line is tangent to the circle.k_}. .b1_.r1_]. Line2D[P1:Point2D[{x1_. no radical axis exists. Point2D[Circle2D[{h_.k_}. circle] Constructs a line that is the radical axis of two circles.408 D2DCircle2D .k2_}.

Circle Construction 409 Circle Construction Circle from Quadratic Equation Circle2D[quad] as a circle.$Failed] ].P2].y1}.b_.Sqrt[(x1-x2)^2+(y1-y2)^2]]].c_. Circle2D[Point2D[{h_. the radius must be positive.".B2_. Circle2D::on= "‘1‘ is on ‘2‘. If[IsZero2D[{a-c. If[IsZeroOrNegative2D[s]. Message[Circle2D::noCircle.P2].D2DCircle2D .P1.k}. Circle from Center and Tangent Line Circle2D[point. is invalid.Sqrt[(A2*x1+B2*y1+C2)^2/(A2^2+B2^2)]]]. no valid circle exists.P2:Point2D[{x2_.c}. Circle2D[{h. Circle2D::radius= "The radius argument.y1}.Q].L2]. Message[Circle2D::coincident.$Failed. Circle2D[{x1.b}.r]. point] Constructs a circle from a center point and a point on the circle.k_}]. Circle from Center Point and Radius Circle2D[point.C2_]] := If[IsOn2D[P1. no valid circle exists. Circle2D::coincident= "The points {‘1‘.-e/(2a)}.r_?IsScalar2D] := If[IsZeroOrNegative2D[r].d_.Q].y2_}]] := If[IsCoincident2D[P1. Circle2D[Q:Quadratic2D[a_.L2]. Circle2D[P1:Point2D[{x1_. s=(d^2+e^2-4*a*f)/a^2.". . Circle2D[{-d/(2a).P1.And] && Not[IsZero2D[{a.y1_}]. ‘2‘} are coincident.Sqrt[s]/2]].$Failed. line] Constructs a circle from a center point and a tangent line.$Failed.L2:Line2D[A2_.". Circle2D[P1:Point2D[{x1_. Message[Circle2D::radius. Constructs a circle from a quadratic.y1_}].r]]. Message[Circle2D::on. ‘1‘. The quadratic must be recognizable Circle2D::noCircle= "The curve represented by ‘1‘ is not a circle.$Failed.". Message[Circle2D::noCircle. r] Constructs a circle from a center point and radius.f_]] := Module[{s}.e_.Or]]. Circle2D[{x1. Circle from Center Point and Point on Circle Circle2D[point.

point] Constructs a circle through three points. Message[Circle2D::collinear. point.y1_}]. ‘3‘} are collinear.y3_}]] := If[IsCollinear2D[P1.P2. (* end of "D2DCircle2D‘" *) . (* end of "‘Private" *) EndPackage[ ].P1.410 D2DCircle2D . Epilogue End[ ]. ‘2‘. Circle2D[P1:Point2D[{x1_.".P3]] ]. P3:Point2D[{x3_.P2:Point2D[{x2_. Circle2D[Quadratic2D[P1.$Failed.P3]. no valid circle exists.y2_}].Epilogue Circle Through Three Points Circle2D[point.P3].P2.P2. Circle2D::collinear= "The points {‘1‘.

"D2DHyperbola2D‘".".". "D2DEllipse2D‘". Asymptotes2D::usage= "Asymptotes2D[hyperbola] constructs a list containing the two asymptote lines of a hyperbola. Eccentricity2D::usage= "Eccentricity2D[conic] computes the eccentricity of a conic curve (parabola.". "D2DTransform2D‘"}]. two for ellipses and hyperbolas). Foci2D::usage= "Foci2D[conic] constructs a list containing the focus point(s) of a conic curve (one for a parabola. FocalChords2D::usage= "FocalChords2D[conic] constructs a list containing the focal chords (line segments) of a conic curve (one for a parabola. 411 .".D2DConic2D The package D2DConic2D provides functions for constructing various points. lines and line segments associated with conic curves. "D2DParabola2D‘". two for ellipses and hyperbolas). Initialization BeginPackage["D2DConic2D‘". Directrices2D::usage= "Directrices2D[conic] constructs a list containing the directrix line(s) of a conic curve (one for a parabola. two for ellipses and hyperbolas). "D2DLine2D‘". "D2DSegment2D‘". "D2DPoint2D‘".". Begin["‘Private‘"]. two for ellipses and hyperbolas). ellipse or hyperbola). Vertices2D::usage= "Vertices2D[conic] contructs a list containing the vertex point(s) of a conic curve (one for a parabola. {"D2DCircle2D‘". "D2DExpressions2D‘".".". D2DConic2D::usage= "D2DConic2D is a package for constructing geometry associated with conic curves.

k}.k}]].b_.{h.theta_]] := {Point2D[Rotate2D[{h+f.a_.theta.theta.theta_]] := Sqrt[a^2+b^2]/a.b_.a_.k_}.{h.Point Construction Scalars Eccentricity Eccentricity2D[ellipse] Computes the eccentricity of an ellipse. Foci2D[hyperbola] Constructs a list containing the two focus points of a hyperbola. Eccentricity2D[hyperbola] Computes the eccentricity of a hyperbola.a_. Foci2D[parabola] Constructs a list containing the single focus point of a parabola.a_.f_.k}]]}].theta_]] := {Point2D[Rotate2D[{h+a. {Point2D[Rotate2D[{h+a*e.k}.theta_]] := Sqrt[a^2-b^2]/a.k}]].b_. {Point2D[Rotate2D[{h+a*e.k}. Point2D[Rotate2D[{h-a.theta_]] := 1. Eccentricity2D[Ellipse2D[{h_.k_}.k_}.k}. Eccentricity2D[Parabola2D[{h_.b_.k}.theta.412 D2DConic2D .{h.{h.theta. Foci2D[Parabola2D[{h_.theta.k}]]}. .{h.k_}.k_}.k}.{h.f_. Vertices2D[Ellipse2D[{h_. Point2D[Rotate2D[{h-a*e. Point Construction Focus Points Foci2D[ellipse] Constructs a list containing the two focus points of an ellipse.k_}.theta.theta_]] := Module[{e=Eccentricity2D[E1]}.k_}.theta.k}.a_. Eccentricity2D[Hyperbola2D[{h_.k}]]}. Eccentricity2D[parabola] Computes the eccentricity of a parabola (e = 1).{h. Foci2D[H1:Hyperbola2D[{h_.theta_]] := Module[{e=Eccentricity2D[H1]}. Vertex Points Vertices2D[ellipse] Constructs a list containing the two vertex points of an ellipse. Foci2D[E1:Ellipse2D[{h_.k}]].b_. Point2D[Rotate2D[{h-a*e.k}]]}].

k_}. Rotate2D[Line2D[1. it has no (finite) directrix lines.-(h+a/e)]. a*k-b*h].k}]].{h.theta_]] := {Rotate2D[Line2D[b.b_.-(h-a/e)].b_.{h.theta_]] := Module[{e=Eccentricity2D[H1]}. Vertices2D[hyperbola] Vertices2D[Hyperbola2D[{h_.{h. Message[Directrices2D::circular.theta_]] := {Point2D[Rotate2D[{h+a.-h+f].{h.theta.D2DConic2D .0.k}]]}.theta. Directrices2D[parabola] Constructs a list containing the single directrix line of a parabola.{h.0.-a.theta. Rotate2D[Line2D[b. .a_.f_. Vertices2D[parabola] Constructs a list containing the single vertex point of a parabola.theta_]] := {Point2D[{h.a_.theta_]] := Module[{e=Eccentricity2D[E1]}. Constructs a list containing the two directrix lines of a hyper- Directrices2D[H1:Hyperbola2D[{h_.-a*k-b*h].".{h.theta.k}]}. Directrices2D[hyperbola] bola.theta. Constructs a list containing the two asymptote lines of a hyper- Asymptotes2D[Hyperbola2D[{h_.k}]}] ].k_}.{h.k}.-(h+a/e)].k_}.k}]}. Line Construction Asymptote Lines Asymptotes2D[hyperbola] bola.theta_]] := {Rotate2D[Line2D[1.theta. Rotate2D[Line2D[1.E1]. Directrices2D[Parabola2D[{h_. {Rotate2D[Line2D[1.b_.k}]}. Directrices2D::circular= "The ellipse ‘1‘ is circular.Line Construction 413 Constructs a list containing the two vertex points of a hyperbola.b_. Point2D[Rotate2D[{h-a. If[IsZero2D[e].theta.f_. Vertices2D[Parabola2D[{h_.k}.-(h-a/e)].k_}.theta.a_.{h.0. {Rotate2D[Line2D[1.k}]} ].a_.0.k_}.k}].k}]. Directrix Lines Directrices2D[ellipse] Constructs a list containing the two directrix lines of an ellipse.k_}.0.k}]. a.{h. Directrices2D[E1:Ellipse2D[{h_.{}.theta.

l1=Segment2D[{h+a*e.b_.{h-a*e. Map[Rotate2D[#. e=Eccentricity2D[E1]. (* end of "D2DConic2D‘" *) .k+b^2/a}. l2=Segment2D[{h-a*e.k}]&.k-b^2/a}].f_.{l1.l2}. Constructs a list containing two line segments that are the FocalChords2D[H1:Hyperbola2D[{h_.l2}] ]. Constructs a list containing two line segments that are the focal FocalChords2D[E1:Ellipse2D[{h_. e=Eccentricity2D[H1].theta_]] := {Rotate2D[Segment2D[{h+f.Epilogue Line Segment Construction Focal Chords FocalChords2D[ellipse] chords of an ellipse.theta.a_.{h+f.{h.{h+a*e.{h.l1.k+b^2/a}.l2}.l2}] ].{h-a*e.l1.theta_]] := Module[{e.414 D2DConic2D .{h.a_. (* end of "‘Private" *) EndPackage[ ].k}]}.theta.k-b^2/a}]. FocalChords2D[hyperbola] focal chords of a hyperbola.b_.theta. l2=Segment2D[{h-a*e.{h+a*e. l1=Segment2D[{h+a*e.k_}.k+2*f}. Constructs a list containing one line segment that is the single FocalChords2D[Parabola2D[{h_.{l1.k+b^2/a}. Epilogue End[ ].k-2*f}].k_}.theta_]] := Module[{e.k}]&. Map[Rotate2D[#.k_}.k-b^2/a}]. FocalChords2D[parabola] focal chord of the parabola.k+b^2/a}.k-b^2/a}].

"D2DSketch2D‘". The second argument is the coordinates of the apex point of the conic arc (the apex point is the intersection of the start/end point tangents). "D2DGeometry2D‘".yA) and projective discriminant ’p’. "D2DParabola2D‘".D2DConicArc2D The package D2DConicArc2D implements the ConicArc2D object. {xA .{xA.". ConicArc2D::usage= "ConicArc2D[{x0. "D2DNumbers2D‘". "D2DEquations2D‘". "D2DExpressions2D‘".".Apex2D] to construct the apex control point of a conic arc. D2DConicArc2D::usage= "D2DConicArc2D is a package providing the conic arc object. "D2DQuadratic2D‘". ρ] Standard representation of a conic arc in Descarta2D. y1 }.yA}. y0 }. Apex2D::usage= "Apex2D is a keyword used in Point2D[cnarc. 0<rho<1/2 is an ellipse. Rho2D::usage= "Rho2D[cnarc] returns the rho value of a conic arc. "D2DTransform2D‘"}].y1}. "D2DMaster2D‘".y1).y0}.". rho=1/2 is a parabola. yA }. "D2DIntersect2D‘". "D2DLine2D‘". "D2DEllipse2D‘". Initialization BeginPackage["D2DConicArc2D‘". "D2DLoci2D‘". The fourth argument is a scalar representing the ρ value of the conic arc (0 < ρ < 1/2.y0). Description Representation ConicArc2D[{x0. 1/2<rho<1 is a hyperbola. The first and third arguments are the coordinates of the start and end points of the conic arc. respectively. "D2DHyperbola2D‘". end point (x1.{"D2DCircle2D‘". Begin["‘Private‘"].p] is the standard form of conic arc with start point (x0. 1/2 < ρ < 1. hyperbola). {x1 . ρ = 1/2. "D2DPoint2D‘".". apex point (xA. parabola. 415 . ellipse.{x1.

Executed when the package is loaded. (b0*(1-p)*p0+b1*p*pA+b2*(1-p)*p1)/(b0*(1-p)+b1*p+b2*(1-p))].y}] ].416 D2DConicArc2D .a.{xA_. b1=2*t*(1-t). yA }.p]. MakePrimitives2D[ ConicArc2D[{x0. eqn=a*b==k*(1-a-b)^2 /.k. Quadratic2D[ConicArc2D[{x0_. ‘4‘]’ has been detected.y0_}.yA_}.b2}. and returns a list of coordinates {x. {x1_.y1_}. ‘3‘. {xA . b->(( y-yA)*(x0-xA)-( x-xA)*(y0-yA))/ ((y1-yA)*(x0-xA)-(x1-xA)*(y0-yA))}.{x1. y0 }.t2_?IsScalar2D}].y1_}. the arguments cannot be imaginary.yA}.p1:{x1_. y0 }.y1}.p_].y0_}.y0_}. Validation ConicArc2D[{x0.yA_}.t2}] ]. {x1 .p_][{t1_?IsScalar2D.{x1.{x1_. ρ][t] Evaluates a conic arc at a parameter. Graphics Provides graphics primitives for a conic arc by extending the Mathematica Display command.{x. a->(( y-yA)*(x1-xA)-( x-xA)*(y1-yA))/ ((y0-yA)*(x1-xA)-(x0-xA)*(y1-yA)).{x1_.{0.x.{xA.y}. y1 }.p].y1_}. ‘2‘. {x1 .p_]] := Module[{eqn.{xA_. SetDisplay2D[ ConicArc2D[{x0_. ρ] Detects a conic arc with imaginary arguments and returns the $Failed symbol. . {k->(1-p)^2/(4*p^2). b0=(1-t)^2.{t1.pA:{xA_. they are removed.Description Equation Quadratic2D[cnarc] Constructs a quadratic representing the equation of the curve associated with a conic arc.y1_}. ConicArc2D::imaginary= "An invalid conic arc of the form ’ConicArc2D[‘1‘. y1 }.yA_}. Parameter values in the range 0 ≤ t ≤ 1 cover the complete span of the conic arc. ConicArc2D[p0:{x0_. yA }.y1}.y0}.b1.yA}. SetDisplay2D[ ConicArc2D[{x0_. Evaluation ConicArc2D[{x0. {xA . y}.y0_}.p_][t_?IsScalar2D] := Module[{b0.1}] ]. If the imaginary parts are insignificant.yA_}.y0}.{xA.".{xA_. t.b. Quadratic2D[eqn. MakePrimitives2D[ ConicArc2D[{x0. b2=t^2.

Detects a conic arc with collinear control ConicArc2D::points= "An invalid conic arc of the form ’ConicArc2D[‘1‘.pA.p1:{x1_. {xA .yA_?IsScalar2D}.y1_}._Pattern] && IsTinyImaginary2D[{p0. ‘2‘. the value of rho must be in the range 0<rho<1.p0.0])). (FreeQ[{p0.p_?IsScalar2D]] := True.p1:{x1_. ρ] points and returns the $Failed symbol.yA_}.p1.pA.p}]). yA }. ‘3‘.pA.p1.0]).{x1_.pA.p1:{x1_. {xA_?IsScalar2D.p1.p]. ConicArc2D[{x0.p1.yA_}. Detects a conic arc with an invalid ρ value ConicArc2D::rho= "An invalid conic arc of the form ’ConicArc2D[‘1‘. y1 }.p}. ‘4‘]’ has been detected. ConicArc2D[{x0.p_] := (Message[ConicArc2D::rho.p1.p].".yA_}. ‘2‘.p_] := (Message[ConicArc2D::imaginary.y1_}.y0_}._Pattern] && IsCollinear2D[Point2D[p0].p1.y1_}. ConicArc2D[p0:{x0_. IsValid2D[cnarc] Verifies that a conic arc is syntactically valid. {x1 .D2DConicArc2D .y1_}.Scalars 417 ConicArc2D[p0:{x0_.p}.p}. Rho2D[ConicArc2D[{x0_.pA.yA_}.y0_}.y0_?IsScalar2D}. (FreeQ[{p0. y1 }. y0 }. ConicArc2D[p0:{x0_.p_]] := p. IsValid2D[ ConicArc2D[{x0_?IsScalar2D.p]]) /.p0.p_] := (Message[ConicArc2D::points.p0.y0_}.y0_}. yA }._Pattern] && (IsZeroOrNegative2D[p.p]. (FreeQ[{p0.$Failed) /. .pA.$Failed) /.y1_?IsScalar2D}.y1_}.".pA. ConicArc2D[p0:{x0_.p1:{x1_. ρ] and returns the $Failed symbol.p1. ‘3‘. {x1_?IsScalar2D. y0 }. (FreeQ[{p0.Point2D[pA]. ‘4‘]’ has been detected. Scalars Rho Rho2D[cnarc] Returns the ρ value of a conic arc.p}.$Failed) /.pA:{xA_._Pattern] && IsComplex2D[{p0. the control points cannot be collinear.y0_}.pA:{xA_.p1.{xA_.p1.yA_}. {x1 .0] || IsZeroOrNegative2D[1-p.p_] := (ConicArc2D @@ ChopImaginary2D[ConicArc$2D[p0.pA.pA.pA.pA:{xA_.p1. {xA .Point2D[p1]]).p}.pA:{xA_.

k_?IsScalar2D}] := ConicArc2D[Rotate2D[{x0.y0_}.yA_}.k}].s.yA_}.p].p_]. coords] Rotates a conic arc by an angle θ about a position specified by a coordinate list.y0}.y0+v}. Rotate2D[ConicArc2D[{x0_.{h. Reflect2D[{xA. line] Reflects a conic arc in a line.s. If the position is omitted.y1_}.p_].k}].{xA_.C2_]] := ConicArc2D[Reflect2D[{x0.y0_}. Scale2D[{x1.yA}.{xA_.yA_}. {h_?IsScalar2D.{x1_.y1_}. s.y1_}.nb). v}] Translates a conic arc delta distance.{xA+u.y0}.y0}. θ. Reflect2D[ConicArc2D[{x0_.p] /.Transformations Transformations Reflect Reflect2D[cnarc.v_?IsScalar2D}] := ConicArc2D[{x0+u.y0_}. from a position given by coordinates.yA_}.y1}.y1+v}. Reflect2D[{x1.nb).{h.y1}.k}].theta.k_?IsScalar2D}] := ConicArc2D[Scale2D[{x0. Scale2D[ConicArc2D[{x0_.yA}.k}]. theta_?IsScalar2D.{x1_.p_].{xA_.k}].{h. Translate Translate2D[cnarc. Rotate2D[{x1.y0_}. {u_?IsScalar2D. s. If the third argument is omitted.s. coords] Scales a conic arc by a scale factor.{x1+u.418 D2DConicArc2D . Translate2D[ConicArc2D[{x0_. s_?IsScalar2D.B2_.{h.p]. Rotate Rotate2D[cnarc.theta. Scale Scale2D[cnarc. Scale2D[{xA.theta.{x1_.{x1_. {h_?IsScalar2D.p_]. {u. .yA}.{xA_. it defaults to the origin (see D2DTransform2D.y1_}.{h.L]. Rotate2D[{xA. it defaults to the origin (see D2DTransform2D.L].{h.L].p].yA+v}. Not[IsZeroOrNegative2D[s]]. L:Line2D[A2_.y1}.k}].

yA}]. point}] computes ρ for a conic arc from the apex point and start/end points. Point2D[(-p^2*pA+(p-1)^2*(p0+p1)/2)/(1-2*p)] ]. curve] by a chordal line.f_.theta_].y0_}. Constructs a conic arc from a portion of a conic curve defined ConicArc2D::noChord= "No chord exists between ‘1‘ and ‘2‘.y1_}.y0_}. {point. Point2D[C1:ConicArc2D[p0:{x0_. Conic from Conic Arc Loci2D[cnarc] Constructs a list containing the conic curve associated with a conic arc. it has no center point. ConicArc2D::center= "The chord defined by ‘1‘ passes through the center of ‘2‘.yA_}.{x1_.y0_}.{xA_.y1_}.". Loci2D[C1:ConicArc2D[{x0_. a conic arc cannot be constructed.p_]] := Loci2D[Quadratic2D[C1]].".p_]] := If[IsZero2D[p-1/2].{xA_. Point2D[ConicArc2D[{x0_.C1]. Point2D::notCentral1= "The conic underlying ‘1‘ is not a central conic.{x1_. Apex2D] := Point2D[{xA.yA_}].D2DConicArc2D .p_].yA_}. FindRho$2D[Parabola2D[{h_. Message[Point2D::notCentral1.k_}.".y0_}]. {Point2D[{x0_.yA_}.$Failed. .pA:{xA_. Apex2D] Constructs the apex control point of a conic arc. Center Point Point2D[cnarc] Constructs the center point of the central conic underlying a conic arc. a conic arc cannot be constructed. point.Point2D[{x1_. Conic Arc from Conic ConicArc2D[line.p1:{x1_. Point2D[{xA_.y1_}]}] := 1/2.Construction 419 Construction Apex Point Point2D[cnarc.y1_}. The private function FindRho$2D[curve.

CnArc$2D[L1:Line2D[a1_.b1_. CnArc$2D[L1:Line2D[a1_.H2].Ellipse2D.y1_}]}] := (Message[ConicArc2D::noChord.C2_. pt=Point2D[L1.L1.C2].c1_].theta_]. Is2D[C2.yM}={x0+x1.theta_].$Failed. Point2D[{xA_.y0+y1}/2]]. ConicArc2D[{x0.FindRho$2D[C2. ellipses and hyperbolas) there is a restriction that the center point cannot be on the line defining the chord of the conic arc.yA_}]. {xM. C2_ /.c1_].{Circle2D. Message[ConicArc2D::center.pt.b1_.Coordinates2D[pt]. ConicArc2D[L1:Line2D[a1_. Both end points of the chord of the conic arc must be on the same branch of a hyperbola. The private function CnArc$2D[line. Non-central conics (parabolas) have no restrictions on the position of the line defining the chord of the conic arc.pts_] := (Message[ConicArc2D::noChord. curve. CnArc$2D[L1.b_.y0_}].yM}.b1_.L1. (* end of "‘Private" *) EndPackage[ ]. H2:Hyperbola2D[{h_.y1_}]}] := Module[{xM.L1].C2_.C2.r_] | Ellipse2D[{h_. 1/(1+Sqrt[k-yA]/Sqrt[k-yM]).theta_] | Hyperbola2D[{h_.y0_}].k_}. {point.Points2D[L1.Point2D[{x1_.Epilogue FindRho$2D[Circle2D[{h_. {Point2D[{x0_. CnArc$2D[L1:Line2D[a1_.b_. {Point2D[{x0_.y0_}]. If[IsZero2D[h-xM].P]] ].C2].L1.C2]]].k_}. P:{Point2D[{x0_.y1_}]}] := Module[{pt}.Point2D[{x1_.420 D2DConicArc2D .y0}.c1_].{x1.$Failed) Epilogue End[ ].a_.Points2D[L1.$Failed) /.C2]].y0+y1}/2.C2.b1_. IsNegative2D[Polynomial2D[Quadratic2D[H2].{x0+x1. point}] completes the computation of the conic arc.C2]. ConicArc2D[L1:Line2D[a1_.a_.k_}. 1/(1+Sqrt[h-xA]/Sqrt[h-xM])] //Simplify ]. No conic arc exists if the intersection of the line and the curve does not result in two points.a_.c1_].b1_.f_. (* end of "D2DConicArc2D‘" *) .theta_]] := CnArc$2D[L1.Hyperbola2D}]] := If[IsOn2D[Point2D[C2].k_}.C2:Parabola2D[{h_.Point2D[{x1_.k_}.b_. For central conics (circles.y1}.c1_].

The second and third arguments are (positive) scalars representing the lengths of the semi-major and semi-minor axes of the ellipse.".{"D2DExpressions2D‘". k}.".k).b. "D2DTransform2D‘"}]. "D2DSegment2D‘". θ] Standard representation of an ellipse in Descarta2D. "D2DMaster2D‘". SemiMinorAxis2D::usage= "SemiMinorAxis2D[ellipse] returns the length of the semi-minor axis of an ellipse. Initialization BeginPackage["D2DEllipse2D‘". 421 . Ellipse2D::usage= "Ellipse2D[{h. semi-minor axis length ’b’ and rotation angle ’theta’. The fourth argument is the counter-clockwise rotation angle (in radians) of the ellipse about the center point. "D2DQuadratic2D‘".theta] is the standard form of an ellipse centered at (h. "D2DSketch2D‘".a. a. semi-major axis length ’a’.D2DEllipse2D The package D2DEllipse2D implements the Ellipse2D object. "D2DGeometry2D‘".". "D2DNumbers2D‘". Begin["‘Private‘"]. SemiMajorAxis2D::usage= "SemiMajorAxis2D[ellipse] returns the length of the semi-major axis of an ellipse.k}. The first argument is a list of coordinates representing the center of the ellipse.". b. D2DEllipse2D::usage= "D2DEllipse2D is a package that implements the Ellipse2D object. "D2DLine2D‘". "D2DPoint2D‘". Description Representation Ellipse2D[{h.

t]. θ][θ1 ] Evaluates a position on an ellipse at parameter θ1 and returns a list of coordinates {x. (FreeQ[{h.b. θ] Detects an ellipse with imaginary arguments and returns the $Failed symbol.".k.k.422 D2DEllipse2D . ‘4‘]’ has been detected.a.a_. a.k}]. Ellipse2D[{h_.k_}. If the imaginary parts are insignificant.b_.-2*b^2*h.0.theta}]).theta. Evaluation Ellipse2D[{h.k}.b_. k}.Description Equation Quadratic2D[ellipse] Constructs a quadratic representing the equation of an ellipse.a^2.a.theta_] := (Message[Ellipse2D::imaginary.t_].b. b. MakePrimitives2D[Ellipse2D[{h. PrimaryAngleRange2D[{t1.{h.b. k}. theta. b. ‘3‘.b.theta]._Pattern] && IsComplex2D[{h. Parameters in the range 0 ≤ θ1 < 2π cover the entire ellipse. .k}.k}. SetDisplay2D[ Ellipse2D[{h_.b.t2_?IsScalar2D}].b_.a_. Executed when the package is loaded. the arguments of an ellipse cannot involve imaginary numbers.theta}.b_.k.b. Quadratic2D[Ellipse2D[{h_.a_._Pattern] && IsTinyImaginary2D[{h.{0.0]).-2*a^2*k. y}.k_}.k_}.theta_]] := Rotate2D[ Quadratic2D[b^2.theta]]) /.a_.$Failed) /.a. a.2Pi}] ].t2}]] ]. Ellipse2D[{h_.a.theta}.a. Ellipse2D::imaginary= "An invalid ellipse of the form ’Ellipse2D[‘1‘.theta_][t_?IsScalar2D] := Rotate2D[{h+a*Cos[t].k}]. ‘2‘.a_. Ellipse2D[{h_.k.k+b*Sin[t]}.b.k}.theta}.a.t_][{t1_?IsScalar2D.a_.theta_] := (Ellipse2D @@ ChopImaginary2D[Ellipse$2D[{h. MakePrimitives2D[Ellipse2D[{h.a.b_.k_}.a.{h. Validation Ellipse2D[{h.t]. Graphics Provides the graphics primitives for an ellipse by extending the Mathematica Display command.b. {h.k_}.b_. (FreeQ[{h. they are removed.k_}. SetDisplay2D[ Ellipse2D[{h_.-a^2*b^2+b^2*h^2+a^2*k^2].

(FreeQ[{h.k_?IsScalar2D}.k_}.k}. Ellipse2D[{h_.b_.a_.k_}.0]). Angle2D[Ellipse2D[{h_.{h. ‘2‘.a_.b_.a.k_}. a.k.b.b_.PrimaryAngle2D[theta.0])._Pattern] && (theta=!=PrimaryAngle2D[theta.theta}. Normalizes the rotation angle on all ellipses to the range Ellipse2D[{h_. a._Pattern] && IsZeroOrNegative2D[{a.$Failed) /.theta_] := Ellipse2D[{h. b.".k_}.k}. . θ] 0 ≤ θ < π. SemiMajorAxis2D[Ellipse2D[{h_. ‘4‘]’ has been detected.b.a_. Ellipse2D[{h. a_?IsScalar2D. the length of both the semi-major and semi-minor axes must be positive.theta_] := (Message[Ellipse2D::invalid._Pattern] && IsNegative2D[a-b.a.b_.a. Scalars Angle of Rotation Angle2D[ellipse] Returns the rotation angle of an ellipse.theta]. Ellipse2D[{h_.a_. (FreeQ[{h.a_.theta_]] := a. (FreeQ[{h.theta}.k_}. Semi-minor Axis Length SemiMinorAxis2D[ellipse] Returns the length of the semi-minor axis of an ellipse.b_?IsScalar2D.Pi])).b. SemiMinorAxis2D[Ellipse2D[{h_. ‘3‘. b. a. Ellipse2D[{h.a_. Semi-major Axis Length SemiMajorAxis2D[ellipse] Returns the length of the semi-major axis of an ellipse. theta_?IsScalar2D]] := True.b_. k}. k}. 423 Detects an ellipse with invalid arguments and returns the Ellipse2D::invalid= "An invalid ellipse of the form ’Ellipse2D[‘1‘.b.k.b_. Verifies that an ellipse is syntactically valid.a.b. θ] $Failed symbol.theta_]] := theta. IsValid2D[ellipse] IsValid2D[Ellipse2D[{h_?IsScalar2D.k}.theta_]] := b.Pi]] /.a. θ] Detects a y-axis ellipse and rotates it π/2 radians.theta+Pi/2] /.k. b.b.theta}.theta_] := Ellipse2D[{h.a.b}.Scalars Ellipse2D[{h. k}.k_}.D2DEllipse2D .

k_}.k}.k_}.{x0. it defaults to the origin (see D2DTransform2D.s*b.nb).k}]. s. Not[IsZeroOrNegative2D[s]]. it defaults to the origin (see D2DTransform2D. Scale2D[Ellipse2D[{h_. {x0_?IsScalar2D.b.s. θ.k_}. If the third argument is omitted.b_.theta_].a_. coords] Scales an ellipse by a scale factor.q_.b_. {u. Translate2D[Ellipse2D[{h_.theta] /.a_.s_?IsScalar2D.b. v}] Translates an ellipse delta distance. s.nb). .k}.theta_].L:Line2D[p_.k_}. from a position given by coordinates.L]].ReflectAngle2D[theta. Scale Scale2D[ellipse.a.a_.b_. Reflect2D[Ellipse2D[{h_.r_]] := Ellipse2D[Reflect2D[{h.alpha+theta]. Rotate2D[Ellipse2D[{h_.theta_].b_.a_.a.theta_].y0}].Point Construction Transformations Reflect Reflect2D[ellipse.y0_?IsScalar2D}] := Ellipse2D[Rotate2D[{h.k+v}.alpha. coords] Rotates an ellipse by an angle θ about a position specified by a coordinate list.{x0.y0_?IsScalar2D}] := Ellipse2D[Scale2D[{h. Rotate Rotate2D[ellipse. Point2D[Ellipse2D[{h_. {x0_?IsScalar2D.alpha_?IsScalar2D.L]. Translate Translate2D[ellipse.b.s*a. If the position is omitted.v_?IsScalar2D}] := Ellipse2D[{h+u. line] Reflects an ellipse in a line.k}.a.a_.k_}.y0}].b_. Point Construction Center Point Point2D[ellipse] Constructs the center point of an ellipse.theta].424 D2DEllipse2D .theta_]] := Point2D[{h. {u_?IsScalar2D.

P2]/2.theta_]] := Rotate2D[Line2D[0. ellipse] Constructs the pole point of a line with respect to an ellipse.{h.k}. Line Construction Axis Line Line2D[ellipse] Constructs a line containing the major axis of an ellipse.k2_}.theta2_]] := Line2D[P1.Quadratic2D[E2]]. Ellipse2D[{h.1.k2_}.e_?IsScalar2D] := Module[{a.P2]. and the focus cannot lie on the directrix.Or] || IsCoincident2D[P1.Quadratic2D[E2]].y2-y1]]] ].D2DEllipse2D . .b_.a2_.b. If the line is tangent to the ellipse then the point is the point of tangency.b1_. Line2D[Ellipse2D[{h_.ArcTan[x2-x1. e] Constructs an ellipse from the vertices and eccentricity.b. ellipse] Constructs the polar (line) of a pole (point) with respect to an ellipse.y2_}]}. If the point is on the ellipse then the line is tangent to the ellipse at the point. b=a*Sqrt[1-e^2]. Message[Ellipse2D::invdef].P2:Point2D[{x2_.y1_}].k}]. {h.b2_. Ellipse Construction Ellipse from Vertices and Eccentricity Ellipse2D[{point.a_.Line Construction 425 Pole Point Point2D[line. Point2D[L1:Line2D[a1_. a=Distance2D[P1.c1_].E2:Ellipse2D[{h2_. Ellipse2D[{P1:Point2D[{x1_.h.$Failed. Polar Line Line2D[point.(y1+y2)/2}.". the foci and vertices cannot be coincident.theta2_]] := Point2D[L1.k}. Ellipse2D::invdef= "The defining geometry or eccentricity is invalid.-k].k_}. the eccentricity of an ellipse must be in the range 0<e<1.E2:Ellipse2D[{h2_.k}={(x1+x2)/2. point}.theta.1-e}.b2_.a.y1_}].a2_. If[IsZeroOrNegative2D[{e. Line2D[P1:Point2D[{x1_.

point.b. e] Constructs an ellipse from the foci and eccentricity. Message[Ellipse2D::invdef]. Ellipse2D[P1:Point2D[{x1_. Directrix and Eccentricity Ellipse2D[point.y1_}].k}.h.h.ArcTan[p. line.e_?IsScalar2D] := Module[{a. a=d*e/(1-e^2).k}={x1. Epilogue End[ ].1-e}.q]]] ]. If[IsZeroOrNegative2D[{e.a. {h. d=Distance2D[P1.y1_}]. (* end of "D2DEllipse2D‘" *) .Or] || IsOn2D[P1.a. (* end of "‘Private" *) EndPackage[ ]. e] eccentricity.k}.P2].L2].k}={(x1+x2)/2. b=a*Sqrt[1-e^2].(y1+y2)/2}.L2:Line2D[p_. Ellipse2D[{h.Epilogue Ellipse from Foci and Eccentricity Ellipse2D[point.y2_}]. {h. s=(p*x1+q*y1+r)/(p^2+q^2).y2-y1]]] ].$Failed.e_?IsScalar2D] := Module[{d.$Failed. Message[Ellipse2D::invdef].a.k}.426 D2DEllipse2D .P2:Point2D[{x2_.q}*(a*s*e)/d.b. a=Distance2D[P1. Ellipse from Focus. Ellipse2D[{h.y1}+{p.s. Constructs an ellipse from a focus point. directrix line and Ellipse2D[P1:Point2D[{x1_.P2]/(2*e).r_]. b=a*Sqrt[1-e^2].L2].1-e}.ArcTan[x2-x1.b.b.k}.Or] || IsCoincident2D[P1. If[IsZeroOrNegative2D[{e.q_.

and vice versa.". D2DEquations2D::usage= "D2DEquations2D is a package that provides functions for converting Mathematica polynomials and equations into lines and quadratics.y}] forms a quadratic equation in two unknowns.y}] forms a quadratic polynomial in two unknowns. Returns a list of coefficients with common factors 427 . a*x^2 + b*x*y + c*y^2 + d*x + e*y + f. Initialization BeginPackage["D2DEquations2D‘". Begin["‘Private‘"].". Polynomial2D::usage= "Polynomial2D[line.D2DEquations2D The package D2DEquations2D provides functions for converting Mathematica equations and polynomials into Descarta2D lines and quadratics. a*x^2 + b*x*y + c*y^2 + d*x + e*y + f == 0. "D2DLine2D‘". a*x + b*y + c == 0. a*x + b*y + c.y}] forms a linear polynomial in two unknowns. {x. Coefficients Simplify Coefficients SimplifyCoefficients2D[coefList] removed. {x. SimplifyCoefficients2D::usage= "SimplifyCoefficients2D[coefList] returns a list of coefficients with common factors removed.".". "D2DQuadratic2D‘"}].y}] forms a linear equation in two unknowns. Equation2D[quad. {"D2DExpressions2D‘". {x. {x. Polynomial2D[quad. Equation2D::usage= "Equation2D[line. and vice versa.

Quadratic Equation2D[quad.d_. y}] Forms ax2 + bxy + cy 2 + dx + ey + f == 0 from a quadratic.y_?IsScalar2D}] := a*x^2+b*x*y+c*y^2+d*x+e*y+f.c2__?IsScalar2D}] := Module[{gcd.e_. y}] Forms ax + by + c == 0 from a line. gcd=PolynomialGCD[Sequence @@ Rationalize[coef]].d_. Equation2D[Quadratic2D[a_.c_. Polynomials Linear Polynomial2D[line. {x.e_.c_]. gcd=1].coef1] ].c_]. Quadratic Polynomial2D[quad. Equations Linear Equation2D[line.b_.y_?IsScalar2D}] := a*x+b*y+c. Equation2D[Line2D[a_.#]&.f_]. Epilogue End[ ]. {x. y}] Forms ax + by + c from a line. y}] Forms ax2 + bxy + cy 2 + dx + ey + f from a quadratic.y_?IsScalar2D}] := a*x^2+b*x*y+c*y^2+d*x+e*y+f==0.c_. (* end of "‘Private" *) EndPackage[ ].{x_?IsScalar2D.{x_?IsScalar2D.f_].b_. Map[If[IsZero2D[Round[#]-#]. {x. coef1=Map[Simplify[#/gcd]&.Epilogue SimplifyCoefficients2D[coef:{c1_?IsScalar2D.coef1}. {x.Round[#].428 D2DEquations2D . {x_?IsScalar2D.b_.b_.y_?IsScalar2D}] := a*x+b*y+c==0. (* end of "D2DEquations2D‘" *) . If[IsZero2D[gcd].{x_?IsScalar2D. Polynomial2D[Line2D[a_.coef]. Polynomial2D[Quadratic2D[a_.

or if the evaluation will eventually be approximated using the ’N’ function. IsNumeric2D::usage= "IsNumeric2D[expr.And. IsNegative2D::usage= "IsNegative2D[expr. IsNegative2D[List. IsComplex2D[List.(tol)] provides the same function with a message. IsApproximate2D::usage= "IsApproximate2D[expr] returns ’True’ if the expression contains approximate real numbers. returns ’False’. is 10^(-10). Initialization BeginPackage["D2DExpressions2D‘". IsComplex2D::usage= "IsComplex2D[expr. IsNegative2D[List.". IsComplex2D[List.(tol)] returns ’True’ if all the expressions in the list are negative. {"D2DMaster2D‘". is 10^(-10).(tol)] returns ’True’ if all the expressions in the list evaluate to complex numbers.And.".".(tol)] and IsNegative2D[List. otherwise.". otherwise. if omitted. the default tolerance. if omitted. if omitted. the default tolerance. IsReal2D::usage= "IsReal2D[expr.(tol)] returns ’True’ if the expression consists of atoms that can be evaluated to real numbers.(tol)] return ’True’ if any expressions in the list are negative.Or. D2DExpressions2D::usage= "D2DExpressions2D is a package for querying Mathematica expressions.". IsNumeric2D[expr.(tol)] returns ’True’ if the expression is negative. is 10^(-10).Or.(tol)] return ’True’ if any expressions in the list evaluate to complex numbers. is 10^(-10).funcName.(tol)] and IsComplex2D[List.". the default tolerance. "D2DNumbers2D‘"}]. if omitted. the default tolerance.(tol)] returns ’True’ if the expression is real-valued.(tol)] returns ’True’ if the expression evaluates to a complex number.D2DExpressions2D The package D2DExpressions2D provides functions for querying Mathematica expressions. 429 . returns ’False’.

IsZeroOrNegative2D::usage= "IsZeroOrNegative2D[expr.(tol)] returns ’True’ if any complex numbers in the expression have tiny imaginary parts. or complex number).Or. Utilities Chop The built-in Mathematica function Chop issues an error message if the tolerance is zero. returns ’False’. IsTinyImaginary2D::usage= "IsTinyImaginary2D[expr.(tol)] returns ’True’ if all the expressions in the list are zero or negative. returns ’False’. IsZero2D[List. IsZero2D[List.". These modifications to the Chop function allow a zero tolerance to be specified. IsScalarPair2D::usage= "IsScalarPair2D[{expr1. if omitted.(tol)] return ’True’ if any expressions in the list are zero. otherwise. Chop[expr_. the default tolerance. IsZeroOrNegative2D[List. otherwise.(tol)] and IsZero2D[List.And. or complex numbers). is 10^(-10). returns ’False’. Begin["‘Private‘"]. object. otherwise. There is a small probability that an erroneous conclusion may be reached if an unfortunate combination of random numbers arises. if omitted.". This is useful for determining whether a symbolic expression represents some specific numerical value (such as zero).(tol)] returns ’True’ if the expression is zero. the default tolerance.". objects. the default tolerance. Protect[Evaluate[protected]].] := expr. protected=Unprotect[Chop].(tol)] returns ’True’ if the expression is zero or negative. . is 10^(-10). Executed when the package is loaded. otherwise.430 D2DExpressions2D .". is 10^(-10). returns ’False’.0.And.Utilities IsScalar2D::usage= "IsScalar2D[expr] returns ’True’ if the expression appears to be a scalar (not a List.".expr2}] returns ’True’ if both expressions in a list appear to be a scalars (not a Lists. IsZeroOrNegative2D[List.0] := expr.(tol)] return ’True’ if any expressions in the list are zero or negative. IsZero2D::usage= "IsZero2D[expr. Chop[expr_.Or. if omitted. Random Evaluation The private function RandomEvaluation$2D substitutes random numbers for the non-numeric symbols in the expression and applies the N function to the result.(tol)] returns ’True’ if all the expressions in the list are zero.(tol)] and IsZeroOrNegative2D[List.

returns False. IsComplex2D[n_Real.1.{0.symbols.10^(-10)]. IsApproximate2D[expr_] := (Not[FreeQ[expr.". if omitted. Number Queries Approximate Query IsApproximate2D[expr] Returns True if any of the atoms in an expression are approximate real numbers or if the N function will eventually be applied to the expression. issues a warning message and returns the default tolerance value.tol_:(10^(-10))] := False. otherwise. symbols=Union[Select[atoms.tol_:(10^(-10))] := False. The heavily used cases are provided to improve performance.Number Queries 431 RandomEvaluation$2D[expr_] := Module[{atoms. The special cases are provided to improve the performance of heavily used tolerance values.Random[Real. Complex Query IsComplex2D[expr. .tol_:(10^(-10))] := False.0.rules}.9}]]&. 10−10 .symbols]. D2DExpressions2D::badTol= "The tolerance ‘1‘ is not a valid tolerance specification. N[expr /. IsComplex2D[n_Integer. Tolerance$2D[tol_] := If[TrueQ[N[tol]>=0]. (tol)] Returns True if an expression evaluates numerically to a complex number. the default tolerance. Tolerance The private function Tolerance$2D[tol] returns tol if it is a valid tolerance value. otherwise. Message[D2DExpressions2D::badTol. rules=Map[Rule[#. Tolerance$2D[0] := 0. Tolerance$2D[10^(-10)] := 10^(-10).D2DExpressions2D . tol.(Head[#]===Symbol)&]].tol]. 10^(-10). IsComplex2D[n_Rational. returns False. otherwise. rules] ]._Real]] || Stack[N[___]]=!={}).{-1}]. is 10−10 . atoms=Level[N[expr]. will be used. The default tolerance.

(Head[tol] =!= Symbol).tol1]&. (tol)] Returns True if all the atoms in an expression can be evaluated to real numbers.". IsNumeric2D::notNumeric= "The ‘1‘ function requires numerical arguments. returns False.tol_:(10^(-10))] := False. IsComplex2D[expr_. funcName] Returns True if all the atoms in an expression can be evaluated to real numbers. The default tolerance. Or. .432 D2DExpressions2D .Tolerance$2D[tol]]. The default tolerance.funcName].False].funcName_Symbol. Complex Query (List) IsComplex2D[exprList. tol1=Tolerance$2D[tol]. True. IsComplex2D[expr_List. returns False. (bool==And || bool==Or). (_Symbol | _Complex | _String). Head[n]===Complex ] /. returns True if any expression in the list evaluates to a complex number. bool @@ Map[IsComplex2D[#.tol_:(10^(-10))] := If[IsNumeric2D[expr. Outputs a message with the function name if the result is False. Message[IsNumeric2D::notNumeric. IsNumeric2D[expr_.tol_:(10^(-10))] := Not[MemberQ[Chop[expr//N. returns True if all the expressions in the list evaluate to complex numbers. IsComplex2D[n_Complex. symbolic arguments are not allowed. (Head[expr] =!= List). returns False. is 10−10 . Numeric Query (with Message) IsNumeric2D[expr. is 10−10 . (tol)] With the default option. if omitted. Numeric Query IsNumeric2D[expr.{-1}]] /. if omitted. with the And option. n=Chop[N[expr]. otherwise.tol1}.Number Queries IsComplex2D[sym_Symbol. otherwise. Or | And. IsNumeric2D[expr_. tol1=Tolerance$2D[tol].tol1].expr] ] /.tol_:(10^(-10))] := Abs[Im[n]]>Tolerance$2D[tol].tol_:(10^(-10))] := Module[{n.Tolerance$2D[tol]].bool_:Or.tol_:(10^(-10))] := Module[{tol1}. otherwise.

it cannot be recognized as Null.___] := True. a list.ToString[Head[expr]]]. IsReal2D[expr_Rational.Tolerance$2D[tol]]===0. (NumberQ[n] && (Im[n]==0))]. returns False. Integer and Symbol are provided to improve the performance of heavily used queries. The default tolerance. A complex number with an insignificant imaginary component will return True. IsScalar2D[Null] := False. MemberQ[ObjectNames2D[]. if omitted.___] := False. IsReal2D[expr_Complex.___] := True. IsScalar2D[expr_] := False /. IsScalar2D[_Symbol] := True.___] := True.tol_:(10^(-10))] := Chop[Im[expr]//N. IsReal2D[expr_. IsReal2D[expr_Symbol. otherwise. The special cases for Real. Scalar Query IsScalar2D[n] Returns True if an expression appears to be a scalar quantity—that is.Number Queries 433 Real Query IsReal2D[expr. IsScalar2D[expr_] := False /.D2DExpressions2D . returns False. . IsScalar2D[_Real] := True. IsScalar2D[_Integer] := True. is 10−10 .Tolerance$2D[tol]]. Not[FreeQ[expr. otherwise.tol_:(10^(-10))] := Module[{n}. IsScalar2D[_List] := False. (tol)] Returns True if the expression can be evaluated to a real number. IsReal2D[expr_Real._Pattern]]. IsScalar2D[expr_] := True. a complex number or a Descarta2D object. IsReal2D[expr_Integer. n=Chop[N[expr]. IsScalar2D[_?IsComplex2D] := False.

IsScalarPair2D[___] := False.Head[n]]. returns False.Integer}. otherwise. neither expression can be recognized as Null. tol1=Tolerance$2D[tol]. (bool==And || bool==Or). n=Chop[N[expr].expr] ] /. IsTinyImaginary2D[expr_. is 10−10 . tol1=Tolerance$2D[tol]. with the And option. bool @@ Map[IsNegative2D[#. n2 }] Returns True if a list of two expressions appears to be a scalar pair—that is.n2_}] := IsScalar2D[n1] && IsScalar2D[n2]. The default tolerance. returns True if all the expressions in the list are numerically negative. (tol)] Returns True if any atoms in an expression involve complex numbers with tiny imaginary parts. False] ] /. Negative Query (List) IsNegative2D[exprList. If[MemberQ[{Real. (Head[expr] =!= List). n<0. IsNegative2D[expr_List. is 10−10 . otherwise. if omitted.tol1]===0)&. IsNegative2D[expr_.434 D2DExpressions2D .tol_:(10^(-10))] := Module[{tol1}.tol1]&. Tiny Imaginary Query IsTinyImaginary2D[expr. a complex number or a valid Descarta2D object.Tolerance$2D[tol]].{-1}]] ]. returns False. (tol)] With the default option. if omitted. Sign Queries Negative Query IsNegative2D[expr. The default tolerance. Or @@ Map[(Head[#]===Complex && Chop[Im[#]. otherwise. a list. Level[expr.Sign Queries Scalar Pair Query IsScalarPair2D[{n1.tol_:(10^(-10))] := Module[{tol1}.bool_:Or. otherwise returns False. Or. . IsScalarPair2D[{n1_. returns False. is 10−10 .tol_:(10^(-10))] := Module[{n}. if omitted. The default tolerance. returns True if any expression in the list is numerically negative. (tol)] Returns True if a number is numerically negative. Or | And.

tol_:(10^(-10))] := Module[{tol1}.tol1]===0] ] /. is 10−10 .Complex}.tol_:(10^(-10))] := (Abs[n]<=Tolerance$2D[tol]). Or | And.tol1}. IsZero2D[expr_Symbol.tol_:(10^(-10))] := (Abs[n]<=Tolerance$2D[tol]). otherwise. Chop[RandomEvaluation$2D[n]. IsZero2D[n_Real. The default tolerance.tol1]. IsZero2D[expr_List.Integer.tol1]. tol1=Tolerance$2D[tol]. returns True if all the expressions in the list are numerically zero.tol_:(10^(-10))] := Module[{n. (IsZero2D[expr. MemberQ[ObjectNames2D[]. If[MemberQ[{Real. bool @@ Map[IsZero2D[#. is 10−10 .tol_:(10^(-10))] := Module[{tol1}. returns False. Zero or Negative Query IsZeroOrNegative2D[expr. if omitted or invalid. IsZero2D[n. The heavily used cases are provided as special cases to improve performance.D2DExpressions2D . IsZero2D[n_Integer. .Head[n]]. (tol)] Returns True if an expression is numerically zero.bool_:Or. IsZero2D[n_Complex. The default tolerance.tol1]&. (bool==And || bool==Or). tol1=Tolerance$2D[tol]. n=Chop[N[expr]. (tol)] With the default option. (Head[expr] =!= List).Sign Queries 435 Zero Query IsZero2D[expr. IsZero2D[expr_.tol_:(10^(-10))] := False. returns False. Or. if omitted. tol1=Tolerance$2D[tol]. with the And option. returns False. returns True if any expression in the list is numerically zero. (Head[expr] =!= List). otherwise. otherwise. tol1=Tolerance$2D[tol]. Zero Query (List) IsZero2D[exprList. IsZero2D[h_[___]. IsZeroOrNegative2D[expr_.ToString[h]].expr] ] /.tol_:(10^(-10))] := Module[{tol1}.tol1] || IsNegative2D[expr. if omitted.tol_:(10^(-10))] := False /. is 10−10 . The default tolerance.tol1])] /. (Abs[Re[n]]<=tol1 && Abs[Im[n]]<=tol1)]. (tol)] Returns True if the expression is numerically zero or negative.

(* end of "‘Private" *) EndPackage[ ]. IsZeroOrNegative2D[expr_List. otherwise. The default tolerance.expr] ] /.436 D2DExpressions2D .tol1]&. returns True if any expression in the list is numerically zero or negative. bool @@ Map[IsZeroOrNegative2D[#. with the And option. is 10−10 . returns True if all the expressions in the list are numerically zero or negative.tol_:(10^(-10))] := Module[{tol1}. Or. (* end of "D2DExpressions2D‘" *) .bool_:Or. tol1=Tolerance$2D[tol]. Epilogue End[ ]. returns False. if omitted. (bool==And || bool==Or).Epilogue Zero or Negative Query (List) IsZeroOrNegative2D[exprList. Or | And. (tol)] With the default option.

Initialization BeginPackage["D2DGeometry2D‘". points. IsConcentric2D[cir_List] returns ’True’ if any pair of circles in the list are concentric. IsConcurrent2D[ln_List] returns ’True’ if any triple of lines in the list is concurrent. IsCollinear2D::usage= "IsCollinear2D[point. IsConcentric2D::usage= "IsConcentric2D[circle.line | circle | quad] returns ’True’ if the point is on the line.{"D2DCircle2D‘". IsConcurrent2D::usage= "IsConcurrent2D[line. circles or quadratics). IsCollinear2D[pt_List] returns ’True’ if any triple of points in the list are collinear.line] returns ’True’ if two lines are parallel. "D2DQuadratic2D‘"}].point.".".line. circle or quadratic.".obj2] returns ’True’ if the two objects are coincident. lines. IsParallel2D::usage= "IsParallel2D[line. IsOn2D::usage= "IsOn2D[point. "D2DMaster2D‘". "D2DLine2D‘". 437 . IsCoincident2D::usage= "IsCoincident2D[obj1. IsParallel2D[ln_List] returns ’True’ if any pair of lines in a list is parallel. "D2DPoint2D‘".".". D2DGeometry2D::usage= "D2DGeometry2D is a package providing various geometric queries.".circle] returns ’True’ if the two circles are concentric. "D2DExpressions2D‘".D2DGeometry2D The package D2DGeometry2D provides geometric query functions. IsCoincident2D[obj_List] returns ’True’ if any pair of objects in the list is coincident (coordinates.".line] returns ’True’ if the three lines are concurrent.point] returns ’True’ if the three points are collinear.

True].d}]].{b. . IsTripleParallel2D[ln_List] returns ’True’ if any triple of lines in a list is parallel. IsTangent2D[line.Utilities IsTripleParallel2D::usage= "IsTripleParallel2D[line.1].Pairs$2D[{b. PairQ$2D[{___}. IsTangent2D::usage= "IsTangent2D[line.". IsPerpendicular2D::usage= "IsPerpendicular2D[line.func_] := MemberQ[Map[func[#[[1]]. TripleQ$2D and Triples$2D are used to apply queries over lists of objects.b}}. Pairs$2D[L]].c_.". PairQ$2D[L:{a_. Length[L]<2] := L.c}]}. Triples$2D[{a_. Pairs$2D.438 D2DGeometry2D .#[[3]]]&. Begin["‘Private‘"]. Triples$2D[L]].#[[2]].b_.#}&.line. Pairs$2D[{a_.".Pairs$2D[{b.c}}. Triples$2D[{b. True].b_}] := {{a.d}]}.b_.#[[2]]]&.circle] returns ’True’ if two circles are tangent to each other. TripleQ$2D[L:{a_.c.func_] := False.c_}] := {{a. Length[L]<3] := L. IsPerpendicular2D[ln_List] returns ’True’ if any pair of lines in a list is perpendicular. Triples$2D[L_List /. Triples$2D[{a_. Pairs$2D[L_List /. Utilities Combinations The private functions PairQ$2D.line] returns ’True’ if three lines are parallel.func_] := MemberQ[Map[func[#[[1]].c.func_] := False.#[[1]].b_.c__}] := Flatten[{Map[{a.b_.d__}] := Flatten[{Map[({a.#[[2]]})&.line] returns ’True’ if two lines are perpendicular.1]. TripleQ$2D[{___}.b.c}].circle] returns ’True’ if a line is tangent to a circle. Pairs$2D[{a_.quad] returns ’True’ if a line is tangent to a quadratic.c__}. IsTangent2D[circle.b__}.

k1}. Returns True if two lines are coincident.b2_. circle] returns False.b2_. returns IsCoincident2D[Point2D[{x1_. otherwise. otherwise. Two Quadratics IsCoincident2D[quad.{ a2.Point2D[{x2_. IsCoincident2D[Q1:Quadratic2D[a1_. Returns True if two quadratics are coincident.c1*k2-c2*k1. Two Lines IsCoincident2D[line. Two Points IsCoincident2D[point. Returns True if two circles are coincident. coords] returns False.b1*k2-b2*k1.r2_]] := IsCoincident2D[{h1.d1_. b1}.k2}. {x2_?IsScalar2D.c2_]] := IsZero2D[{Det[{{ a1.e2_. {a1*k2-a2*k1. quad] returns False. point] False. {k2}=Select[List @@ Q2.k1_}.c1_].Coincident Queries 439 Coincident Queries Two Coordinates IsCoincident2D[coords. d1*k2-d2*k1.k2_}. b1}. Returns True if two points are coincident. Det[{{ a1. b2}}].Circle2D[{h2_.1]. Q2:Quadratic2D[a2_.b1_.f2_]] := Module[{k1.y1_?IsScalar2D}.b1_. IsCoincident2D[{x1_?IsScalar2D.y2_}]] := IsZero2D[x1-x2] && IsZero2D[y1-y2].c1_.D2DGeometry2D . Det[{{-c1.And] Two Circles IsCoincident2D[circle.f1_].{-c2. otherwise.-c1}. returns IsCoincident2D[Line2D[a1_.d2_.e1_. IsCoincident2D[Circle2D[{h1_. b2}}].{h2.Line2D[a2_. Returns True if two coordinates are coincident.f1*k2-f2*k1}].-c2}}]}. otherwise. IsZero2D[Map[Simplify[Expand[N[#]]]&. otherwise. And] ].k2}] && IsZero2D[r1-r2].c2_.{ a2.Not[IsZero2D[#]]&. line] False.y2_?IsScalar2D}] := IsZero2D[x1-x2] && IsZero2D[y1-y2]. .e1*k2-e2*k1.Not[IsZero2D[#]]&.r1_]. {k1}=Select[List @@ Q1.1].y1_}].

point] returns False. otherwise.{x2. IsCollinear2D[pts_List] := TripleQ$2D[pts. IsConcentric2D[cir_List] := PairQ$2D[cir.1}.y2_}].y1_}].IsCoincident2D].k1_}. IsConcentric2D[Circle2D[{h1_. IsCoincident2D[obj_List] := PairQ$2D[obj.1}. .1}}]]. List of Circles IsConcentric2D[cirList] Returns True if any combination of two circles in a list are concentric. returns False.Concentric Queries List of Objects IsCoincident2D[objList] Returns True if any pair of objects (points.Point2D[{x3_. Returns True if two circles are concentric.k2}].y3_}]] := IsZero2D[Det[{{x1.y1. Collinear Queries Three Points IsCollinear2D[point.{x3. otherwise. otherwise. Concentric Queries Two Circles IsConcentric2D[circle.y2.IsCollinear2D]. returns False. circles or quadratics) in a list are coincident. otherwise. circle] returns False.k2_}.{h2. lines.IsConcentric2D]. IsCollinear2D[Point2D[{x1_. Returns True if three points are collinear.Point2D[{x2_.k1}. returns False.r2_]] := IsCoincident2D[{h1.Circle2D[{h2_.y3. point.r1_]. List of Points IsCollinear2D[ptsList] Returns True if any combination of three points in a list are collinear. otherwise.440 D2DGeometry2D .

y1_}].c3_]] := IsZero2D[Det[{{a1.b2.IsConcurrent2D].f_]] := IsZero2D[a*x^2+b*x*y+c*y^2+d*x+e*y+f].b2_.y_}]. Coincident and parallel lines are not considered to be concurrent and will return False. returns False.L2:Line2D[a2_.b2_. otherwise. L3:Line2D[a3_. IsOn2D[Point2D[{x1_.Concurrent Queries 441 Concurrent Queries Three Lines IsConcurrent2D[line.b_. returns False.c2_]. returns False.c1}.k2_}. otherwise.y1_}]. IsOn2D[Point2D[{x_.b1_. Coincident and parallel lines are not considered to be concurrent and will return False.D2DGeometry2D . List of Lines IsConcurrent2D[lnsList] Returns True if any combination of three lines in a list are concurrent. On Queries Point On Line IsOn2D[point.Line2D[a2_. circle] Returns True if a point is on a circle.{a3. line. returns False.{a2.c2_]] := IsZero2D[a2*x1+b2*y1+c2]. quad] Returns True if a point is on a quadratic.b3_. otherwise.e_.b3.d_.L2]] && Not[IsParallel2D[L2.c3}}]] && Not[IsParallel2D[L1. IsConcurrent2D[lns_List] := TripleQ$2D[lns.b1.Circle2D[{h2_. .r2_]] := IsZero2D[(x1-h2)^2+(y1-k2)^2-r2^2]. IsConcurrent2D[L1:Line2D[a1_.c1_]. line] Returns True if three given lines are concurrent. otherwise. Point On Circle IsOn2D[point.c2}. otherwise.Quadratic2D[a_.L3]] && Not[IsParallel2D[L2. IsOn2D[Point2D[{x1_. line] Returns True if a point is on a line. returns False.L3]]. Point On Quadratic IsOn2D[point.c_.

Line2D[a2_.b1_. returns False. line.b1_. Returns True if three lines are mutually parallel. returns False. line] Returns True if two lines are parallel.IsParallel2D]. IsParallel2D[lns_List] := PairQ$2D[lns. otherwise.Perpendicular Queries Parallel Queries Two Lines IsParallel2D[line. otherwise. Line2D[a3_. returns False. Line2D[a2_. IsPerpendicular2D[Line2D[a1_. returns False. IsTripleParallel2D[lns_List] := TripleQ$2D[lns.Line2D[a2_. . List of Lines (by Pairs) IsParallel2D[lnsList] Returns True if any combination of two lines in a list are parallel. IsParallel2D[Line2D[a1_. Returns True if two lines are perpendicular.c1_].b3_.442 D2DGeometry2D . otherwise.c2_].c1_].b2_. Three Lines IsTripleParallel2D[line.IsTripleParallel2D]. otherwise.c2_]] := IsZero2D[a1*b2-a2*b1]. List of Lines (by Triples) IsTripleParallel2D[lnsList] Returns True if any combination of three lines in a list is parallel. line] otherwise.b1_.b2_. line] returns False.c2_]] := IsZero2D[a1*a2+b1*b2]. IsTripleParallel2D[Line2D[a1_.c1_]. Perpendicular Queries Two Lines IsPerpendicular2D[line.c3_]] := IsZero2D[a1*b2-a2*b1] && IsZero2D[a2*b3-a3*b2].b2_.

Tangent Queries 443 List of Lines IsPerpendicular2D[lnsList] Returns True if any combination of two lines in a list is perpendicular. (* end of "‘Private" *) EndPackage[ ].k1_}.r1_].k_}.q_.k2_}. Line and Quadratic IsTangent2D[line. (* end of "D2DGeometry2D‘" *) .d_.Circle2D[{h_. Two Circles IsTangent2D[circle.Or] && Not[IsCoincident2D[C1. Returns True if a line is tangent to a circle. circle] returns False. Returns True if a line is tangent to a quadratic. Tangent Queries Line and Circle IsTangent2D[line. IsTangent2D[C1:Circle2D[{h1_.C1_].r2_]] := Module[{d}.f_]] := IsZero2D[(4*c*f-e^2)*p^2 + 2*(d*e-2*b*f)*p*q + (4*a*f-d^2)*q^2 + 2*(b*e-2*c*d)*p*r + (4*a*c-b^2)*r^2 + 2*(b*d-2*a*e)*q*r].C2]] ]. Returns True if two circles are tangent to each other.IsPerpendicular2D]. IsZero2D[{d-(r1+r2)^2.r_]. circle] False. returns IsTangent2D[Line2D[A1_. d=(h1-h2)^2+(k1-k2)^2.r_]] := IsZero2D[r^2*(A1^2+B1^2)-(C1+A1*h+B1*k)^2]. IsTangent2D[Line2D[p_. otherwise. returns False.Quadratic2D[a_. Epilogue End[ ]. otherwise.c_. otherwise.C2:Circle2D[{h2_. otherwise. quad] returns False.e_.D2DGeometry2D .b_.B1_. IsPerpendicular2D[lns_List] := PairQ$2D[lns.d-(r1-r2)^2}.

.

theta] is the standard form of a hyperbola. semi-transverse axis length ’a’.{"D2DExpressions2D‘". "D2DGeometry2D‘". The second and third arguments are (positive) scalars representing the lengths of the semi-transverse and semi-conjugate axes. θ] Standard representation of a hyperbola in Descarta2D. Description Representation Hyperbola2D[{h.a. Conjugate2D]. "D2DSegment2D‘". a. The first argument is a list of coordinates representing the center of the hyperbola. SemiTransverseAxis2D::usage= "SemiTransverseAxis2D[hyperbola] returns the length of the semi-transverse axis of a hyperbola.". "D2DSketch2D‘". The fourth argument is the counter-clockwise rotation (in radians) of the hyperbola about the center point. semi-conjugate axis ’b’ and rotation angle ’theta’.". 445 . centered at (h. "D2DPoint2D‘". Begin["‘Private‘"].D2DHyperbola2D The package D2DHyperbola2D implements the Hyperbola2D object. Initialization BeginPackage["D2DHyperbola2D‘".k}. "D2DQuadratic2D‘". "D2DNumbers2D‘". SemiConjugateAxis2D::usage= "SemiConjugateAxis2D[hyperbola] returns the length of the semi-conjugate axis of a hyperbola. Conjugate2D::usage= "Conjugate2D is a keyword used to construct a conjugate hyperbola in Hyperbola2D[hyperbola.b. k}.". D2DHyperbola2D::usage= "’D2DHyperbola2D’ is a package providing support for hyperbolas. "D2DLine2D‘". "D2DTransform2D‘"}]. b.". Hyperbola2D::usage= "Hyperbola2D[{h. "D2DMaster2D‘".k).".

{t2.Pi].a.b_.0.reflection_:False][t_?IsScalar2D] := Module[{alpha.k}].t_].t_][{t1_?IsScalar2D. alpha=If[reflection==False.k}. SetDisplay2D[ Hyperbola2D[{h_. Quadratic2D[Hyperbola2D[{h_.k_}. SetDisplay2D[ Hyperbola2D[{h_.a_.a.e.b_.False}.a_. t1>t2.b.{h.t.0}.{t1. b. MemberQ[{True.b_.a_.Description Equation Quadratic2D[hyperbola] Constructs the quadratic representing the equation of a hyperbola. . False | True][t] Evaluates the primary branch of a hyperbola (when the keyword is False or omitted) or its reflection (when the keyword is True).reflection].b_.2*a^2*k. {False.t2}] ].446 D2DHyperbola2D .k_}.s}. The end points of the focal chords are at parameter values −1 and +1. Rotate2D[{h+a*Cosh[s*t].k_}. s=ArcCosh[e]. e=Sqrt[a^2+b^2]/a. MakePrimitives2D[ Hyperbola2D[{h.k+b*Sinh[s*t]}. theta. θ.b.k}] ] /.theta+alpha.t1}] ].0. Map[MakePrimitives2D[ Hyperbola2D[{h. The primary branch is the one opening about the +x-axis when the rotation angle is zero.t. k}.k}.t2_?IsScalar2D}] /.0]]]&.a_. SetDisplay2D[ Hyperbola2D[{h_.#].b_.theta_]] := Rotate2D[ Quadratic2D[b^2.a_.-a^2.k}.a.k_}.t. a.theta_. Executed when the package is loaded.k_}.b.t_][{t1_?IsScalar2D.t2_?IsScalar2D}] /.Hyperbola2D[{0.True].-a^2*b^2+b^2*h^2-a^2*k^2].{h.0}.False]. MakePrimitives2D[ Hyperbola2D[{h. Evaluation Hyperbola2D[{h. Hyperbola2D[{h_.b.True}] ].a. Graphics Provides graphics for a hyperbola by extending the Mathematica Display command.-2*b^2*h. t1<=t2. CurveLimits2D[{a.

k_}. Hyperbola2D[{h_.a.theta_. Detects a hyperbola with invalid arguments and returns the Hyperbola2D::invalid= "An invalid hyperbola of the form ’Hyperbola2D[‘1‘.Description 447 Validation Hyperbola2D[{h. θ] Detects a hyperbola with imaginary arguments and returns the $Failed symbol.b_.k}.theta}. a.k_}. θ] 0 ≤ θ < π.b_. b. .theta_] := (Message[Hyperbola2D::imaginary. k}.b. Normalizes the rotation angle on a hyperbola to the range Hyperbola2D[{h_.theta_] := (Message[Hyperbola2D::invalid.theta_] := Hyperbola2D[{h. b. ‘2‘. a.k_?IsScalar2D}. a_?IsScalar2D. Hyperbola2D[{h.theta_] := (Hyperbola2D @@ ChopImaginary2D[Hyperbola$2D[{h.b.b}.b_.theta}. k}.k}.theta}]). ‘4‘]’ was encountered.k. (FreeQ[{h.k.a.Or.0]). IsValid2D[hyperbola] Verifies that a hyperbola is syntactically valid. (FreeQ[{h.a_.b.a_._Pattern] && IsComplex2D[{h. Hyperbola2D::imaginary= "An invalid hyperbola of the form ’Hyperbola2D[‘1‘.$Failed) /.b. k}.b.{h.True]] := IsValid2D[Hyperbola2D[{h.k}.k.".b.".k}.theta_._Pattern] && (theta=!=PrimaryAngle2D[theta.k. If the imaginary parts are insignificant.False]] := IsValid2D[Hyperbola2D[{h.a_.k_}.a_. IsValid2D[ Hyperbola2D[{h_?IsScalar2D.b. (FreeQ[{h.PrimaryAngle2D[theta.$Failed) /.b.b_._Pattern] && IsZeroOrNegative2D[{a.a.b. ‘3‘.k}.a.a_.theta]]. Hyperbola2D[{h_.b.a. IsValid2D[Hyperbola2D[{h_.b.a.theta]].a.{h. θ] $Failed symbol.a.k_}.k}.0]). ‘4‘]’ has been detected.a. IsValid2D[Hyperbola2D[{h_.theta}.D2DHyperbola2D . they are removed. ‘3‘.theta]]) /.a. Hyperbola2D[{h.theta].k. the arguments cannot be imaginary. the lengths of the semi-transverse and semi-conjugate axes must be positive.a_.b.k_}.b_?IsScalar2D.Pi])).theta].Pi]] /.theta}. (FreeQ[{h.a. theta_?IsScalar2D]] := True.b_.k_}. a.theta}.a. b._Pattern] && IsTinyImaginary2D[{h.k.b_. ‘2‘. Hyperbola2D[{h_.

y0}]. Reflect2D[Hyperbola2D[{h_.L]].b_.a_.alpha_?IsScalar2D.a.q_.b.L].theta_]] := b.theta_]] := a.b_.a_.L:Line2D[p_.{x0.theta_].Transformations Scalars Angle of Rotation Angle2D[hyperbola] Returns the rotation angle of a hyperbola.r_]] := Hyperbola2D[Reflect2D[{h.alpha+theta].theta_].k}.a_. Returns the length of the semi-conjugate axis of a SemiConjugateAxis2D[Hyperbola2D[{h_. If the third argument is omitted. Semi-conjugate Axis Length SemiConjugateAxis2D[hyperbola] hyperbola.k_}.k_}. .b_. Semi-transverse Axis Length SemiTransverseAxis2D[hyperbola] hyperbola.a.a_.448 D2DHyperbola2D .b_.k}.k_}.theta_]] := theta. Rotate2D[Hyperbola2D[{h_.b_. it defaults to the origin (see D2DTransform2D. Returns the length of the semi-transverse axis of a SemiTransverseAxis2D[Hyperbola2D[{h_.k_}.nb). θ.b.a_. Angle2D[Hyperbola2D[{h_. coords] Rotates a hyperbola by an angle θ about a position specified by a coordinate list. {x0_?IsScalar2D.k_}. Transformations Reflect Reflect2D[hyperbola.ReflectAngle2D[theta. line] Reflects a hyperbola in a line.alpha. Rotate Rotate2D[hyperbola.y0_?IsScalar2D}] := Hyperbola2D[Rotate2D[{h.

hyperbola] Constructs the pole (point) of a polar (line) with respect to a hyperbola.{h. Line2D[Hyperbola2D[{h_.v_?IsScalar2D}] := Hyperbola2D[{h+u.k_}.Quadratic2D[H2]]. coords] Scales a hyperbola from a position given by coordinates. Line Construction Axis of a Hyperbola Line2D[hyperbola] Constructs a line that contains the transverse axis of a hyperbola. If the line is tangent to the hyperbola then the point is the point of tangency. If the third argument is omitted.theta_]. .s*a.k_}. {u_?IsScalar2D. Point Construction Center Point of a Hyperbola Point2D[hyperbola] Constructs the center point of a hyperbola.a_. it defaults to the origin (see D2DTransform2D.{x0.s*b.a_.k}]. s.b1_.a.k_}. Not[IsZeroOrNegative2D[s]].a_.theta] /. Translate2D[Hyperbola2D[{h_.k}. Point2D[Hyperbola2D[{h_. Translate Translate2D[hyperbola.b.theta_]] := Point2D[{h.s.k_}.D2DHyperbola2D .Point Construction 449 Scale Scale2D[hyperbola.y0_?IsScalar2D}] := Hyperbola2D[Scale2D[{h.k+v}.b_. Pole Point Point2D[line.b_.b_.theta_]] := Rotate2D[Line2D[0.1. Scale2D[Hyperbola2D[{h_.a_.s_?IsScalar2D.k}].theta_].theta.-k].H2:Hyperbola2D[{h_.nb).theta_]] := Point2D[L1.a_. Point2D[L1:Line2D[a1_.b_.y0}].b_. {u. {x0_?IsScalar2D.theta]. v}] Translates a hyperbola delta distance.k_}.c1_].

Hyperbola from Foci/Eccentricity Hyperbola2D[point.k_}.$Failed. Hyperbola2D[P1:Point2D[{x1_.y1_}]. Message[Hyperbola2D::invdef]. the eccentricity of a hyperbola must be greater than 1. If the point is on the hyperbola then the line is tangent to the hyperbola at the point.y2-y1]]] ]. Hyperbola2D[{h.a_. e] Constructs a hyperbola from the vertices and eccentricity.(y1+y2)/2}.b_. Line2D[P1:Point2D[{x1_.k}={(x1+x2)/2. If[IsZeroOrNegative2D[e-1] || IsCoincident2D[P1. Conjugate2D] hyperbola.a.a_.e_?IsScalar2D] := Module[{a.y2-y1]]] ].h.theta_]. b=a*Sqrt[e^2-1].k_}.theta_]] := Line2D[P1.P2:Point2D[{x2_. Hyperbola2D[{h.y1_}].P2].b. .(y1+y2)/2}. a=Distance2D[P1.Hyperbola Construction Polar Line Line2D[point.P2].k}={(x1+x2)/2.theta+Pi/2] Hyperbola from Vertices/Eccentricity Hyperbola2D[{point. hyperbola] Constructs the polar (line) of a pole (point) with respect to a hyperbola. {h.k}.P2]/(2*e).h.b.e_?IsScalar2D] := Module[{a.".Quadratic2D[H2]].k}.b.ArcTan[x2-x1. e] Constructs a hyperbola from the foci and eccentricity.a.b. Hyperbola Construction Conjugate Hyperbola Hyperbola2D[hyperbola.y1_}]. Hyperbola2D::invdef= "The defining geometry or eccentricity is invalid.$Failed. {h. If[IsZeroOrNegative2D[e-1] || IsCoincident2D[P1.H2:Hyperbola2D[{h_. Message[Hyperbola2D::invdef].a.y2_}]}.b. Constructs the conjugate hyperbola of a given Hyperbola2D[Hyperbola2D[{h_.k}.P2:Point2D[{x2_. point. the foci and vertices cannot be coincident and the focus cannot lie on the directrix. point}.k}. b=a*Sqrt[e^2-1]. a=Distance2D[P1.P2]/2.Conjugate2D] := Hyperbola2D[{h.b_.450 D2DHyperbola2D .k}.ArcTan[x2-x1.y2_}]. Hyperbola2D[{P1:Point2D[{x1_.

b.r_]. Message[Hyperbola2D::invdef].ArcTan[p.y1}-{p.q]]] ].a.h. s=(p*x1+q*y1+r)/(p^2+q^2). d=Distance2D[P1. Constructs a hyperbola from focus point.a.$Failed.k}. If[IsZeroOrNegative2D[e-1] || IsOn2D[P1. directrix line and Hyperbola2D[P1:Point2D[{x1_.q_. Epilogue End[ ].k}. (* end of "‘Private" *) EndPackage[ ].L2:Line2D[p_. line. a=d*e/(e^2-1). (* end of "D2DHyperbola2D‘" *) .L2].Epilogue 451 Hyperbola from Focus/Directrix/Eccentricity Hyperbola2D[point.y1_}]. Hyperbola2D[{h. b=a*Sqrt[e^2-1].b.k}={x1.q}*(a*s*e)/d.D2DHyperbola2D .s.L2]. e] eccentricity.e_?IsScalar2D] := Module[{d. {h.

.

"D2DParabola2D‘".L2]}]. Parameters2D::usage= "Parameters2D[line. Begin["‘Private‘"]. Intersection Points Intersection Point of Two Lines Points2D[line. parabola or hyperbola). D2DIntersect2D::usage= "D2DIntersect2D is a package for constructing the intersection points between curves.c1_]. {}. "D2DQuadratic2D‘". "D2DTransform2D‘"}]. 453 . conic] constructs a list containing the two parameters where a line intersects a conic (circle. "D2DEllipse2D‘".curve] constructs a list of intersection points of two curves. "D2DSolve2D‘".D2DIntersect2D The package D2DIntersect2D constructs points that are the intersection points of two curves. "D2DExpressions2D‘". "D2DEquations2D‘". "D2DGeometry2D‘".". line] point of two lines. "D2DPoint2D‘". Constructs a list containing up to one point that is the intersection Points2D[L1:Line2D[a1_.b1_.L2:Line2D[a2_. "D2DHyperbola2D‘". ellipse. Initialization BeginPackage["D2DIntersect2D‘". "D2DNumbers2D‘". {Point2D[L1.".c2_]] := If[IsParallel2D[L1.b2_. "D2DLine2D‘". "D2DMaster2D‘".". Points2D::usage= "Points2D[curve . It also computes the parameter values where a chordal line intersects a conic curve.{"D2DCircle2D‘".L2].

Ellipse2D. Coincident point solutions appear only once in the list returned. IsNegative2D[z].x0.Hyperbola2D. mapList=Which[IsZero2D[z]. z=r2^2-d^2.454 D2DIntersect2D .y0}={R.k2-b*d-#*a*Sqrt[z]}]&. Points2D[Circle2D[{h1_. #]]&].mapList}.mapList] ].Quadratic2D}].y}].y}]&. Points2D[Line2D[a1_.r1_]. {}.d.Quadratic2D}]).Circle2D[{h2_.Circle2D[{h2_.Quadratic2D}] && Is2D[crv2.Parabola2D. s=(h1-h2)^2+(k1-k2)^2.crv.mapList}. mapList=Which[IsZero2D[z].a1*h2+b1*k2+c1}/Sqrt[a1^2+b1^2]. Map[Point2D[{h2-a*d+#*b*Sqrt[z].sin. Points2D[crv1_.{x.y} /.y0. True.Map[Eqn$2D.{Line2D.Parabola2D.{}. {0}.1}]. d=Sqrt[s]. roots=Select[Solve2D[eqns. R=s+r1^2-r2^2.d}={a1. . circles.d.y}] /. The private function Eqn$2D returns a line or quadratic representing a curve.roots}.R.Not[IsComplex2D[{x.c1_].eqns. ellipses.b1_. {-1. IsNegative2D[z]. parabolas. {0}.Hyperbola2D. eqns=Map[Equation2D[#. Intersection Points of Two Circles Points2D[circle.Quadratic2D[crv]]. #)&.crv2_] := Module[{x. curve] Constructs a list containing at most four points that are the intersection points of two curves. Intersection Points of Two Curves Points2D[curve. Map[Point2D[{h1+cos*x0+#*sin*y0. circle] Constructs a list containing at most two points that are the intersection points of a line and a circle. {Circle2D.roots]] ] /. Eqn$2D[crv_] := If[Is2D[crv.k1}.b1.1}].z.k2-k1}/d.z. {a.{h2. {Circle2D.r2_]] := Module[{a.Sqrt[z=(4*s*r1^2-R^2)]}/(2d).b.Intersection Points Intersection Points of a Line and a Circle Points2D[line. Union[Map[(Point2D[{x.b. {}. {cos.k2}].Ellipse2D.Line2D.k1+sin*x0-#*cos*y0}]&.{x.r2_]] := Module[{s.mapList]] ].{crv1. circle] Constructs a list containing at most two points that are the intersection points of two circles. hyperbolas and quadratics. {x0.sin}={h2-h1. True. {-1.k2_}.k2_}.cos.crv2}]].y.k1_}. If[IsCoincident2D[{h1. Valid curve forms are lines. (Is2D[crv1.Line2D.

pts. ellipse] Returns a list of the two parameters on an ellipse where a line intersects the ellipse.a.pts].-k}]. SortNumeric$2D[{n1_. Circle Parameters2D[line.k_}.x1.Chordal Parameter Range 455 Chordal Parameter Range Sort Numerically The private function SortNumeric$2D sorts a list of two numbers into ascending order.$Failed] ]. PrimaryAngle2D[ArcTan[x2-h2.y1/b]].C2:Circle2D[{h2_.theta_]] := Module[{ln.-theta]. Ellipse Parameters2D[line. If[Length[pts]==2.$Failed] ].D2DIntersect2D . The parameters are sorted in the order (−∞ < t1 < t2 < +∞).C2].c1_].y1-k2]]. ln=Rotate2D[Translate2D[L1. when the arguments are symbolic) then the original ordering is returned. If the ascending order cannot be determined (for example.x2.E2:Ellipse2D[{h_.L1.n1}. retaining the exact form of the numbers. .{x2.y1}.x1.y2}.y2/b]]}]. Parameters2D[L1:Line2D[a1_.r2_]] := Module[{pts.x2.".C2].y2}.y2-k2]]}]. hyperbola] Returns a list of the two parameters on a hyperbola where a line intersects the hyperbola.y2}}=Map[Coordinates2D.0]]. If[Length[pts]==2. SortNumeric$2D[{PrimaryAngle2D[ArcTan[x1-h2.a_.y1.n2_}] := If[IsNegative2D[n2-n1]. SortNumeric$2D[{PrimaryAngle2D[ArcTan[x1/a. Parameters2D[L1:Line2D[a1_. {{x1.b1_. Parameters2D::noChord= "No chord exists between ‘1‘ and ‘2‘. and returns the sorted list.b_.0}. pts=Points2D[L1. pts=Points2D[ln.{-h.c1_].{x2.b.pts]. Hyperbola Parameters2D[line.k2_}.L1.Ellipse2D[{0.E2].y2}}=Map[Coordinates2D. PrimaryAngle2D[ArcTan[x2/a.y1. The parameters will be primary angles and sorted in increasing order (0 ≤ θ1 < θ2 < 2π).b1_. Message[Parameters2D::noChord.{n1.n2}]. {{x1.{n2. circle] Constructs a list containing the two parameters on a circle where a line intersects the circle.y1}. Message[Parameters2D::noChord. The parameters will be primary angles and sorted in increasing order (0 ≤ θ1 < θ2 < 2π).

Epilogue End[ ].$Failed. parabola] Returns a list of two parameters on a parabola where a line intersects the parabola. (* end of "D2DIntersect2D‘" *) . Message[Parameters2D::noChord. Parabola Parameters2D[line. If[Length[ans]==2. t1=ArcSinh[y1/b]/ArcCosh[Sqrt[a^2+b^2]/a].Epilogue The line must intersect the hyperbola’s primary branch (in standard position) in two points for a parameter range to be returned.$Failed] ].a. If[IsNumeric2D[{t1.c1_].x2.h2]. pts=Points2D[ln. t2=ArcSinh[y2/b]/ArcCosh[Sqrt[a^2+b^2]/a].H2]. ans=Select[Solve[a1*x+b1*y+c1==0.k_}.f_.H2[t2]]]]. Parameters2D[L1:Line2D[a1_.x.y1.L1.456 D2DIntersect2D .P2:Parabola2D[{h_.L1.-k}].t1. The parameters are sorted in increasing order (∞ < t1 < t2 < +∞). {{x1. #]]&].ans]]. (* end of "‘Private" *) EndPackage[ ]. ln=Rotate2D[Translate2D[L1.theta_]] := Module[{t.0]].y.theta_]] := Module[{ln.pts]. Parameters2D[L1:Line2D[a1_.H2]. {x. #)&.$Failed] ].{x2.t]. Message[Parameters2D::noChord.pts.L1. Message[Parameters2D::noChord.0}.y2}.Not[IsComplex2D[t /.{-h. Message[Parameters2D::noChord. H2:Hyperbola2D[{h_.y2}}=Map[Coordinates2D.b1_.y}=P2[t].ans}.b_.y1}.b.Hyperbola2D[{0.x1.P2].a_.t2}]] ].L1. SortNumeric$2D[Map[(t /. If[Length[pts]==2.t2}] && Not[IsCoincident2D[L1. If[IsZero2D[t1-t2].b1_. SortNumeric$2D[{t1.k_}.-theta].Line2D[H2[t1].c1_].$Failed.t2.

line] gives the angle measured counter-clockwise from the first line to the second line. "D2DSketch2D‘". {"D2DEquations2D‘". it is also required in Line2D[point. point. Perpendicular2D]. Line2D::usage= "Line2D[A.". "D2DPoint2D‘". line.". Angle2D[line.B.". Parallel2D::usage= "Parallel2D is the keyword required in Line2D[point.". Perpendicular2D]. "D2DGeometry2D‘". "D2DQuadratic2D‘". D2DLine2D::usage= "D2DLine2D is a package that implements the Line2D object. Perpendicular2D::usage= "Perpendicular2D is the keyword required in Line2D[point. Slope[lnseg] gives the slope of a line segment.C] is the standard form of a line with the equation Ax+By+C=0. Angle2D::usage= "Angle2D[line] gives the between the +x-axis and a line. "D2DTransform2D‘"}]. Angle2D[conic] gives the angle of rotation of a conic.". Begin["‘Private‘"]. Parallel2D]. "D2DNumbers2D‘". "D2DExpressions2D‘". 457 . Initialization BeginPackage["D2DLine2D‘". "D2DMaster2D‘". Slope2D::usage= "Slope2D[line] gives the slope of a line.".D2DLine2D The package D2DLine2D implements the Line2D object. line.

Returns a coordinate list {x. {a. C] Standard representation of a line in Descarta2D. poly=If[Head[expr]===Equal. Line2D[a.b1.b. B.x.{x_.b1_.y].c1}/Sqrt[a1^2+b1^2]. Equations Line2D[expr. c]. t. . {x. b=Coefficient[poly. c]. Executed when the package is loaded. the equation ax+by +c == 0 will also return Line2D[a. Evaluation Line2D[A.c]. a=Coefficient[poly.a.x].458 D2DLine2D .$Failed] ]. Graphics Provides graphics for a line by extending the Mathematica Display command.b*c}+{b.b. -{a*c.c}. y}. and ρ is the distance of the line from the origin. The normal form of a line.expr.y]. Other points are parameterized by distance along the line. The {x. C][t] Evaluates a parameter.c}={a1.b. y} arguments are assumed to be the names of the variables. the polynomial ax+by +c will return Line2D[a.y_}] := Module[{poly. c=(poly /. The point nearest the origin is at parameter t = 0. where θ is the angle the normal to the line makes with the +x-axis. For example. Line2D[a1_. on a line.-a}*t ]. B. sin θ.Description Description Representation Line2D[A. is also by provided by using the form Line2D[cos θ. Line2D[expr_. expr] //Expand. y}] Constructs a line from a linear polynomial in two unknowns.c}. Ax + By + C = 0. b.c1_][t_?IsScalar2D] := Module[{a.". The three arguments are the coefficients of the line in general form.y->0}) //Expand. If[IsZero2D[a*x+b*y+c-poly]. Line2D::noPoly= "The expression ‘1‘ cannot be recognized as a linear polynomial or equation in variables ‘2‘ and ‘3‘. expr[[1]]-expr[[2]].b. Message[Line2D::noPoly. −ρ]. {x->0. b. x cos θ + y sin θ − ρ = 0.

SetDisplay2D[ Line2D[a_.c_?IsScalar2D]] := True.b}.b. Also.".And. ‘2‘.b.b_. B.b.c_] := (Line2D @@ ({a.c}.b_. at least one of the first two coefficients must be non-zero. C] Returns the $Failed symbol when an invalid line is detected (the first two coefficients are zero).b. If the imaginary parts are insignificant.c].c_] := (Message[Line2D::invalid._Pattern] && IsZero2D[{a.c}/Sqrt[a^2+b^2])) /. Line[{Line2D[a. (FreeQ[{a.c}. IsValid2D[Line2D[a_?IsScalar2D.b_.b_.b._Pattern] && IsComplex2D[{a. Line2D[a_.c}.c}.0]). Line2D[a.c_] := (Line2D @@ ChopImaginary2D[Line$2D[a. B.And]).b._Pattern] && IsTinyImaginary2D[{a. (FreeQ[{a.b_.b.b.b.b. ‘3‘]’ has been detected. Line2D::imaginary= "An invalid line of the form ’Line2D[‘1‘.c][t1].$Failed) /._Pattern] && IsZero2D[{a.b.". Line2D::invalid= "An invalid line of the form ’Line2D[‘1‘.c][ AskCurveLength2D[ ]/2]}] ].c][-AskCurveLength2D[ ]/2]. IsValid2D[line] Verifies that a line is syntactically valid. Line2D[a_.c]. the arguments cannot be imaginary.c_]. Line2D[a_. Line2D[A.c_][{t1_?IsScalar2D.b.b.Description 459 SetDisplay2D[ Line2D[a_. ‘3‘]’ was encountered. Line[{Line2D[a.c][t2]}] ].c]]) /.c}.c_] := (Message[Line2D::imaginary. ‘2‘.c}]).b_?IsScalar2D.b.D2DLine2D . (FreeQ[{a.b}. they are removed.a. Validation Line2D[A.t2_?IsScalar2D}]. Line2D[a_. . C] Detects a line with imaginary coefficients and returns the $Failed symbol. (FreeQ[{a. Line2D[a.$Failed) /.0]).a.b_. normalizes lines with tiny coefficients to improve numerical stability.

Protect[Evaluate[protected]]. The result is returned in radians.Pi]. Distance from a Point to a Line Distance2D[point. Executed when the package is loaded. Simplify[expr_?(!FreeQ[#. Angle2D[Line2D[a_. line] Computes the distance between a point and a line.L2:Line2D[a2_.b_. Slope2D[Line2D[a_.c_]] := PrimaryAngle2D[If[IsZero2D[b]. Scalars Angle of a Line Angle2D[line] Computes the angle measured counter-clockwise from the +x-axis to a line.c_] :> (Line$2D @@ SimplifyCoefficients2D[{a.c_]]&).Line2D[a2_.ArcTan[-a/b]].c2_]] := Sqrt[(a2*x1+b2*y1+c2)^2/(a2^2+b2^2)]. Distance2D[Point2D[{x1_.b.opts___] := Simplify[expr /.b_.y1_}].c}]). Line2D[a_. Angle between Two Lines Angle2D[line.c_]] := If[IsZero2D[b]. Slope of a Line Slope2D[line] Computes the slope of a line. opts] /.Line2D[a_.-a/b].c_]]&).b_.b_. opts] /. line] Computes the angle measured counter-clockwise from the first line to the second line.b2_.Pi/2.Scalars Simplify and FullSimplify Simplify[line] and FullSimplify[line] Extends the Mathematica commands Simplify and FullSimplify to simplify the coefficients of a line by factoring out common factors.c}]).460 D2DLine2D . protected=Unprotect[FullSimplify].b1_. Angle2D[L1:Line2D[a1_.b. opts___] := FullSimplify[expr /. protected=Unprotect[Simplify]. Line$2D->Line2D.Pi].Line2D[a_. . Protect[Evaluate[protected]].c_] :> (Line$2D @@ SimplifyCoefficients2D[{a.Infinity. Line2D[a_. The result is returned in radians. Line$2D->Line2D.c1_].c2_]] := PrimaryAngle2D[(Angle2D[L2]-Angle2D[L1]).b2_.b_. FullSimplify[expr_?(!FreeQ[#.b_.

Scale2D[Line2D[a_. Rotate2D[Line2D[a_. θ.Transformations 461 Transformations Reflect Reflect2D[line. {u_?IsScalar2D.b2_. a*h+b*k+c-Cos[theta]*(a*h+b*k)-Sin[theta]*(a*k-b*h)]. If the third argument is omitted. coords] Rotates a line by an angle θ about a position given by coordinates.c1_].-a*u-b*v+c].c_]. Line Construction Normalize a Line Line2D[line] Constructs a line with normalized coefficients.nb).b_. it defaults to the origin (see D2DTransform2D.k_?IsScalar2D}] := Line2D[a*Cos[theta]-b*Sin[theta].c2_]] := Module[{a.b.v_?IsScalar2D}] := Line2D[a.b.c}. Line2D[a.Line2D[a2_.a*(s-1)*h+b*(s-1)*k+c*s] /.c] ].b. If the third argument is omitted. b=b1*(a2^2-b2^2)-2*a1*a2*b2. it defaults to the origin (see D2DTransform2D.c_].b_. Reflect2D[Line2D[a1_.nb).k_?IsScalar2D}] := Line2D[a. v}] Translates a line delta distance.b.c_].D2DLine2D . coords] Scales a line from a position given by coordinates. line] Reflects the first line in the second line.s_?IsScalar2D.{h_?IsScalar2D. c=c1*(a2^2+b2^2)-2*c2*(a1*a2+b1*b2).b1_. . Rotate Rotate2D[line. Translate Translate2D[line. b*Cos[theta]+a*Sin[theta].b_. a=a1*(b2^2-a2^2)-2*b1*a2*b2. {h_?IsScalar2D. {u. s. Not[IsZeroOrNegative2D[s]]. Translate2D[Line2D[a_.theta_?IsScalar2D. Scale Scale2D[line.

0}. Line2D::sameCoords= "The coordinates ‘1‘ and ‘2‘ are coincident. b}] provides a construction of the intercept form of a line.{x2_?IsScalar2D. Also.y2}]. point] Constructs a line through two points.c_]] := If[IsZeroOrNegative2D[c]. d] Constructs a line offset a given distance from a given line. using Line2D[{a.y1}.".{x2.y2_}]] := Line2D[{x1.{x2. Line Through Two Points Line2D[point.b_.y2_?IsScalar2D}] := If[IsCoincident2D[{x1.y0_}].y2}]. {0.c_]. Line2D[Point2D[{x1_.(x1*y2-x2*y1)] ]. Line2D[{x1_?IsScalar2D.Point2D[{x2_.m_?IsScalar2D] := Line2D[m. Line2D[Line2D[a_.y1_?IsScalar2D}. x/a + y/b = 1. coords] Constructs a line through two points given as coordinates.c}/Sqrt[a^2+b^2]] ]. Line Through a Point with a Given Slope Line2D[point. Offset Line Line2D[line. no valid line can be constructed. {a.-1.c-d*Sqrt[a^2+b^2]].0. Apply[Line2D.y1_}]. Line2D[Point2D[{x0_.d_?IsScalar2D] := Line2D[a.{x1.y0_}]. The offset distance may be positive or negative to produce the two possible offset lines. Apply[Line2D.y1}.c}/Sqrt[a^2+b^2]].b. Message[Line2D::sameCoords.Infinity] := Line2D[1.{x2.b.y1}. m] Constructs a line through a point with a given slope. .-x0].-{a. Line2D[-(y2-y1).b_. If the slope m is the symbol Infinity then a vertical line is returned.y2}].b. Line Through Two Coordinates Line2D[coords. Line2D[Point2D[{x0_.(x2-x1).$Failed.462 D2DLine2D .-m*x0+y0].Line Construction Line2D[Line2D[a_.

Perpendicular2D]. Line2D[P1:Point2D[{x1_.y1}. If[IsZero2D[{p. r=d*x1+e*y1+2*f.-x1*b2+y1*a2].x1*a2+y1*b2].b_.f_]] := Module[{p.-b2. Line2D[Point2D[{x1_. Perpendicular2D] Constructs a line perpendicular to a given line through a given point.y2}].D2DLine2D .c_.L2. Message[Line2D::noPolar.And].r]] ].-((x1^2+y1^2)-(x2^2+y2^2))/2] ].Q2:Quadratic2D[a_. point. Line2D[p.r}.e_.y1_}].y2}]. q=b*x1+2*c*y1+e. line.-a2.Q2].q}.Point2D[{x2_. Perpendicular2D] Constructs a line equidistant from two points (the perpendicular bisector of the line segment joining the two points).{x2. Message[Line2D::sameCoords.q. Parallel2D] point.b2_.$Failed.L2:Line2D[a2_.Line2D[a2_. (* end of "D2DLine2D‘" *) . Line Parallel to a Line Through a Point Line2D[point. p=2*a*x1+b*y1+d.c2_]] := Line2D[P1.{x2.c2_].Epilogue 463 Line Equidistant from Two Points Line2D[point.q.Parallel2D] := Line2D[-a2. Line2D::noPolar= "Since ‘1‘ is at the center of the conic. Polar Line of a Quadratic Line2D[point.y1_}].{x1. Line2D[P1:Point2D[{x1_. no polar line exists. Constructs a line parallel to a given line through a given Line2D[Point2D[{x1_.d_.b2_. Line2D[Point2D[{x1_.y1}.y1-y2. Line Perpendicular to a Line Through a Point Line2D[point. line.P1.Line2D[a2_.y1_}].c2_].$Failed.b2_. quad] Constructs a polar (line) of a quadratic with respect to a pole (point). Epilogue End[ ].Perpendicular2D] := If[IsCoincident2D[{x1.y1_}].y1_}]. If the point is on the quadratic then the line is the tangent at the point.y2_}].Perpendicular2D] := Line2D[b2.". (* end of "‘Private" *) EndPackage[ ]. The keyword Perpendicular2D is optional and may be omitted. Line2D[x1-x2.

.

lines and conics) from equations. 465 . Conic Construction Conic from Quadratic Loci2D[quad] Constructs a list of conics (proper or degenerate) represented by a quadratic. "D2DTransform2D‘"}]. eccentricity] constructs a list of loci (point.".{"D2DCircle2D‘". Utilities Not Zero Query The private function NotZero$2D returns the logical negation of IsZero2D. "D2DQuadratic2D‘". lines or conics) given the focus point. lines and conics) from equations. "D2DExpressions2D‘". "D2DHyperbola2D‘". "D2DGeometry2D‘".D2DLoci2D The package D2DLoci2D provides functions for constructing loci (points. NotZero$2D[r_] := Not[IsZero2D[r]]. D2DLoci2D::usage= "D2DLoci2D is a package that provides functions constructing loci (points. Loci2D[point. Loci2D::usage= "Loci2D[quad] constructs a list of loci (point. lines or conics) represented by a quadratic. "D2DPoint2D‘". line.". "D2DParabola2D‘". "D2DEllipse2D‘". Begin["‘Private‘"]. "D2DLine2D‘". directrix line and eccentricity. Initialization BeginPackage["D2DLoci2D‘".

If[IsNegative2D[disc]. Message[Loci2D::noLocus]. Loci2D[Quadratic2D[a_?IsZero2D. (* IsNegative2D[-a] && IsNegative2D[c] *) Map[Line2D[Sqrt[a].".e_?IsZero2D.1}]] ]. Loci2D[Quadratic2D[a_?NotZero$2D. Ax2 + Dx + F = 0: Constructs a list of two vertical parallel lines.e_?IsZero2D.f_]] := Module[{disc=d^2-4*a*f}.f_?IsZero2D]] := Which[ IsNegative2D[-a*c]. IsZero2D[a-c]. d_?IsZero2D.1}]] ]. Message[Loci2D::noLocus]. {Point2D[{0.".e.Sqrt[-f/a]]} ] /.d+#*Sqrt[disc]]&. Loci2D[Quadratic2D[a_?IsZero2D.Conic Construction Loci2D::central= "The quadratic is a central conic. If[IsNegative2D[disc]. Dx + Ey + F = 0: Constructs a list containing one line represented by a quadratic whose second-degree coefficients are all zero.0. Circle.f_?NotZero$2D]] := If[IsNegative2D[-f/a]. Map[Line2D[Sqrt[-a].b_?IsZero2D. Map[Line2D[0.1}]].c_?NotZero$2D.b_?IsZero2D.e_. Cx2 + Ex + F = 0: Constructs a list of two horizontal parallel lines. Parallel Lines.e+#*Sqrt[disc]]&.b_?IsZero2D.{-1. d_?IsZero2D. Ax2 + Cy 2 = 0: Constructs a list of two intersecting lines or a list containing a single point.f_]] := {Line2D[d.c_?IsZero2D.0]&.{}.e_?IsZero2D.Simplify[disc]]. but its type cannot be determined. Parallel Lines. d_?IsZero2D. Linear Polynomial. Ax2 + Cy 2 + F = 0.0.{-1. IsNegative2D[a] && IsNegative2D[-c].c_?NotZero$2D. Loci2D[Quadratic2D[a_?NotZero$2D.466 D2DLoci2D . Message[Loci2D::noLocus]. d_.c_?IsZero2D.Simplify[disc]]. .0}]}. Map[Line2D[2*a. A = C: Constructs a list of one circle.1}].{}. (NotZero$2D[d] || NotZero$2D[e]).0}.{-1.{}.#*Sqrt[c].{-1.#*Sqrt[-c]. Loci2D[Quadratic2D[a_?NotZero$2D.2*c.c_?NotZero$2D. Intersecting Lines. {Circle2D[{0.f]} /.f_]] := Module[{disc=e^2-4*c*f}.0. disc=If[IsZero2D[disc].d_.b_?IsZero2D. disc=If[IsZero2D[disc]. True.b_?IsZero2D.0]&. Loci2D::noLocus= "The quadratic has no real locus.e_.

Pi/2]}] ]. d_?NotZero$2D. {Parabola2D[{h.Pi]}. Ax2 + Cy 2 + F = 0: Constructs a list of one central conic (ellipse or hyperbola).f_]] := Module[{h.b_?IsZero2D. Message[Loci2D::central].b_?IsZero2D.4*a*c^2. π 2 or 3π 2 Loci2D[Quadratic2D[a_?NotZero$2D. h=-d/(2*a).-e/(2*c)}] /.{} ] /.f_]] := Translate2D[Loci2D[Quadratic2D[4*a^2*c.b_?IsZero2D. IsNegative2D[f/a] && IsNegative2D[-f/c]. {Hyperbola2D[{0.f_?NotZero$2D]] := Which[ IsNegative2D[-f/a] && IsNegative2D[-f/c].c_?IsZero2D.Sqrt[-f/a]. Central Conic. {Ellipse2D[{0.e_.k}. p. p=-d/(4*c).e_?IsZero2D. If[IsNegative2D[(-f/a)-(-f/c)]. {Hyperbola2D[{0.Sqrt[-f/a].k}.3Pi/2]}. IsNegative2D[-f/a] && IsNegative2D[f/c].0]}. Remove First-Degree Terms.0]}].c_?NotZero$2D. 0. . h=(e^2-4*c*f)/(4*c*d). thus returning the geometry to its original position.-c*d^2-a*e^2+4*a*c*f]]. Cy 2 + Dx + Ey + F = 0: Constructs a list of one parabola in standard position or rotated π radians.k}. k=-e/(2*c). d_. p. Ay 2 + Dx + Ey + F = 0: Constructs a list of one parabola rotated radians. {Ellipse2D[{0. IsNegative2D[f/a] && IsNegative2D[f/c]. The Translate2D function performs the inverse translation.p}. If[IsNegative2D[p]. True. {Parabola2D[{h.Sqrt[f/c]. Loci2D[Quadratic2D[a_?NotZero$2D.p}.d_.c_?NotZero$2D.c_?NotZero$2D. 0]}] ]. Loci2D[Quadratic2D[a_?IsZero2D. (NotZero$2D[d] || NotZero$2D[e]).0. Ax2 + Cy 2 + Dx + Ey + F = 0: Removes the x.Conic Construction 467 Parabola.k}.e_?NotZero$2D.and yterms from a quadratic by applying a change of variables to the equation. Message[Loci2D::noLocus].Sqrt[-f/c].-p.0}.-p.b_?IsZero2D. NotZero$2D[a-c].k.Sqrt[-f/c].Sqrt[-f/c]. d_?IsZero2D. k=(d^2-4*a*f)/(4*a*e).0}. If[IsNegative2D[p]. Parabola.0}.Pi/2]}. {Parabola2D[{h.D2DLoci2D . Loci2D[Quadratic2D[a_?NotZero$2D.{}.f_]] := Module[{h. {-d/(2*a).k.e_.Sqrt[-f/a].Sqrt[f/a].Pi/2]}.0. p=-e/(4*a).0}. {Parabola2D[{h.

e.b2_. fcLen.e_?IsScalar2D.theta].0]. Loci2D[P1:Point2D[{x1_. Loci2D::eccentricity= "The eccentricity.Q. Rotate2D[Scale2D[Loci2D[Q1]. Loci2D[Quadratic2D[a. The subsequent scaling and rotation accomplishes the inverse transformation. Conic Vertex Equation Loci2D[point.c_. Directrix and Eccentricity Loci2D[point.468 D2DLoci2D . line.e]] ].c2_].Epilogue Eliminate Cross-Term.d*k-e.d.L2.e.fcLen_?IsScalar2D. Epilogue End[ ].Sqrt[1+k^2]].y1_}].c*k^2+b*k+a.d_.e_?IsScalar2D] := If[IsZeroOrNegative2D[e]. eccentricity and rotation angle.y1_}]. ‘1‘.0.c. Loci2D[Quadratic2D[P1.b_?NotZero$2D.fcLen. If[Q===$Failed.e_?IsScalar2D] := Loci2D[P1. e] Constructs a list of conics (proper or degenerate) from a focus point. θ] Constructs a conic (circle. Loci2D[Quadratic2D[a_.fcLen_?IsScalar2D. Ax2 + Bxy + Cy 2 + Dx + Ey + F = 0: Eliminates the cross-term of a quadratic by making the substitution x = kx + y and y = ky − x which is a scaling and rotation.fcLen.". If k is sufficiently close to zero then the substitution is not needed.0.y1_}]. theta_?IsScalar2D] := Module[{Q}. it defaults to zero. the eccentricity must be positive. hyperbola or parabola) from the vertex point. Message[Loci2D::eccentricity.f].f_]] := Module[{k=Sqrt[((c-a)/b)^2+1]+(c-a)/b. If the rotation angle is omitted.Q1}. Loci2D[P1:Point2D[{x1_.L2:Line2D[a2_. -ArcTan[1/k]]] ].e].e.e*k+d.e.Loci2D[Q]] ].e_.f]]. is invalid. (* end of "‘Private" *) EndPackage[ ]. If[IsZero2D[k]. (* end of "D2DLoci2D‘" *) . thus returning the geometry to its original position. directrix line and eccentricity. ellipse. focal chord length. Conic from Focus.$Failed. Q=Quadratic2D[P1. Q1=Quadratic2D[a*k^2-b*k+c. Loci2D[P1:Point2D[{x1_.

469 . "Arc2D".{#}]]>0)&]. D2DMaster$2D::loaded= "The package ’D2DMaster2D’ has already been loaded. Remove[D2D$paths. Message[D2DMaster$2D::tooManyPaths. "Bulge2D".".m’ was found. If[Length[D2D$dir]>1. It establishes the names owned by all the other Descarta2D packages (so they will load automatically when referenced). "Circumference2D". (Length[FileNames["D2DMaster2D. "Area2D". D2D$dir=Select[D2D$paths. "Span2D"}].D2DMaster2D The package D2DMaster2D is the master package for Descarta2D. Message[D2DMaster$2D::noPath]. If[!MemberQ[$Path. "SectorArea2D".". "Complement2D"}].First[D2D$dir]]]]. and it provides the basic environment of queries supporting the Descarta2D objects. "Perimeter2D". D2D$paths=Map[(#<>"\\Descarta2D")&. {"D2DArcLength2D". unable to initialize Descarta2D. DeclarePackage["D2DArcLength2D‘". D2DMaster$2D::noPath= "The path to ’D2DMaster2D.AppendTo[$Path. DeclarePackage["D2DArea2D‘".m".m’ cannot be found.{"D2DArc2D". "SegmentArea2D"}]. using ‘1‘.First[D2D$dir]]. DeclarePackage["D2DArc2D‘". If[Length[D2D$dir]===0. Descarta2D Initialization Load the Descarta2D package stubs.$Path]. Message[D2DMaster$2D::loaded]]. D2DMaster$2D::tooManyPaths= "More than one path to ’D2DMaster2D. If[Names["D2DMaster2D"]=={"D2DMaster2D"}. "ArcLength2D".First[D2D$dir]]]. {"D2DArea2D".D2D$dir].".

"IsNegative2D". DeclarePackage["D2DNumbers2D‘". "Rho2D"}]. . {"D2DNumbers2D". DeclarePackage["D2DMedial2D‘". "Loci2D"}]. "Pencil2D"}]. "PrimaryAngleRange2D"}]. DeclarePackage["D2DConic2D‘". "ObjectNames2D"}]. {"D2DEquations2D". "IsConcurrent2D". "IsConcentric2D". "IsTripleParallel2D". "Conjugate2D". {"D2DGeometry2D". {"D2DPencil2D". "Parameters2D". DeclarePackage["D2DGeometry2D‘". "IsTangent2D"}]. "IsReal2D". DeclarePackage["D2DConicArc2D‘". "IsScalar2D". "XCoordinate2D". "IsZeroOrNegative2D"}]. DeclarePackage["D2DEquations2D‘". DeclarePackage["D2DEllipse2D‘". "Parabola2D"}]. DeclarePackage["D2DLoci2D‘".Descarta2D Initialization DeclarePackage["D2DCircle2D‘". "IsValid2D". {"D2DConicArc2D". "Polynomial2D". DeclarePackage["D2DQuadratic2D‘". DeclarePackage["D2DIntersect2D‘". "PrimaryAngle2D". {"D2DCircle2D". "ChopImaginary2D". "SemiTransverseAxis2D". DeclarePackage["D2DPoint2D‘". "Parallel2D". {"D2DParabola2D". "IsApproximate2D". "YCoordinate2D"}]. "ConicArc2D". "Asymptotes2D". "SemiConjugateAxis2D"}]. {"D2DConic2D". "IsScalarPair2D". "Angle2D". "Foci2D". {"Is2D". {"D2DQuadratic2D". "Coordinates2D". "SemiMajorAxis2D". {"D2DIntersect2D". DeclarePackage["D2DPencil2D‘". "Circle2D". "IsOn2D". DeclarePackage["D2DExpressions2D‘". "FocalLength2D". "IsTinyImaginary2D". "Equation2D".470 D2DMaster2D . {"D2DEllipse2D". {"D2DHyperbola2D". "Hyperbola2D".{"D2DLine2D". "Segment2D"}]. "IsComplex2D". "Slope2D"}]. DeclarePackage["D2DParabola2D‘". "IsCoincident2D". "Eccentricity2D". "IsCollinear2D". "Point2D". "IsZero2D". "IsParallel2D". DeclarePackage["D2DLine2D‘". "Apex2D". "Ellipse2D". DeclarePackage["D2DSegment2D‘". "IsPerpendicular2D". DeclarePackage["D2DMaster2D‘". "Quadratic2D"}]. "Radius2D"}]. {"D2DSegment2D". "SimplifyCoefficients2D"}]. "FocalChords2D". "Length2D". {"D2DPoint2D". "Points2D"}]. "SemiMinorAxis2D"}]. {"D2DLoci2D". "MedialEquations2D". "Distance2D". "Vertices2D"}]. "Directrices2D". {"D2DExpressions2D". "Line2D". "Perpendicular2D". {"D2DMedial2D". "IsNumeric2D". "MedialLoci2D"}]. DeclarePackage["D2DHyperbola2D‘".

{"D2DTangentLines2D". "ReflectAngle2D". "TangentCircles2D"}]. "Sketch2D"}]. IsValid2D::usage= "IsValid2D[object] returns ’True’ if the object is syntactically valid. "TangentLines2D". 471 . Is2D::usage= "Is2D[object. {"D2DSolve2D".". "Circumscribed2D". {"D2DSketch2D". "Triangle2D"}]. "MaxSeconds2D". "TangentQuadratics2D"}].headList] returns ’True’ if the object is valid and its head is included in the list of object heads. "AskCurveLength2D". "IsDisplay2D". "CurveLimits2D". "Rotate2D".D2DMaster2D . "Inscribed2D". ObjectNames2D::usage= "ObjectNames2D[ ] returns a list of strings that are the names of all Descarta2D objects. DeclarePackage["D2DTriangle2D‘". "Centroid2D". Begin["‘Private‘"]. {"D2DTriangle2D". DeclarePackage["D2DTangentLines2D‘". "SetDisplay2D". {"D2DTransform2D". "Reflect2D". DeclarePackage["D2DTransform2D‘". "Translate2D"}]. "Solve2D"}]. DeclarePackage["D2DTangentCircles2D‘". {"D2DTangentCircles2D".Package Initialization DeclarePackage["D2DSketch2D‘". "Scale2D". "TangentPoints2D"}]. {"D2DTangentPoints2D". "TangentSegments2D"}]. DeclarePackage["D2DSolve2D‘".". "MakePrimitives2D". D2DMaster2D::loaded= "The package ’D2DMaster2D’ has already been loaded.". "TangentConics2D". "TangentEquation2D". "CurveLength2D". "SolveTriangle2D".". D2DMaster2D::usage= "D2DMaster2D is the master package for Descarta2D.". Package Initialization BeginPackage["D2DMaster2D‘"]. DeclarePackage["D2DTangentPoints2D‘". {"D2DTangentConics2D". DeclarePackage["D2DTangentConics2D‘".

"Triangle2D"}. "Hyperbola2D". "Circle2D". Only the default case is implemented here. otherwise.objHead_List] := (IsValid2D[obj] && (Or @@ Map[(Head[obj]===#)&. otherwise.Epilogue Objects Object Names ObjectNames2D[ ] objects. "Point2D". IsValid2D[___] := False. returns False. objHeadList] Returns True if an object is valid and has its head included in the objHeadList. Epilogue End[ ]. returns False.472 D2DMaster2D . Default Queries Is Query Is2D[object. "ConicArc2D". (* end of "D2DMaster2D‘" *) . "Ellipse2D". "Segment2D". Valid Query IsValid2D[object] Returns True if the object is geometric and is syntactically valid. Returns a list of strings that are the symbolic names for all Descarta2D ObjectNames2D[]:={"Arc2D". "Parabola2D".objHead])). (* end of "‘Private" *) EndPackage[ ]. Is2D[obj_. "Quadratic2D". "Line2D".

". "D2DExpressions2D‘".D2DMedial2D The package D2DMedial2D constructs curves that are equidistant from two points.Circle2D}].obj2]. Initialization BeginPackage["D2DMedial2D‘".obj2_}] := If[TrueQ[IsCoincident2D[obj1.Circle2D}] && Is2D[obj2. Is2D[obj1. "D2DLine2D‘". ‘2‘} are coincident. MedialLoci2D::usage= "MedialLoci2D[{obj. lines or circles). MedialEquations2D[{obj1_. Message[MedialEquations2D::coincident. Begin["‘Private‘"].Line2D.". Medial Equations Medial Linear or Quadratic MedialEquations2D[{obj1. "D2DGeometry2D‘". no finite number of medial equations exist.". "D2DMaster2D‘".obj}] constructs a list of curves equidistant from two objects (points. obj2 }] Constructs a list of lines or quadratics equidistant from two objects (points.obj1. lines or circles).". 473 . MedialEquations2D::coincident= "The objects {‘1‘. D2DMedial2D::usage= "D2DMedial2D is a package that constructs medial equations and loci. lines or circles.{}.obj2}]]]] /. "D2DPoint2D‘". "D2DQuadratic2D‘"}].obj}] constructs a list of lines or quadratics equidistant from two objects (points.{"D2DCircle2D‘".obj2]].Line2D. Medial$2D[Reverse[Sort[{obj1. MedialEquations2D::usage= "MedialEquations2D[{obj. "D2DLoci2D‘". lines or circles).{Point2D.{Point2D.

c.q.Medial Loci Medial Loci Medial Loci MedialLoci2D[{obj1.c2_]}] := Module[{a. MedialEquations2D[{obj1. a=q^2. Medial$2D[{Point2D[{x1_.Circle2D}].y1_}]. . Point–Line The private function Medial$2D constructs a list of one quadratic representing the curve equidistant from a point and a line. Is2D[obj1. {Quadratic2D[a.d. e=-2*(y1+q*r).b.(x1^2+y1^2)-(x2^2+y2^2)]}.Circle2D}] && Is2D[obj2.p. {p.obj2_}] := Union[ Flatten[ Map[If[Head[#]===Line2D. d=-2*(x1+p*r). c=p^2.obj2}]]]] /. b=-2*p*q.e.2*(y2-y1).Line2D. Medial$2D[{Point2D[{x1_.y2_}]}] := {Line2D[2*(x2-x1).Loci2D[#]]&. Constructs a list of curves equidistant from two objects MedialLoci2D[{obj1_.474 D2DMedial2D .{Point2D.Line2D[a2_.y1_}].b2.r}={a2.#.d. Point–Point The private function Medial$2D constructs a list of one line equidistant from two points. lines or circles).c.q.{Point2D.f.f]} ].r}. Point–Circle The private function Medial$2D constructs a list of one quadratic representing the curve equidistant from a point and a circle.b. f=x1^2+y1^2-r^2.Line2D.c2}/Sqrt[a2^2+b2^2].Point2D[{x2_. obj2 }] (points.e.b2_.

f]} ].c]} /.1}] ]. Line–Circle The private function Medial$2D constructs a list of two quadratics representing curves equidistant from a line and a circle. Map[(Quadratic2D[a.r. a=4((x1-h2)^2-r2^2). a=a1*f2+s*a2*f1.c] /. If[IsZero2D[Sqrt[a^2+b^2] /.b1_.b. d=-2*(h2+p*(r+s*r2)). f=R^2-4*r2^2*(x1^2+y1^2).f1.b.d.a.f2. s->#)&.s}. a=q^2.q.D2DMedial2D .r2_]}] := Module[{a. .b.c.r2_]}] := Module[{R.b. s->#)&.c1_].b1_.Medial Loci 475 Medial$2D[{Point2D[{x1_.q. f1=Sqrt[a1^2+b1^2]. Circle–Circle The private function Medial$2D constructs a list of two quadratics representing the curves equidistant from two circles.Circle2D[{h2_.1}]] ].f.b. s->1]. only one line is returned in the list.e.c]} /. e=4*(R*(y1-k2)+2*r2^2*y1).L2].e.c1}/Sqrt[a1^2+b1^2]. e=-2*(k2+q*(r+s*r2)).b1. Medial$2D[{L1:Line2D[a1_.b.d. b=-2*p*q. R=(h2^2+k2^2)-(x1^2+y1^2)-r2^2. s->1].c2_]}] := Module[{a.e. Medial$2D[{Line2D[a1_.d.b. If[IsParallel2D[L1. c=c1*f2+s*c2*f1.f] /.y1_}]. c=4((y1-k2)^2-r2^2).c. {Quadratic2D[a.b2_. f2=Sqrt[a2^2+b2^2].d.p.e.Circle2D[{h2_.r}={a1.k2_}. Line–Line The private function Medial$2D constructs a list of two lines equidistant from two lines (the angle bisectors). {Line2D[a. c=p^2.f}.L2:Line2D[a2_. If the lines are parallel. d=4*(R*(x1-h2)+2*r2^2*x1).k2_}. {p. {-1.c1_]. b=8*(x1-h2)*(y1-k2).c. {Line2D[a. Map[(Line2D[a.{-1.b.c. f=(h2^2+k2^2)-r2^2-r*(r+2*s*r2).c.s}. s->-1. b=b1*f2+s*b2*f1.

D2=h2^2+k2^2.d. f=(D1-D2)^2-2*(D1+D2)*R+R^2.Epilogue Medial$2D[{Circle2D[{h1_.D2.476 D2DMedial2D . s->#)&. Map[(Quadratic2D[a.e. d=4*(h1*(-D1+D2+R)+h2*(D1-D2+R)).1}] ]. D1=h1^2+k1^2.a. c=4*((k1-k2)^2-R).c.f}. {-1. b=8*(h1-h2)*(k1-k2).d.r2_]}] := Module[{s.k2_}.b.r1_].Circle2D[{h2_. R=(r1-s*r2)^2. (* end of "‘Private" *) EndPackage[ ]. Epilogue End[ ]. a=4*((h1-h2)^2-R).f] /.c. e=4*(k1*(-D1+D2+R)+k2*(D1-D2+R)). (* end of "D2DMedial2D‘" *) .e.k1_}.D1.b.R.

". is 10^(-10).(tol)] removes tiny imaginary parts from complex numbers. D2DNumbers2D::usage= "D2DNumbers2D is a package that provides utilities for manipulating special numbers. The default tolerance. "D2DMaster2D‘"}]. 477 . {"D2DExpressions2D‘". the period must be Pi or 2Pi radians. the default tolerance. TrueQ[N[tol]>=0].#]&.D2DNumbers2D The package D2DNumbers2D provides functions for special manipulations of real numbers. if the period is omitted. Initialization BeginPackage["D2DNumbers2D‘". Begin["‘Private‘"]. it defaults to 2Pi. is 10−10 . if omitted. (tol)] Removes the tiny imaginary parts of complex numbers in the expression that are less than a given tolerance. if omitted.period] normalizes an angle to a period. PrimaryAngle2D::usage= "PrimaryAngle2D[theta. ChopImaginary2D[expr_.".tol_:(10^(-10))] := MapAll[If[IsTinyImaginary2D[#].Re[#].t2}] normalizes a range of angles to primary angles.". Chop Imaginary Part ChopImaginary2D[expr.". PrimaryAngleRange2D::usage= "PrimaryAngleRange2D[{t1.expr] /. ChopImaginary2D::usage= "ChopImaginary2D[expr.

478 D2DNumbers2D . The default period. {T1. is 2Pi radians.Epilogue Primary Angle PrimaryAngle2D[θ. (period==Pi || period==2Pi).t2_?IsScalar2D}] := Module[{T1. If[IsZeroOrNegative2D[T2-T1]. T1=PrimaryAngle2D[t1]. p. While[IsNegative2D[theta1].N[theta1]. if omitted.T2. theta1+=period]. (* end of "D2DNumbers2D‘" *) . If[Head[theta]===Real.N[2Pi].T2}] ]. The period. PrimaryAngle2D[theta_?IsScalar2D.period_:2Pi] := Module[{theta1=theta}. θ2 }] Normalizes a list of two angles so that the first is in the range 0 ≤ φ1 < 2π.twoPi}. T2=PrimaryAngle2D[t2]. (* end of "‘Private" *) EndPackage[ ]. 2Pi | Pi] Adjusts an angle to a primary angle in the range 0 ≤ θ < p. twoPi=If[Head[T2]===Real.theta1] ] /. Primary Angle Range PrimaryAngleRange2D[{θ1. PrimaryAngleRange2D[{t1_?IsScalar2D. {T1. Epilogue End[ ]. theta1-=period]. and the second is in the range φ1 < φ2 < (φ1 + 2π).2Pi]. may be Pi or 2Pi radians. While[IsZeroOrNegative2D[period-theta1].T2+twoPi}.

"D2DSegment2D‘". "D2DNumbers2D‘". The second argument is a (positive) scalar representing the distance from the vertex to the focus (the focal length). ’f’ is the distance from the vertex point to the focus. "D2DSketch2D‘".theta] is the standard form of a parabola that opens to the right (when theta=0). 479 . The first argument is a list of coordinates representing the position of the vertex of the parabola. {x. Begin["‘Private‘"]. "D2DGeometry2D‘". "D2DPoint2D‘". Description Representation Parabola2D[{h. θ] Standard representation of a parabola in Descarta2D.". The third argument is the counter-clockwise rotation (in radians) of the parabola about the vertex point. "D2DQuadratic2D‘".D2DParabola2D The package D2DParabola2D implements the Parabola2D object. "D2DTransform2D‘"}].". FocalLength2D::usage= "FocalLength2D[parabola] returns the focal length of a parabola.{"D2DExpressions2D‘". "D2DLine2D‘". k}.k}. ’theta’ is the counter-clockwise rotation (in radians) of the parabola about the vertex point. "D2DMaster2D‘". Initialization BeginPackage["D2DParabola2D‘". Parabola2D::usage= "Parabola2D[{h.y} is the vertex point of the parabola. f.f. D2DParabola2D::usage= "D2DParabola2D is a package that implements the Parabola2D object.".

k}.Description Equation Quadratic2D[parabola] Constructs the quadratic representing the equation of a parabola. k}. . Parabola2D[{h. CurveLimits2D[{0.0]]] ]. If the imaginary parts are insignificant.k}].t_].t2_?IsScalar2D}].t2}] ].k^2+4*h*f]. If the focal length is negative.t_][{t1_?IsScalar2D.1. Quadratic2D[Parabola2D[{h_.-2*k.f_. (FreeQ[{h.f.f. θ][t] Evaluates a parabola at a parameter t (−∞ < t < +∞). f.f. MakePrimitives2D[Parabola2D[{h.f_.0}.k_}. ‘3‘]’ has been detected. θ] Detects a parabola with an invalid focal length.f_.theta.k_}. the parabola is rotated π radians to make it positive.{h. k}.{t1.f.k}._Pattern] && IsTinyImaginary2D[{h.f_.0]).theta_]] := Rotate2D[Quadratic2D[0.theta_][t_?IsScalar2D] := Rotate2D[{h+f*t^2. Parabola2D::imaginary= "An invalid parabola of the form ’Parabola2D[‘1‘.k_}.-4*f.0. Parabola2D[{0.theta]]) /.f. Parabola2D[{h_.theta}. Validation Parabola2D[{h.k_}. f.theta}. MakePrimitives2D[Parabola2D[{h. the arguments cannot be imaginary.theta].k+2*f*t}.theta. f. Evaluation Parabola2D[{h. Parabola2D[{h_. they are removed. the $Failed symbol is returned.f.f_. Graphics Provides graphics for a parabola by extending the Mathematica Display command. ‘2‘. if the focal length is zero. (FreeQ[{h.t].k. Parabola2D[{h_.t].k.k. Executed when the package is loaded. θ] Detects a parabola with imaginary arguments and returns the $Failed symbol.{h.f_.".k.0}.k_}.k}.theta_] := (Parabola2D @@ ChopImaginary2D[Parabola$2D[{h. k}.theta_] := (Message[Parabola2D::imaginary.theta}]).f.480 D2DParabola2D . SetDisplay2D[ Parabola2D[{h_.{h.k_}. The end points of the latus rectum are at t = −1 and t = 1.theta}._Pattern] && IsComplex2D[{h.f.k}.f. SetDisplay2D[ Parabola2D[{h_.$Failed) /.k}].

k_}.f_. ‘2‘.theta_]] := theta. Focal Length FocalLength2D[parabola] Returns the focal length of a parabola.f_._Pattern] && IsNegative2D[f.f_.f_. Parabola2D[{h. . Reflect2D[Parabola2D[{h_. line] Reflects a parabola in a line.0]).f.ReflectAngle2D[theta. Angle2D[Parabola2D[{h_.k.theta]. Adjusts the rotation angle on a parabola to the range 0 ≤ θ < 2π.L2]]. Verifies that a parabola is syntactically valid.theta}.f. f_?IsScalar2D.".theta_] := Parabola2D[{h.$Failed) /.D2DParabola2D .b2_. IsValid2D[parabola] IsValid2D[Parabola2D[{h_?IsScalar2D. k}.f_.k}.-f.k_}.L2].k}.k}. FocalLength2D[Parabola2D[{h_.0]).{h. (FreeQ[{h. f.f.theta_].k}. Parabola2D[{h_. Scalars Angle of Rotation Angle2D[parabola] Returns the rotation angle of a parabola.f_. Transformations Reflect Reflect2D[parabola. θ] Parabola2D[{h_. Parabola2D[{h_. (FreeQ[{h.f.f.k.c2_]] := Parabola2D[Reflect2D[{h.theta_] := Parabola2D[{h.k_}. the focal length cannot be zero. ‘3‘]’ has been detected.k_}.theta_]] := f._Pattern] && (theta=!=PrimaryAngle2D[theta])).f.theta_] := (Message[Parabola2D::invalid.k.theta}.L2:Line2D[a2_.theta}. theta_?IsScalar2D]] := True.theta+Pi] /._Pattern] && IsZero2D[f.Scalars 481 Parabola2D::invalid= "An invalid parabola of the form ’Parabola2D[‘1‘.k_}. (FreeQ[{h.k_}.PrimaryAngle2D[theta]] /.k_?IsScalar2D}.

Translate2D[Parabola2D[{h_. Scale2D[Parabola2D[{h_.{u_?IsScalar2D. Point Construction Vertex Point Point2D[parabola] Returns the vertex point of a parabola.f.theta_].k}]. {x0_?IsScalar2D. s.theta_].b1_.y0_?IsScalar2D}] := Parabola2D[Rotate2D[{h.k_}.f.theta_]] := Point2D[L1.theta+alpha]. Rotate2D[Parabola2D[{h_.f_.y0}]. Scale Scale2D[parabola.Point Construction Rotate Rotate2D[parabola. coords] Rotates a parabola by an angle θ about a position specified by a coordinate list. {u.k_}. If the third argument is omitted. θ. coords] Scales a parabola from a position given by coordinates. Pole Point Point2D[line. Point2D[L1:Line2D[a1_.nb).f_.s. it defaults to the origin (see D2DTransform2D. If the line is tangent to the parabola then the point is the point of tangency.s_?IsScalar2D.k+v}.s*f. If the third argument is omitted.nb).f_. {x0_?IsScalar2D. Point2D[Parabola2D[{h_.k_}.{x0.f_.P2:Parabola2D[{h_.k_}.f_.theta] /.482 D2DParabola2D .c1_].theta]. Not[IsZeroOrNegative2D[s]].theta_]] := Point2D[{h.v_?IsScalar2D}] := Parabola2D[{h+u.y0_?IsScalar2D}] := Parabola2D[Scale2D[{h. Translate Translate2D[parabola.y0}].Quadratic2D[P2]].k}.theta_]. parabola] Constructs the pole (point) of a polar (line) with respect to a parabola.alpha.k}. . it defaults to the origin (see D2DTransform2D. v}] Translates a parabola delta distance.{x0.k_}.alpha_?IsScalar2D.

1.-k].f_.P1.L2]. Message[Parabola2D::invptln. Parabola Construction Parabola from Focus/Directrix Parabola2D[point. line] Constructs a parabola from a focus point and a directrix line.f_. no valid parabola can be constructed.L2:Line2D[a2_. Line2D[Parabola2D[{h_.b2_. Parabola2D[P1:Point2D[{x1_.theta_]] := Line2D[P1. parabola] Constructs the polar (line) of a pole (point) with respect to a parabola.{h. y1-YCoordinate2D[pt]]]] ]. Parabola2D::invptln= "The focus ‘1‘ is on the directrix ‘2‘.L2].L2].$Failed.k_}. Polar Line Line2D[point.c2_]] := Module[{pt}. pt=Point2D[P1.theta_]] := Rotate2D[Line2D[0. (* end of "D2DParabola2D‘" *) .".y1_}]. Line2D[P1:Point2D[{x1_.Quadratic2D[P2]]. If the point is on the parabola then the line is tangent to the parabola at the point. ArcTan[x1-XCoordinate2D[pt].P2:Parabola2D[{h_.k_}.Line Construction 483 Line Construction Axis Line Line2D[parabola] Constructs a line that contains the axis of a parabola.D2DParabola2D .pt]].pt]/2.k}].theta. (* end of "‘Private" *) EndPackage[ ]. Distance2D[P1.y1_}]. Parabola2D[Coordinates2D[Point2D[P1. If[IsOn2D[P1. Epilogue End[ ].

.

circles and quadratics). θ. Line2D[Line2D[a1_.Line2D[a2_. Line Pencils Pencil of Lines Through a Point Line2D[point. k. D2DPencil2D::usage= "D2DPencil2D is a package that construction pencil curves. Pencil of Lines Through Intersection Point Line2D[line.y_}].{"D2DCircle2D‘". Pencil2D] Constructs a line parameterized by the variable k representing the pencil of lines through the intersection of two lines.c2_].b2_.D2DPencil2D The package D2DPencil2D implements functions for computing families of Descarta2D curves (lines. line.(1-k)*c1+k*c2].x*Sin[t]-y*Cos[t]].b1_. "D2DPoint2D‘"}]. "D2DExpressions2D‘". Initialization BeginPackage["D2DPencil2D‘". "D2DGeometry2D‘".k_?IsScalar2D.Pencil2D] := Line2D[-Sin[t]. Pencil2D::usage= "Pencil2D is a keyword used to specify the formation of a pencil of objects. Pencil2D] Constructs a line parameterized by the variable θ representing the pencil of lines through a point. "D2DLine2D‘".t_?IsScalar2D.Pencil2D] := Line2D[(1-k)*a1+k*a2. The variable θ is the angle of rotation of the line.c1_].(1-k)*b1+k*b2.". "D2DQuadratic2D‘". Begin["‘Private‘"].Cos[t]. 485 .". Line2D[Point2D[{x_.

R2=h2^2+k2^2-r2^2. Circle2D[{H.b2_.b1_.b3_.c3_]. Pencil2D] Constructs a quadratic parameterized by the variable k representing the pencil of quadratics through the intersection points of two given quadratics. k.f2_].r1_].486 D2DPencil2D . k_?IsScalar2D. quad. Circle2D[Circle2D[{h1_. Q2=Quadratic2D[L3. line}.c4_]}. line}. Pencil2D] Constructs a quadratic parameterized by the variable k representing the pencil of quadratics passing through the four intersection points of four lines taken in predetermined pairs (1–2 with 3–4.Pencil2D] ].c1_.Q2.R] ].K.d2_.L2]. R=Sqrt[H^2+K^2-(1-k)*R1-k*R2]. k.K}.k2_}. Quadratic2D[Q1.d1_. (1-k)*d1+k*d2. Quadratic2D[{L1:Line2D[a1_.b1_. Quadratic2D[Quadratic2D[a1_.Pencil2D] := Module[{H.R}.c2_]}. Pencil2D] Constructs a circle parameterized by the variable k representing the pencil of circles having common intersection points with two given circles.Quadratic Pencils Circle Pencils Pencil of Circles from Two Circles Circle2D[circle.c1_].(1-k)*f1+k*f2].r2_].c2_.k. k_?IsScalar2D.(1-k)*c1+k*c2. and 1–3 with 2–4).L2:Line2D[a2_.R1.R2. k.k1_}. H=(1-k)*h1+k*h2.b2_. k_?IsScalar2D.b4_.f1_]. Quadratic2D[a2_.e1_.L4].(1-k)*b1+k*b2.Circle2D[{h2_. {L3:Line2D[a3_.Pencil2D] := Module[{Q1. Pencil of Quadratics from Four Lines Quadratic2D[{line.Pencil2D] := Quadratic2D[(1-k)*a1+k*a2.Q2}.e2_. Q1=Quadratic2D[L1. K=(1-k)*k1+k*k2. {line. . Quadratic Pencils Pencil of Quadratics from Two Quadratics Quadratic2D[quad. circle.(1-k)*e1+k*e2.L4:Line2D[a4_. R1=h1^2+k1^2-r1^2.

Line2D[P2.P4]}. (* end of "D2DPencil2D‘" *) . point.P4}].P4:Point2D[{x4_.P3]. Quadratic2D[P1:Point2D[{x1_.P2.$Failed. (* end of "‘Private" *) EndPackage[ ]. no valid quadratic pencil exists.P2].P4]}.y4_}].Epilogue 487 Pencil of Quadratics from Four Points Quadratic2D[point. k_?IsScalar2D.P2:Point2D[{x2_.Pencil2D] ]. point. Message[Quadratic2D::coincident]. point. k.Pencil2D] := If[IsCoincident2D[{P1.y2_}]. {Line2D[P1.y3_}].D2DPencil2D .". Pencil2D] Constructs a quadratic parameterized by the variable k representing the pencil of quadratics passing through four points. Quadratic2D::coincident= "Two or more of the points are coincident.k. Quadratic2D[{Line2D[P1.Line2D[P3. P3:Point2D[{x3_.P3.y1_}]. Epilogue End[ ].

.

.". y) in Descarta2D. {"D2DExpressions2D‘". y} Standard representation of a location specified by (x. line or circle. "D2DGeometry2D‘".a2.coords] gives the distance between two positions given by coordinates.y}] is the standard form of a point at coordinates {x.". XCoordinate2D::usage= "XCoordinate2D[point] gives the x-coordinate of a point.. 489 .y} coordinates of the point returned by Point2D[a1. Point2D::usage= "Point2D[{x.". "D2DTransform2D‘"}]. YCoordinate2D::usage= "YCoordinate2D[point] gives the y-coordinate of a point..". XCoordinate2D[coords] gives the x-coordinate of a coordinate location.pt | ln | cir] gives the distance between a point and a point... Description Representation {x. D2DPoint2D::usage= "D2DPoint2D is a package that implements the Point2D object. Initialization BeginPackage["D2DPoint2D‘". "D2DSketch2D‘".D2DPoint2D The package D2DPoint2D implements the Point2D object.". Distance2D[point.. "D2DNumbers2D‘". Distance2D::usage= "Distance2D[coords. "D2DQuadratic2D‘". Begin["‘Private‘"].y}.a2. "D2DLine2D‘". YCoordinate[coords] gives the y-coordinate of a coordinate location. "D2DMaster2D‘".". Coordinates2D::usage= "Coordinates2D[a1.].] gives the {x.

SetDisplay2D[ Point2D[{x_.490 D2DPoint2D .y}]} ].. they are removed. (FreeQ[{x.YCoordinate2D[pt]}] /. .y_}] := (Message[Point2D::imaginary. Scalars Coordinates Function Coordinates2D[args.].0]).y}.y}. Point2D[Point2D[x___]]->Point2D[x]. the coordinates of a point cannot be imaginary.Scalars Point2D[{x.y_}]. If[pt===$Failed.Point[{x.y_?IsScalar2D}]] := True. y}] Detects that a point has imaginary coordinates and returns the $Failed symbol. {AbsolutePointSize[4].y}. y}] or Point2D[coords] Standard representation of a point in Descarta2D.$Failed) /.{XCoordinate2D[pt]. Coordinates2D[a___]:= Module[{pt}. If the imaginary parts are insignificant. Point2D::imaginary= "An invalid point of the form ’Point2D[{‘1‘.. Point2D[{x_. IsValid2D[Point2D[{x_?IsScalar2D. y} coordinates of Point2D[args. IsValid2D[point] Verifies that a point is syntactically valid. Graphics Provides graphics for a point by extending the Mathematica Display command.] Returns the {x.y]. Point2D[{x_.".y}]). y) position of the point.pt.‘2‘}]’ has been detected. (pt=Point2D[a] /. (FreeQ[{x.x. Executed when the package is loaded._Pattern] && IsTinyImaginary2D[{x.y_}] := (Point2D @@ ChopImaginary2D[Point$2D[{x.{Point2D}] || pt===$Failed))].y}]]) /. Validation Point2D[{x. The coordinates define the (x._Pattern] && IsComplex2D[{x. (Is2D[pt.

Y-Coordinate (Ordinate) YCoordinate2D[coords] Returns the y-coordinate.y_}]] := Quadratic2D[1.y_}]] := x.y_?IsScalar2D}] := x. Distance2D[Point2D[{x1_.y2_?IsScalar2D}] := Sqrt[(x1-x2)^2+(y1-y2)^2]. Constructs the quadratic representing the equation of a point (a point Quadratic2D[Point2D[{x_.y_?IsScalar2D}] := y.y2_}]] := Sqrt[(x1-x2)^2+(y1-y2)^2]. point] Computes the distance between two points. XCoordinate2D[{x_?IsScalar2D. X-Coordinate (Abscissa) XCoordinate2D[coords] Returns the x-coordinate. Distance between Two Points Distance2D[point. YCoordinate2D[Point2D[{x_.y1_}]. XCoordinate2D[point] XCoordinate2D[Point2D[{x_.-2*x. X-Coordinate of a Point (Abscissa) Returns the x-coordinate of a point.D2DPoint2D .y1_?IsScalar2D}. Computes the distance between two locations defined by Distance2D[{x1_?IsScalar2D.y_}]] := y. Equations Quadratic Quadratic2D[point] circle). . coords] coordinates. YCoordinate2D[{x_?IsScalar2D.-2*y.1. {x2_?IsScalar2D.Point2D[{x2_.Equations 491 Distance between Coordinates Distance2D[coords.x^2+y^2].0. Y-Coordinate of a Point (Ordinate) YCoordinate2D[point] Returns the y-coordinate of a point.

Rotate2D[Point2D[{x_. Point Construction Point from Coordinates Point2D[coords] Constructs a point from the x. Scale2D[Point2D[{x_.y_}]. Reflect2D[Point2D[{x_.k_?IsScalar2D}] := Point2D[ Rotate2D[{x. {x0_?IsScalar2D.y}.y-y0}] /. Scale Scale2D[point. {u. Translate Translate2D[point.y_}]. coords] Rotates a point by an angle θ about a position specified by coordinates.and y-coordinates.y_?IsScalar2D] := Point2D[{x. it defaults to the origin (see D2DTransform2D.nb).492 D2DPoint2D .s_?IsScalar2D.b_.{u_?IsScalar2D. it defaults to the origin (see D2DTransform2D.L] ]. θ. v}] Translates a point delta distance. If the argument is omitted. Rotate Rotate2D[point.{h.v_?IsScalar2D}] := Point2D[{x+u. Not[IsZeroOrNegative2D[s]]. s. Point2D[x_?IsScalar2D.y}].y_}].theta.y}.y_}].theta_?IsScalar2D.L:Line2D[a_.c_]] := Point2D[ Reflect2D[{x. If the third argument is omitted.k}] ].y0_?IsScalar2D}] := Point2D[{x0. {h_?IsScalar2D. Translate2D[Point2D[{x_.y0}+s*{x-x0.nb). line] Reflects a point in a line. .y+v}]. coords] Scales a point from a position given by coordinates.Point Construction Transformations Reflect Reflect2D[point.

line.Point Construction 493 Midpoint of Two Points Point2D[point.d_?IsScalar2D] := Point2D[{x1. Point2D::noDir= "Points {‘1‘.C2_]] := Point2D[{( B2^2*x1-A2*B2*y1-A2*C2).". d] Constructs a point at a distance d from a given point in the direction of a given line. If the given point is on the line then the offset point will also be on the line.$Failed. point. If[IsZero2D[d12].r2_?IsScalar2D] := If[IsZero2D[r1+r2].r2].y1}+{d*(x2-x1). Point Offset Along a Line Point2D[point.y1_}].d_?IsScalar2D] := Module[{d12=Sqrt[(x2-x1)^2+(y2-y1)^2]}.B2_. The distance may be positive or negative producing one of the two possible points. Point2D::noRatio= "The sum of the ratio numbers {‘1‘.y1_}].Line2D[A2_. point] Constructs the midpoint of two given points.d*(y2-y1)}/d12]] ]. Point2D[Point2D[{x1_. Point Projected Onto a Line Point2D[point. .Point2D[{x2_. Message[Point2D::noRatio.Point2D[{x2_.y2_}].P2:Point2D[{x2_. ‘2‘} are coincident and do not define a valid direction.P1.y1_}]. r1_?IsScalar2D. Constructs a point on a line by projecting a given point onto the Point2D[Point2D[{x1_.r1. ‘2‘} cannot be zero.y1_}].y1*r2+y2*r1}/(r1+r2)]].y1}+{-d*B2.y1+y2}/2]. Message[Point2D::noDir.D2DPoint2D . r1 .$Failed.y2_}].".d*A2}/Sqrt[A2^2+B2^2]]. Point of Division Point2D[point. r2 ] Constructs a point which divides a line segment determined by two points into the ratio r1 /r2 .y2_}]] := Point2D[{x1+x2. Offset Point from Two Points Point2D[point.P2].C2_]. point. Point2D[Point2D[{x1_. Point2D[{x1.B2_. Point2D[{x1*r2+x2*r1. line] line.Line2D[A2_. Point2D[Point2D[{x1_. (-A2*B2*x1+ A2^2*y1-B2*C2)}/(A2^2+B2^2)].y1_}]. d] Constructs a point at a given distance from the first point on the line joining the two given points. Point2D[P1:Point2D[{x1_.

A2*x+B2*y+C2}/Sqrt[A2^2+B2^2]. {a.$Failed. v}] Constructs a point offset from the origin of an inferred coordinate system. True.c_.$Failed. quad] Constructs a pole (point) of a quadratic with respect to a polar (line).C1_].". v) in the inferred coordinate system. line] Constructs the intersection point of two lines. it has no center point.d_.L2].Q1]. Message[Point2D::coincident.x=x1+A2.y=y1}. Point2D[L1:Line2D[A1_. If[IsZero2D[disc]. The point constructed has coordinates (u.Point Construction General Offset Point Point2D[point.B2_.L2]. IsParallel2D[L1. Point2D[Q1:Quadratic2D[a_.L2].b_. .x=x1. Point2D[{x-a*d+(a*u-b*v)*d/D.2*a*e-b*d}/(b^2-4*a*c)]] ].e_.y-b*d+(a*v+b*u)*d/D}] ].B2.C2_]. lines ‘1‘ and ‘2‘ are coincident. Point2D[P1:Point2D[{x1_.".B2_.b. Pole Point of a Quadratic Point2D[line. lines ‘1‘ and ‘2‘ are parallel.L1. line.L2].L1.D. Point2D::parallel= "No intersection point exists. Point2D::coincident= "No unique intersection point exists. Intersection Point of Two Lines Point2D[line.A2*C1-A1*C2}/(A1*B2-A2*B1)] ].d. Point2D::notCentral= "‘1‘ is not a central conic.$Failed. Point2D[{2*c*d-b*e. D=Sqrt[d^2]. The given point is on the +x-axis of the inferred coordinate system and the given line is the y-axis. Message[Point2D::notCentral.C2_]] := Which[ IsCoincident2D[L1.B1_.L2:Line2D[A2_. If[IsOn2D[P1.y1_}].L2:Line2D[A2_. Center Point of a Quadratic Point2D[quad] Constructs the center point of a central quadratic.v_?IsScalar2D}] := Module[{a. {u.". {u_?IsScalar2D.f_]] := Module[{disc=b^2-4*a*c}.b.L2]. Point2D[{B1*C2-B2*C1.y=y1+B2]. Message[Point2D::parallel.494 D2DPoint2D .d}={A2.

Message[Point2D::noPole. Point2D[L1:Line2D[A1_. no pole point exists. q12=A1*(b*e-2*c*d)+B1*(b*d-2*a*e)+C1*(4*a*c-b^2). (* end of "D2DPoint2D‘" *) 495 .Epilogue Point2D::noPole= "Since ‘1‘ passes through the center of the conic. (* end of "‘Private" *) EndPackage[ ].B1_.$Failed.D2DPoint2D . Point2D[{q1. Epilogue End[ ].b_.".e_. q1=A1*(4*c*f-e^2)+B1*(d*e-2*b*f)+C1*(b*e-2*c*d).q1.d_. If[IsZero2D[q12].Q2:Quadratic2D[a_.L1.f_]] := Module[{q12.C1_].Q2].q2}. q2=A1*(d*e-2*b*f)+B1*(4*a*f-d^2)+C1*(b*d-2*a*e).q2}/q12]] ].c_.

.

Quadratic2D[a. "D2DSketch2D‘". "D2DTransform2D‘"}]. SetDisplay2D[ Quadratic2D[a_. Executed when the package is loaded. "D2DLoci2D‘". Begin["‘Private‘"]. c.b_. b. 497 . Loci2D[Quadratic2D[a. f] represents ax2 + bxy + cy 2 + dx + ey + f .b.d.d.D2DQuadratic2D The package D2DQuadratic2D implements the Quadratic2D object.f] represents the polynomial a*x^2+b*x*y+c*y^2+d*x+e*y+f.c_.f_].c. {"D2DEquations2D‘".c. Description Representation Quadratic2D[a.e_. e. "D2DMaster2D‘". "D2DExpressions2D‘". e. b.d_. Quadratic2D::usage= "Quadratic2D[a. "D2DNumbers2D‘". D2DQuadratic2D::usage= "D2DQuadratic2D is a package providing support for the quadratic object.e. f] A quadratic is used to represent a quadratic polynomial in two unknowns. "D2DLine2D‘".f]]]. c. d.e. Graphics Provides graphics primitives for a quadratic by extending the Mathematica Display command. d.". Initialization BeginPackage["D2DQuadratic2D‘". "D2DPoint2D‘".b.".

e_.b_.e.And]).d_.d.b_. f] Returns the $Failed symbol when an invalid quadratic is detected (the first five coefficients are zero).q_. e. IsValid2D[quad] Verifies that a quadratic is valid.a.f}.c_.$Failed) /.d.{x._Pattern] && IsZero2D[{a.f_] := (Message[Quadratic2D::imaginary. ‘5‘.0]).f}/Sqrt[a^2+b^2+c^2+d^2+e^2])) /.d.b.c.f}. b. Quadratic2D::imaginary= "An invalid quadratic of the form ’Quadratic2D[‘1‘. ‘6‘]’ was encountered.b_.e_.e_.d.f_].e.c_.b_.b.d.f}]).f]. c. they are removed. Quadratic2D::invalid= "An invalid quadratic of the form ’Quadratic2D[‘1‘. Reflect2D[Q:Quadratic2D[a_.e_.b_?IsScalar2D.c_.Transformations Validation Quadratic2D[a. .f].c.d.f_] := (Message[Quadratic2D::invalid.{x.b.c. b.f}.d.f}._Pattern] && IsTinyImaginary2D[{a. the arguments cannot be imaginary.d. Also.".b. ‘6‘]’ has been detected.b.e}.{x. (FreeQ[{a.$Failed) /. e. If the imaginary parts are insignificant.b.c.L].y}. Quadratic2D[a_. c_?IsScalar2D.c.f_?IsScalar2D]] := True.b.c.b_. e_?IsScalar2D.d_.e._Pattern] && IsZero2D[{a.y}.e.d_?IsScalar2D. IsValid2D[ Quadratic2D[a_?IsScalar2D.e._Pattern] && IsComplex2D[{a.e.c.c.d.d_.y}].e.x.b. d.e. Quadratic2D[a_.And. normalizes quadratics with tiny coefficients to improve numerical stability. eq1=Equation2D[Q.b.a. f] Detects a quadratic with imaginary coefficients and returns the $Failed symbol.e. (FreeQ[{a.498 D2DQuadratic2D .c. Quadratic2D[a.f}.f_] := (Quadratic2D @@ ({a. Quadratic2D[a_.r_]] := Module[{eq1.b. eq2=Reflect2D[eq1.d. ‘4‘. c.c.e. Transformations Reflect Reflect2D[quad.y}] ].d.e}. ‘5‘. ‘3‘.eq2.c_. Quadratic2D[a_. ‘3‘.0]).f]]) /.c. ‘2‘. Quadratic2D[eq2. d.L:Line2D[p_.".d.b. at least one of the first five coefficients must be non-zero.c.d_. ‘2‘.b.f_] := (Quadratic2D @@ ChopImaginary2D[Quadratic$2D[a. (FreeQ[{a.d_.e_. ‘4‘. line] Reflects a quadratic in a line. (FreeQ[{a.c_.

y}.y}].e-2*c*v-b*u.Quadratic2D[a_.y}] ] /.eq2.e. Simplify[expr_?(!FreeQ[#. Translate2D[Quadratic2D[a_.k}].eq2.s_?IsScalar2D. opts___] := Simplify[expr /.c_.b_.D2DQuadratic2D .c_.s. {h_?IsScalar2D.f_]. Rotate2D[Q:Quadratic2D[a_.e_.d_. Quadratic Construction Simplify and FullSimplify Simplify[quad] and FullSimplify[quad] Extends the Mathematica Simplify and FullSimplify commands to simplify the coefficients of a quadratic by factoring out common factors.y}] ].b. a*u^2+b*u*v+c*v^2-u*d-v*e+f].f_]]&). {h_?IsScalar2D. If the third argument is omitted. Quadratic2D[eq2.x.k_?IsScalar2D}] := Module[{eq1.f_].{x. Not[IsZeroOrNegative2D[s]]. {u. v}] Translates a quadratic delta distance. eq2=Rotate2D[eq1.{x.b_. .{x. Translate Translate2D[quad.{h.x.d_.e_.c_.e_.d-2*a*u-b*v. it defaults to the origin (see D2DTransform2D. Executed when the package is loaded.{x.e_.c_.c. it defaults to the origin (see D2DTransform2D. Scale2D[Q:Quadratic2D[a_.k_?IsScalar2D}] := Module[{eq1. coords] Rotates a quadratic by an angle θ about a position specified by a coordinate list. coords] Scales a quadratic from a position given by coordinates. Quadratic2D[a_.{x. If the third argument is omitted.k}]. Protect[Evaluate[protected]].y}. eq1=Equation2D[Q.b. θ.f_]. eq2=Scale2D[eq1. Quadratic2D[eq2.f_] :> (Quadratic$2D @@ SimplifyCoefficients2D[{a.nb). Quadratic$2D->Quadratic2D.b_.y}].y}.v_?IsScalar2D}] := Quadratic2D[a.c.theta_?IsScalar2D.b_. {u_?IsScalar2D.f}]).d.y}. opts] /.theta.d_. eq1=Equation2D[Q.d_. s.nb).{x.b_.{h.Quadratic Construction 499 Rotate Rotate2D[quad. protected=Unprotect[Simplify].c_.e_. Scale Scale2D[quad.d_.

c=Coefficient[eqn.d.f_]]&).b. the expression ax2 + bxy + cy 2 + dx + ey + f == 0 will return Quadratic2D[a.d.b_.x].x.f]. {x*y->0}].y->0}) //Expand.c_.b_.e_. f=(eqn /. e.b. Quadratic2D[a.-2*y.y_}] := Module[{eqn.e. Quadratic2D[Quadratic2D[a_.Quadratic2D[a_. Normalize Quadratic2D[quad] Normalizes the coefficients of a quadratic so that the sum of the squares of the first five coefficients equals one.y^2]. Quadratic2D::noPoly= "The expression ‘1‘ cannot be recognized as a quadratic polynomial or equation in variables ‘2‘ and ‘3‘.b.c_.c_. opts___] := FullSimplify[expr /. {x->0.b. expr[[1]]-expr[[2]].d_.d_.f}]). b. d.d.0. the polynomial ax2 + bxy + cy 2 + dx + ey + f will also return Quadratic2D[a. y}] Forms a quadratic from a polynomial or equation in two unknowns. expr] //Expand. Quadratic2D[expr_.b_.f_]] := (Quadratic2D @@ ({a.Quadratic Construction protected=Unprotect[FullSimplify].". d. eqn=If[Head[expr]===Equal.c. f]. The x and y arguments are assumed to be the names of the variables. Message[Quadratic2D::noPoly. Quadratic$2D->Quadratic2D.-2*x.e.1. b.{x_.y]. {x. .x^2+y^2].a.x^2].e.y]. c.e_. {x*y->0}].c.x*y]. Protect[Evaluate[protected]]. Quadratic from Equation/Polynomial Quadratic2D[expr. c. opts] /. Forms a (degenerate) quadratic from a point given by a coordinate Quadratic2D[{x_?IsScalar2D.c.500 D2DQuadratic2D . b=Coefficient[eqn.f}/Sqrt[a^2+b^2+c^2+d^2+e^2])).c. FullSimplify[expr_?(!FreeQ[#.d_. Quadratic from Coordinates Quadratic2D[coords] list (a point circle). f].f_] :> (Quadratic$2D @@ SimplifyCoefficients2D[{a. e=Coefficient[Expand[eqn /. d=Coefficient[Expand[eqn /.expr.f}. For example.$Failed] ]. e.e_.y_?IsScalar2D}] := Quadratic2D[1. a=Coefficient[eqn. Quadratic2D[a_.e. If[IsZero2D[a*x^2+b*x*y+c*y^2+d*x+e*y+f-eqn].d.

point] five points. Quadratic2D[eqn. Quadratic2D[a. IsZero2D[{c1.y1. Translate2D[Q. y4^2.1}.6}]. x2^2.e.e_.y1_}]. x3. y5}.c4.y}. y3. x5^2}.-f] ]. point] points.x2.L5}. Quadratic Through Five Points Quadratic2D[point.-d. Q=Quadratic2D[lns].{-u. x4^2.f}.b_.y2_}].b2_.4. line.c5_]] := Module[{u.Point2D[{x3_.b.4*a*c-b^2].2*d*e-4*b*f.lns.d. point.1}.c.1}}]. point.c3.{-5.Point2D[{x3_. line] Constructs a quadratic tangent to five lines. Point2D[{x4_.{-5. {x2^2+y2^2.e.c5}.x3.y4_}].4*a*f-d^2.4*a*e-2*d*b. y3^2. Constructs a quadratic (circle) that passes through three Quadratic2D[Point2D[{x1_. x3^2.L2.b4_.y}] ]. the entire configuration is transformed to avoid the infinities involved.f}=Map[Det[Transpose[Drop[full.b5_.L3.3. {u.d.Point2D[{x2_. Quadratic Tangent to Five Lines Quadratic2D[line. line.Random[Integer.c.v}]. {y1. Constructs a quadratic that passes through Quadratic2D[Point2D[{x1_.e. y2^2.Or].v.y3_}]] := Module[{eqn.-b. x5}.c.y2.Q}.c2_].L4. {a.c3_]. x4. {y1^2. lns=Translate2D[{L1. 4*c*d-2*b*e.Point2D[{x2_.a.f_]] := Quadratic2D[4*c*f-e^2.5. y4. y.-v}] ] /.Quadratic Construction 501 Quadratic Through Three Points Quadratic2D[point.D2DQuadratic2D . point.x2*y2.L4:Line2D[a4_.x4*y4. L3:Line2D[a3_. full={{x1^2.y2_}]. 1. If any of the lines pass through the origin. x.b1_.{#}]]]&.Point2D[{x5_. 1}}.1}. Reciprocal$2D[Quadratic2D[a_. {1.v}={Random[Integer. {x3^2+y3^2.y5_}]] := Module[{full.x3*y3. point. . y2. 1.c1_]. line. x2.L2:Line2D[a2_. The private function Reciprocal$2D constructs the reciprocal of a conic with respect to the unit circle x2 + y 2 = 1.{u.5}].c_. {x1*y1.y1_}]. {x1^2+y1^2.c4_].y3_}].x5*y5}. {x1.d_.b.b3_. Quadratic2D[L1:Line2D[a1_. 1.c2. eqn=Det[{{ x^2+ y^2.2.x.5}]}.y3.x1.{x. L5:Line2D[a5_. y5^2}.{1.

c2.c5}.-b1/c1}]. If[IsZeroOrNegative2D[e]. is invalid.c2_]] := Quadratic2D[a1*a2.Point2D[{-a4/c4. {p.-b3/c3}].$Failed.b2_. is invalid.Point2D[{-a2/c2. line] Constructs a quadratic representing two lines multiplied together. directrix line and Quadratic2D::eccentricity= "The eccentricity ‘1‘ is invalid.c5_]] := Reciprocal$2D[ Quadratic2D[ Point2D[{-a1/c1.b1*b2. Quadratic from Focus/Directrix/Eccentricity Quadratic2D[point. Constructs a quadratic from a focus point. Point2D[{-a3/c3. e] eccentricity.Line2D[a2_.fcLen_?IsScalar2D. Quadratic2D[Point2D[{x1_.a1*c2+a2*c1. Quadratic Vertex Equation Quadratic2D[point.c1*c2].".y1_}]. Quadratic2D[P1:Point2D[{x1_. Not[IsZero2D[{c1. e^2*q^2-1.e^2*r^2-x1^2-y1^2]] ].Line2D[a4_. 2*(y1+e^2*q*r). Quadratic from Two Lines Quadratic2D[line.".b1_. θ] Constructs a quadratic from the vertex point. e.Or]]. eccentricity and rotation angle.0].r}. line.q. If the rotation angle is omitted. Quadratic2D::invLen= "A non-positive focal chord length. Quadratic2D[e^2*p^2-1.Line2D[a2_.Quadratic Construction Quadratic2D[Line2D[a1_.L2:Line2D[a2_.c1_]. no valid quadratic can be constructed.b4_. fcLen.c3_].b2_.b1_.b1*c2+b2*c1.-b4/c4}].b5_.502 D2DQuadratic2D . 2*e^2*p*q. it defaults to zero. no valid quadratic can be constructed. . the eccentricity must be positive. Point2D[{-a5/c5.m.-b2/c2}].r}=List @@ Line2D[L2].e.b3_.c4_].e]. focal chord length.c3.c4. Quadratic2D::invEcc= "A negative eccentricity.e_?IsScalar2D] := Quadratic2D[P1. ‘1‘.c2_].c2_].c1_].-b5/c5}]]] /. ‘1‘.e_?IsScalar2D] := Module[{l.fcLen.b2_. Line2D[a5_. Line2D[a3_.y1_}]. 2*(x1+e^2*p*r).a1*b2+a2*b1. Message[Quadratic2D::eccentricity. Quadratic2D[Line2D[a1_.".

y1}]] ]. Message[Quadratic2D::invEcc.{x1. eqn=(y-y1)^2==fcLen*(x-x1)-(1-e^2)(x-x1)^2.{x. (* end of "‘Private" *) EndPackage[ ]. Rotate2D[Quadratic2D[eqn.x.theta_?IsScalar2D] := Module[{eqn.y1_}]. e_?IsScalar2D.D2DQuadratic2D . True.theta.fcLen_?IsScalar2D.y}. (* end of "D2DQuadratic2D‘" *) 503 . Epilogue End[ ].fcLen]. Which[ IsZeroOrNegative2D[fcLen]. Message[Quadratic2D::invLen.$Failed.$Failed. IsNegative2D[e].y}].e].Epilogue Quadratic2D[Point2D[{x1_.

.

D2DSegment2D::usage= "D2DSegment2D is a package providing support for line segments.". Description Representation Segment2D[{x0.y0}.". Segment2D::usage= "Segment2D[{x0.y1_}][t_?IsScalar2D] := {x0+t*(x1-x0).". Length2D::usage= "Length2D[lnseg] computes the length of a line segment.y1}. Begin["‘Private‘"].D2DSegment2D The package D2DSegment2D implements the Segment2D object. of the line segment. "D2DGeometry2D‘". {"D2DCircle2D‘". "D2DLine2D‘". {x1 . on a line segment. y1 }] Standard representation of a line segment in Descarta2D. Evaluation Segment2D[{x0. Segment2D[{x0_. "D2DPoint2D‘". {x1 . "D2DExpressions2D‘". "D2DSketch2D‘". 505 . y0 } and {x1 .y0} and {x1. y0 }. respectively.{x1_. The parameter values 0 and 1 are the start and end points. y0+t*(y1-y0)}. "D2DNumbers2D‘". Initialization BeginPackage["D2DSegment2D‘". respectively. y1 } are start and end points.y0_}. The coordinates {x0 .{x1. −∞ < t < ∞. "D2DMaster2D‘". Returns a coordinate list {x. y0 }. y}.y1}] is the standard form of a line segment with end points {x0. "D2DTransform2D‘"}]. y1 }][t] Evaluates a parameter.

". y1 }] Detects line segments with imaginary arguments and returns the $Failed symbol.y1}.y0}.‘2‘] has been detected.0]).{x0.y0.{x1. Line[{{x0. y0 }.y1}].y0}.x1.{x1.y0.y0}.".y0}. the defining coordinates cannot be coincident.y0_}.y1_}][{t1_?IsScalar2D. .y1}].{x1.y1_}] := (Message[Segment2D::imaginary. IsValid2D[ Segment2D[{x0_?IsScalar2D.{x1. Validation Segment2D[{x0.506 D2DSegment2D .{x1_.{x1_.y0}. Returns the $Failed symbol for line segments with coin- Segment2D::invalid= "An invalid line segment of the form Segment2D[‘1‘.y1_?IsScalar2D}]] := True. Segment2D[{x0.y1}.y1}.{x1. Segment2D[{x0. Segment2D[{x0_. (FreeQ[{x0.y0_}.y1_}] := (Message[Segment2D::invalid.x1._Pattern] && IsComplex2D[{x0.y0_}. SetDisplay2D[ Segment2D[{x0_._Pattern] && IsCoincident2D[{x0. (FreeQ[{x0.y1}][t2]}] ].y1}]).{x1_. If the imaginary parts are insignificant.y1}]). Line[{Segment2D[{x0. Executed when the package is loaded. the arguments cannot be imaginary.{x1_.y1}]]) /.y0}.$Failed) /.{x1. Segment2D[{x0_. {x1_?IsScalar2D.x1.y0_}.x1. IsValid2D[lnseg] Verifies that a line segment is syntactically valid. Segment2D::imaginary= "An invalid line segment of the form Segment2D[‘1‘._Pattern] && IsTinyImaginary2D[{x0.{x1. {x1 .Description Graphics Provides graphics primitives for a line segment by extending the Mathematica Display command.{x0. (FreeQ[{x0.y0.y1}.{x1_.$Failed) /.y1_}] := (Segment2D @@ ChopImaginary2D[Segment$2D[{x0. y0 }.y1_}].y0.y0_?IsScalar2D}.‘2‘] has been detected.t2_?IsScalar2D}].y0. y1 }] cident start and end points. Segment2D[{x0_. SetDisplay2D[ Segment2D[{x0_. they are removed.y1}][t1].y1}}] ].y0_}. {x1 .y0}.x1.

L2]]. {h_?IsScalar2D.y1_}]] := Sqrt[(x0-x1)^2+(y0-y1)^2]. s. If the third argument is omitted it defaults to the origin (see D2DTransform2D.y1}.Scalars 507 Scalars Length Length2D[lnseg] Computes the length of a line segment.y1_}]] := If[IsZero2D[x1-x0]. Length2D[Segment2D[{x0_. θ.{h.{x1_.y1_}].theta_?IsScalar2D.(y1-y0)/(x1-x0)].y1}.c_]] := Segment2D[Reflect2D[{x0. line] Reflects a line segment in a line.D2DSegment2D . Scale Scale2D[lnseg.y0}.{x1_. . Not[IsZeroOrNegative2D[s]].y0_}. {h_?IsScalar2D.s.theta. If the third argument is omitted it defaults to the origin (see D2DTransform2D.y0_}.{h. coords] Rotates a line segment by an angle θ about a position specified by a coordinate list.k}]] /.y0_}. Rotate2D[Segment2D[{x0_. Rotate2D[{x1. Slope2D[Segment2D[{x0_.Reflect2D[{x1.{x1_.k_?IsScalar2D}] := Segment2D[Rotate2D[{x0.s_?IsScalar2D.k}]].y1_}].y1}. coords] Scales a line segment from a position given by coordinates.k_?IsScalar2D}] := Segment2D[Scale2D[{x0. Rotate Rotate2D[lnseg.y0_}.L2].{x1_. Transformations Reflect Reflect2D[lnseg. Reflect2D[Segment2D[{x0_.nb).b_.y0}.Scale2D[{x1. Scale2D[Segment2D[{x0_.Infinity.nb).k}].theta.s.y0}.L2:Line2D[a_.y0_}.k}]. Slope Slope2D[lnseg] Computes the slope of a line segment.{h.y1_}].{x1_.{h.

Line2D[Segment2D[{x0_.{x1.{x1+u. v}] Translates a line segment delta distance.y0_}. Perpendicular2D] a line segment.v_?IsScalar2D}] := Segment2D[{x0+u.y0_}. point] Constructs a line segment from two points.(x0*y1-x1*y0)].Line Construction Translate Translate2D[lnseg. Point Construction Midpoint Point2D[lnseg] Constructs the midpoint of a line segment. Segment2D[Point2D[{x0_.y1_}].{x1_.y1+v}].y1_}]] := Point2D[{x0+x1. Point2D[Segment2D[{x0_.y1_}]] := Segment2D[{x0.(x1-x0).y1_}]] := Line2D[-(y1-y0).Point2D[{x1_.y0+y1}/2].y0_}].y0_}.y0+v}. {u.x0^2-x1^2+y0^2-y1^2].y0_}. Line Segment Construction Line Segment from Two Points Segment2D[point.y1}]. .{x1_.y1_}].y0}.Perpendicular2D] := Line2D[2*(x1-x0). Line Bisecting a Line Segment Line2D[lnseg.508 D2DSegment2D .2*(y1-y0). Translate2D[Segment2D[{x0_.{x1_. Line Construction Line from Line Segment Line2D[lnseg] Constructs a line containing a line segment.{x1_.{u_?IsScalar2D. Constructs a line that is the perpendicular bisector of Line2D[Segment2D[{x0_.

(* end of "D2DSegment2D‘" *) . (* end of "‘Private" *) EndPackage[ ].Sqrt[(x0-x1)^2+(y0-y1)^2]/2].y0_}.(y0+y1)/2}. Constructs a circle from a line segment that is one of the circle’s diameter Circle2D[Segment2D[{x0_. Epilogue End[ ].Circle Construction 509 Circle Construction Circle from Diameter Chord Circle2D[lnseg] chords.D2DSegment2D .y1_}]] := Circle2D[{(x0+x1)/2.{x1_.

.

curve] returns a list of two parameter values.". so that the distance the point on the unbounded curve at the parameter ’t’ is a distance CurveLength2D/2 from the given coordinates. "D2DMaster2D‘"}].{t1. {"D2DExpressions2D‘". 511 . Initialization BeginPackage["D2DSketch2D‘". AskCurveLength2D::usage= "AskCurveLength2D[ ] returns the value of the option CurveLength2D for the Sketch2D function (the approximate sketched length of an unbounded curve).".t}.". IsDisplay2D::usage= "IsDisplay2D[object] returns ’True’ if the object can be displayed.".opts] sketches a list of geometric objects. {-t.objPrim] modifies the Display command to allow plotting of a new object.D2DSketch2D The package D2DSketch2D provides the Sketch2D command which is the basic command for plotting Descarta2D objects. Sketch2D::usage= "Sketch2D[objList.t2}] returns a list of graphics primitives between a pair of parameters for a parametrically defined curve. SetDisplay2D::usage= "SetDisplay2D[objPatt. CurveLength2D::usage= "CurveLength2D->n is an option for the Sketch2D function to specify the approximate sketched length of an unbounded curve. CurveLimits2D::usage= "CurveLimits2D[{x. MakePrimitives2D::usage= "MakePrimitives2D[object.". Begin["‘Private‘"].y}.".". D2DSketch2D::usage= "D2DSketch2D is a package providing sketching functions.".

protected=Unprotect[Display]. IsDisplay2D[___] := False. Display[ch_.512 D2DSketch2D . the argument objPrim provides the commands that generate the primitives required to plot the object.MemberQ[keywords. Display Query IsDisplay2D[object] Returns True if the object can be displayed and has parameters that can be evaluated to real numbers. SetAttributes[SetDisplay2D. FilterOptions$2D[command_Symbol. h_[a___][t___]->{t}].opts___] := Module[{keywords = First /@ Options[command]}.objPrim_] := Module[{protected}. Protect[Evaluate[protected]]. Curve Length CurveLength2D->n The option CurveLength2D of the Sketch2D command specifies the plotted length of an infinite curve and is measured from the midpoint to one of the plotted end points of the curve. otherwise.HoldAll]. {objPatt :> objPrim}.objPatt]&). h_[a___][t___]->h[a]] && IsNumeric2D[obj /.prim /. SetDisplay2D[objPatt_. Null]. above. h_[a___][t___]->h[a]] && IsNumeric2D[obj /. returns False. The function SetDisplay2D.prim_?(!FreeQ[#. Sequence @@ Select[{opts}. Plotting Set Display SetDisplay2D[objPatt.First[#]]&] ]. provides the implementation of IsDisplay2D for each object after its display graphics are defined. IsDisplay2D[obj:objPatt] := IsValid2D[obj /.Plotting Utilities Filter Options The private function FilterOptions$2D filters a list of options and provides a Sequence of valid options for the specified command. The argument objPatt is a pattern which matches the standard form of the object used in Descarta2D.format___] := Display[ch.format]. . objPrim] Modifies the Mathematica Display command to enable plotting of a new object.

eqn. Provides graphics primitives for a parametrically MakePrimitives2D[crv_?IsValid2D. {t1 . therefore. root=FindRoot[Evaluate[eqn].2]]. parPlot=ParametricPlot[crv[t] //Evaluate. root[[1]] ] /.AskCurveLength2D[ ]] /. and. the current value of CurveLength2D->‘2‘ will be retained.{t1_?IsScalar2D.CurveLength2D->n_.t.t.Off[ParametricPlot::ppcom]. (IsZeroOrNegative2D[n] || !IsReal2D[n]). Protect[Evaluate[protected]].".yt.t2_?IsScalar2D}] := Module[{saveMsg. Sketch2D::noObj="No valid objects to sketch.1}].crv}.1]] ].yt}=crv[t]. protected=Unprotect[SetOptions].{t. opts] Plots a list of Descarta2D objects. {xt. t2 }] defined curve between two parameters.y0_}. Curve Parameter Limits CurveLimits2D[{x.n. curve] Returns a list of two parameter values {−t. This is a numerical function used to support plotting. The options may be any options supported by the Mathematica Graphics command.{t.1.t2}.D2DSketch2D .root}. If[saveMsg===String.CurveLimits2D]. Make Graphics Primitives MakePrimitives2D[curve.On[ParametricPlot::ppcom]]. requires numerical arguments.opts2___] := Message[Sketch2D::invalidLength. Sketch Sketch2D[objList. saveMsg=Head[ParametricPlot::ppcom]. parPlot[[1.".Plotting 513 Sketch2D::invalidLength= "Option CurveLength2D->‘1‘ is invalid. . {-t. ’CurveLength2D’ must be positive. SetOptions[Sketch2D.t} /.parPlot}. AskCurveLength2D[ ] := Options[Sketch2D.opts1___. CurveLimits2D[p0:{x0_. eqn=Sqrt[(xt-x0)^2+(yt-y0)^2]==AskCurveLength2D[]/2. IsNumeric2D[{p0. The list is flattened before it is plotted. DisplayFunction->Identity]. y}.CurveLength2D][[1. t} on an unbounded curve such that the points at the parameter values on the curve are at a distance CurveLength2D/2 from the given base-point coordinates.crv_?IsValid2D] := Module[{xt. AskCurveLength2D[] Returns the value of the Sketch2D command CurveLength2D option.t1.

grOptsSequence]]. Message[Sketch2D::noObj].".Epilogue Sketch2D::notReal= "<‘1‘> object(s) cannot be sketched.grafix}. FilterOptions$2D[Sketch2D.514 D2DSketch2D . Show[Graphics[realObj.IsDisplay2D] //N. grafix ]. grOptsSequence. SetOptions[Sketch2D. Sequence @@ inputOptsList]]. allOptsList=Flatten[Join[inputOptsList. Epilogue End[ ]. Message[Sketch2D::notReal. Options[Sketch2D] = {Axes->True.realObj. CurveLength2D->10}. SetOptions[Sketch2D. grOptsSequence=FilterOptions$2D[Graphics.opts___?OptionQ] := Module[{sketchOptsList.Sequence @@ sketchOptsList].Null]. If[(n=Length[Flatten[obj]]-Length[realObj])>0. Sketch2D[obj_List. grafix=If[Length[realObj]>0. (* end of "‘Private" *) EndPackage[ ].inputOptsList. Sequence @@ allOptsList]. PlotRange->Automatic. sketchOptsList=Options[Sketch2D]. (* end of "D2DSketch2D‘" *) .n. Frame->True. AspectRatio->Automatic. realObj=Select[Flatten[obj].n]]. inputOptsList=Flatten[{opts}].allOptsList.sketchOptsList]].

{"D2DExpressions2D‘"}]. Symbol List Query The private function IsSymbol$2D[expr. otherwise.sym]. returns False. Initialization BeginPackage["D2DSolve2D‘".". IsSymbol$2D[expr_.".{-1}]. Options[Solve2D]= {MaxSeconds2D->30}. D2DSolve2D::usage= "D2DSolve2D is a package for solving equations.".vars] solves a list of equations for variables in given in a list. Begin["‘Private‘"]. Symbol Queries Single Symbol Query The private function IsSymbol$2D[expr.#]&. returns False.sym_List] := Or @@ Map[IsSymbol$2D[expr. otherwise. MaxSeconds2D::usage= "MaxSeconds2D is an option of the Solve2D function that time constrains the solution of the equations.D2DSolve2D The package D2DSolve2D provides the Solve2D function which is a specialized version of the Mathematica Solve and NSolve commands. Solve2D::usage= "Solve2D[eqns. IsSymbol$2D[expr_.sym]. symbol] returns True if the expression contains a given symbol. 515 .sym_Symbol] := MemberQ[Level[expr. symbolList] returns True if the expression contains any of the symbols in a list.

Protect[Evaluate[protected]]. result ].516 D2DSolve2D . uses the Mathematica function Solve.". varsList. protected=Unprotect[SetOptions]. Solve2D::time= "The equations could not be solved in MaxSeconds2D->‘1‘.MaxSeconds2D->n_. Solve2D::invalidTime= "Option MaxSeconds2D->‘1‘ is invalid.opts1___.vars]. . Uses the Mathematica function NSolve if any real numbers are involved.2]].result}.opts2___] := Message[Solve2D::invalidTime.}..". SetOptions[Solve2D. (IsZeroOrNegative2D[n] || !IsReal2D[n]).".MaxSeconds2D->secs]. vars:{_Symbol. SetOptions[Solve2D. only independent solutions will be returned. Solve Solve2D[eqnList.AskMaxSeconds$2D[ ]] /.MaxSeconds2D][[1. SimplifyEquation$2D[eqn_Equal] := (eqn[[1]]//ExpandAll)==(eqn[[2]]//ExpandAll). The private function AskMaxSeconds$2D returns the current setting for MaxSeconds2D. save=AskMaxSeconds$2D[ ]. an empty list of solutions will be returned. AskMaxSeconds$2D[ ] := Options[Solve2D. An empty list is returned (and a warning message output) if the equations cannot be solved in the number of seconds specified by the option MaxSeconds2D->n. using approximate numbers may produce a more complete list of solutions. Solve2D[eqns:{HoldPattern[Equal[_. opts] Solves a list of equations for a list of variables.n. MaxSeconds2D->secs_] := Module[{save. the current value of MaxSeconds2D->‘2‘ will be retained.MaxSeconds2D->save].]}. ’MaxSeconds2D’ must be positive. SetOptions[Solve2D. result=Solve2D[eqns. Solve2D::infinite= "An infinite number of solutions exist.Solve Solve Maximum Seconds Option MaxSeconds2D->n The option MaxSeconds2D specifies the maximum number of seconds allowed to solve equations using Solve2D. otherwise.. or if the Mathematica function N is in the evaluation stack._].

D2DSolve2D .AskMaxSeconds$2D[ ]]._].eqns]//N.]}. Solve[Map[SimplifyEquation$2D. Select[ans. If[save===String. WorkingPrecision->$MachinePrecision]. Message[Solve2D::infinite].ans}.Epilogue Solve2D[eqns:{HoldPattern[Equal[_.vars].eqns]. #). Epilogue End[ ]. ans=TimeConstrained[ If[IsApproximate2D[eqns]..}] := Module[{save. If[IsSymbol$2D[Map[(vars /. #)&. ans] ].On[Solve::svars]]. save=Head[Solve::svars].{}]. AskMaxSeconds$2D[ ]. (* end of "‘Private" *) EndPackage[ ]. Message[Solve2D::time.vars]]..vars:{_Symbol.vars]]&]. NSolve[Map[SimplifyEquation$2D.Not[IsSymbol$2D[(vars /.ans].vars.Off[Solve::svars]. (* end of "D2DSolve2D‘" *) 517 .

.

Line or Circle Query The private function IsSimple$2D returns True if an object is a point. "D2DPoint2D‘". Line or Circle Query The private function IsSimpleCurve$2D returns True if an object is a line or a circle. tangent to a given line and tangent to a given circle. otherwise. D2DTangentCircles2D::usage= "D2DTangentCircles2D is a package for constructing tangent circles.{Point2D.". {"D2DCircle2D‘".Line2D. Queries Point. "D2DSolve2D‘"}]. line or circle.". Initialization BeginPackage["D2DTangentCircles2D‘".D2DTangentCircles2D The package D2DTangentCircles2D provides a variety of functions for constructing tangent circles that satisfy three conditions. The conditions include passing through a given point. the radius may be specified.(radius)] constructs a list of circles tangent to one. "D2DGeometry2D‘". Begin["‘Private‘"]. "D2DExpressions2D‘". "D2DLine2D‘". 519 . line or circle.Circle2D}]. returns False. "D2DMaster2D‘". otherwise. the center may be constrained to a point. lines or circles). two or three objects (points. the total number of constraints must be three (constraining the center to a point is two constraints). TangentCircles2D::usage= "TangentCircles2D[objList. returns False. optionally. IsSimple$2D[obj_] := Is2D[obj. center at a given point or on a given curve. optionally.(center).

Point on a Circle The private function OnEquation$2D returns an equation constraining a point to be on a circle.{Line2D.b1_. Line Tangent to a Circle The private function TangentEquation$2D returns an equation constraining a line to be tangent to a circle.y1_}]. OnEquation$2D[{x1_.r2_]] := (x1-h2)^2+(y1-k2)^2==r2^2.k2_}.Line2D[a2_.y1_}.r1_].y2_}]] := {x1==x2.Circle2D[{h2_. Circle Tangent to a Circle The private function TangentEquation$2D returns an equation constraining two circles to be tangent.Tangent/On Equations IsSimpleCurve$2D[obj_] := Is2D[obj.c2_]] := {a2*x1+b2*y1+c2==0}. Point on a Point The private function OnEquation$2D returns a pair of equations constraining two points to be coincident.r2_]] := {(x1-h2)^2+(y1-k2)^2==r2^2}.Circle2D[{h2_.r2_]] := ((h1-h2)^2+(k1-k2)^2-(r1-r2)^2)*((h1-h2)^2+(k1-k2)^2-(r1+r2)^2) == 0.Circle2D[{h2_. OnEquation$2D[{x1_.Circle2D}].Circle2D[{h2_. . y1==y2}.b2_.520 D2DTangentCircles2D .Point2D[{x2_. TangentEquation$2D[Point2D[{x1_.k2_}.k2_}. TangentEquation$2D[Circle2D[{h1_.y1_}. Point on a Line The private function OnEquation$2D returns equation constraining a point to be on a line. OnEquation$2D[{x1_. TangentEquation$2D[Line2D[a1_. Tangent/On Equations Point Tangent to a Circle (On Circle) The private function TangentEquation$2D returns an equation constraining a point to be on a circle.k2_}.c1_].r2_]] := (a1^2+b1^2)*r2^2==(a1*h2+b1*k2+c1)^2.y1_}.k1_}.

obj3_?IsSimpleCurve$2D] := TangentCircles$2D[{obj1. eq1=Map[TangentEquation$2D[#. r] Constructs a list of circles tangent to a point. Complement[Union[circles]. Tangent Object. ans].circles}.eq3.cenObj]].c1. Radius TangentCircles2D[{pt | ln | cir}. Tangent Circle Construction Tangent Object. ln | cir.P:Point2D[{x_. TangentCircles2D[{obj1_?IsSimple$2D}.D2DTangentCircles2D .obj2.eq3].obj3. Two Tangent Objects. with center point on a line or circle and with a given radius.c1]&.Not[IsComplex2D[{h.obj2_?IsSimpleCurve$2D. TangentCircles$2D[obj_List. Center on Object.k}.Null]. Not[IsZeroOrNegative2D[r3]].{}.y_}]] := TangentCircles$2D[{obj}.Null]. ln | cir] Constructs a list of circles tangent to two objects (points.{}. #]]&]. #)&. Center On Object TangentCircles2D[{pt | ln | cir.obj2_?IsSimple$2D}. line TangentCircles2D[{obj_?IsSimple$2D}. optionally with center on a given object. point] or circle and passing through a point. eq3=If[radius===Null. TangentCircles2D[{obj1_?IsSimple$2D. #]]&].P.{r==radius}]. Center Point TangentCircles2D[{pt | ln | cir}.k.obj] ].eq2.r].obj2}. eq2=If[cenObj===Null.k}.obj].cenObj_. two or three objects. r3_?IsScalar2D] := TangentCircles$2D[{obj1}.r.General Circle Tangency 521 General Circle Tangency Tangent Circles The private function TangentCircles$2D is a general function that constructs a list of circles tangent to a list of one. ans=Solve2D[Join[eq1.eq2. ans=Select[ans. line or circle.k.k.radius_] := Module[{h.r}].r3] /. ans=Select[ans. lines or circles) centered on a line or circle. optionally with a given radius. c1=Circle2D[{h. Constructs a list of circles tangent to a point. circles=Map[(c1 /. .{h. pt | ln | cir}.r} /.OnEquation$2D[{h.eq1.Not[IsZeroOrNegative2D[r /.ans.

522 D2DTangentCircles2D . (* end of "‘Private" *) EndPackage[ ]. TangentCircles2D[{obj1_?IsSimple$2D. Constructs a list of circles tangent TangentCircles2D[{obj1_?IsSimple$2D.obj2.Null. obj3_?IsSimple$2D}] := TangentCircles$2D[{obj1. pt | ln | cir}] to three objects (points.obj2_?IsSimple$2D. r3_?IsScalar2D] := TangentCircles$2D[{obj1. Epilogue End[ ]. Three Tangent Objects TangentCircles2D[{pt | ln | cir. lines or circles) with a given radius. lines or circles).Null].r3] /. point | ln | cir}. Not[IsZeroOrNegative2D[r3]]. (* end of "D2DTangentCircles2D‘" *) .Epilogue Two Tangent Objects.Null.obj3}.obj2_?IsSimple$2D}.obj2}. Radius TangentCircles2D[{pt | ln | cir. pt | ln | cir. r] Constructs a list of circles tangent to two objects (points.

obj2. Error Messages General Error Messages TangentConics2D::coincident= "Two or more of the defining points or lines are coincident. 523 .". TangentQuadratics2D::usage= "TangentQuadratics2D[{obj1. "D2DHyperbola2D‘".D2DTangentConics2D The package D2DTangentConics2D provides functions for constructing conics and quadratics that satisfy five conditions. "D2DExpressions2D‘". "D2DPoint2D‘".". Begin["‘Private‘"]. "D2DQuadratic2D‘". "D2DSolve2D‘". D2DTangentConics2D::usage= "D2DTangentConics2D is a package for constructing tangent conics and quadratics. "D2DEllipse2D‘". "D2DParabola2D‘". "D2DMaster2D‘". "D2DGeometry2D‘". the conics will pass through the given points and be tangent to the given lines.obj5}] constructs list of conic curves given five objects. "D2DLine2D‘".obj2. Initialization BeginPackage["D2DTangentConics2D‘".".{"D2DCircle2D‘".obj5}] constructs list of quadratics given five objects. the objects may be any combination of points and lines.obj4.obj4. the quadratics will pass through the given points and be tangent to the given lines. no proper conic can be constructed.obj3. TangentConics2D::usage= "TangentConics2D[{obj1.obj3. "D2DLoci2D‘". "D2DTransform2D‘"}]. the objects may be any combination of points and lines. "D2DPencil2D‘".". Each condition may be either passing through a given point or tangent to a given line.

L:Line2D[a_. Max @@ Map[CountPointsOn$2D[pts. pts].lns] ]. TangentConics2D::linesThru= "One of the points is on more than one of the tangent lines. N$2D[P:Point2D[{x_.".expr].P].c_. 0.c_]] := If[IsApproximate2D[L].".524 D2DTangentConics2D . The private function MaxPointsOn$2D returns the maximum number of points from a given list that are on any of the lines in a list. MaxPointsOn$2D[pts_List. TangentConics2D::concurrent= "Three or more of the tangent lines are concurrent. CountPointsOn$2D[pts_List.b_. no proper conic can be constructed.lns_List] := If[Length[pts]<1 || Length[lns]<1.".". no proper conic can be constructed.Quadratic2D[ N[Q] ]. no action is taken. N$2D[L:Line2D[a_. .L]&.f_]] := If[IsApproximate2D[Q].#]&. otherwise.c_]] := Count[Map[IsOn2D[#. no proper conic can be constructed.b_.y_}]] := If[IsApproximate2D[P]. TangentConics2D::pointsOn= "Two or more of the points are on a tangent line.Line2D[ N[L] ]. TangentConics2D::parallel= "Three or more of the defining lines are parallel. Number of Points on a Line The private function CountPointsOn$2D returns the number of points from a given list that are on a given line. N$2D[Q:Quadratic2D[a_. N$2D[expr_List] := Map[N$2D. no proper conic can be constructed.". no proper conic can be constructed.e_.Utilities TangentConics2D::collinear= "Three or more of the defining points are collinear. True].N[P].b_.Q].d_. Utilities Numeric Computations The private function N$2D numerically normalizes lines and quadratics (or lists of such objects) if approximate numerical computations are underway.L].

False. Message[TangentConics2D::concurrent]. CountLinesThru$2D[lns_List. Which[ IsCoincident2D[pts].y_}]] := Count[Map[IsOn2D[P. True] ].lns}.Is2D[#.True]== Count[Map[Is2D[#.Is2D[#.lns]>1. ValidConfigurationQ$2D[obj_List] := Module[{pts.obj].#]&.False. IsCollinear2D[pts].funcName]).False. IsConcurrent2D[lns]. Message[TangentConics2D::parallel].pts] ].Utilities 525 Number of Lines Through a Point The private function CountLinesThru$2D returns the number of lines from a given list that pass through a given point. Message[TangentConics2D::collinear]. Validity Queries The private function ValidObjects$2D verifies that the object list contains valid objects. lns].funcName_] := ((Count[Map[IsValid2D.False. MaxLinesThru$2D[lns_List. Message[TangentConics2D::pointsOn].False.Line2D}]&. True]. IsTripleParallel2D[lns].False. Message[TangentConics2D::coincident]. . ValidObjectsQ$2D[obj_List. MaxPointsOn$2D[pts.True]== Length[obj]==5) && IsNumeric2D[obj.P:Point2D[{x_.pts]>1.#]&. Max @@ Map[CountLinesThru$2D[lns. True. The function private ValidConfigurationQ$2D verifies that the configuration of the objects is valid. Message[TangentConics2D::linesThru].{Point2D.obj]. Message[TangentConics2D::coincident]. MaxLinesThru$2D[lns. The private function MaxLinesThru$2D returns the maximum number of lines from a given list that pass through any of the points in a list. 0.D2DTangentConics2D .pts_List] := If[Length[lns]<1 || Length[pts]<1.{Point2D}]&].False. pts=Select[N$2D[obj]. lns=Select[N$2D[obj]. IsCoincident2D[lns].{Line2D}]&].

c_]] := a*x+b*y+c. TangentQuadratic$2D[obj//N$2D]. ValidObjectsQ$2D[obj. Conic Tangent to Five Objects TangentConics2D[{obj1.b_.526 D2DTangentConics2D .y_}].b_. Polynomial$2D[Line2D[p_.d_.c_.Line2D[a_.f_]] := a*x^2+b*x*y+c*y^2+d*x+e*y+f. The objects may be any combination of points or lines.Quadratic2D[a_.Quadratic and Conic Construction Polynomials Point on Line The private function Polynomial$2D forms a polynomial by substituting the coordinates of a point into the equation of a line. Polynomial$2D[Point2D[{x_. obj4 . Line Tangent to Quadratic The private function Polynomial$2D forms a polynomial of coefficients from a line and a quadratic when the line is tangent to the quadratic. {}] /.e_. Point on Quadratic The private function Polynomial$2D forms a polynomial by substituting the coordinates of a point into a quadratic equation. Polynomial$2D[Point2D[{x_. TangentQuadratics2D[obj_List] := If[ValidConfigurationQ$2D[obj]. obj4 . obj3 .q_. obj5 }] Constructs a list of conics tangent to five objects. .Quadratic2D[a_. Quadratic and Conic Construction Quadratic Tangent to Five Objects TangentQuadratics2D[{obj1.TangentQuadratics2D].r_].d_.e_.f_]] := ((4*c*f-e^2)*p^2+(4*a*f-d^2)*q^2+(4*a*c-b^2)*r^2+ 2*(b*d-2*a*e)*q*r+2*(b*e-2*c*d)*p*r+2*(d*e-2*b*f)*p*q).c_. obj2 .b_. The objects may be any combination of points or lines. obj2 . obj5 }] Constructs a list of conics tangent to five objects. obj3 .y_}].

c___] := TangentQuadratic$2D[a.P3_Point2D. TangentQuadratic$2D[P1_Point2D.P2_.L2. Five Points Private function that constructs a list containing one quadratic passing through five points.b_.P. realRoots]] ].realRoots}.P4]}.a.b___.P2_Point2D.a. ValidObjectsQ$2D[obj.d___] := TangentInverse$2D[{L1.e].b___.TangentConics2D]. allRoots=Solve2D[{Polynomial$2D[L5. Union[ Select[conics.{Circle2D.d_. Q=Quadratic2D[{Line2D[P1.Line2D[P3.b.b.L].Ellipse2D.P2]. conics=Flatten[Map[Loci2D. TangentQuadratic$2D[{a_.c___] := (TangentQuadratic$2D[{P.Line2D[P2.Pencil2D] //N$2D.L2_Line2D. IsOn2D[P. If[ValidConfigurationQ$2D[obj].conics}.L_Line2D.allRoots.P_Point2D.Q]==0}. realRoots=Select[allRoots. TangentQuadratic$2D[P1_.L1_Line2D. Q=TangentQuadratics2D[obj//N$2D].{k}].L_Line2D.Hyperbola2D.c]) /.c___.k. One Line (No Points on Line) Private function that constructs a list containing two quadratics passing through four points and tangent to one line.P3].L3_Line2D. {}] ] /.b.L3.d}].IsReal2D[k /.P2. TangentQuadratic$2D[a___.e_}] := TangentQuadratic$2D[a. TangentQuadratic$2D[a___.c. Preprocess Arguments Preprocesses the arguments to private function TangentQuadratic$2D to match the implemented functions. N$2D[Map[(Q /.P_Point2D.P5] //N$2D}. Four Points. #]&].P4.b___.P4_Point2D. None of the points can be on the tangent line.d. TangentQuadratic$2D[a___.Parabola2D}]&]].L]. L5_Line2D] := Module[{Q.c.L}.Q]].P4_.P3_. {Line2D[P1.b. Is2D[#.c_.c.P5_] := {Quadratic2D[P1. .P4]}.k.P3.D2DTangentConics2D .Quadratic and Conic Construction 527 TangentConics2D[obj_List] := Module[{Q. #)&.

pt3.IsReal2D[k /.k. k=(L12*L13)/(ln*L23) /.roots]] ]. L13=Polynomial$2D[Point2D[{x. N$2D[Translate2D[Q. TangentQuadratic$2D[{P1_Point2D.{a.y2_}].y}]&.Line2D[P2. p22=a2*x2+b2*y2+c2.roots}.L1_Line2D}. Q=(a1*x+b1*y+c1)*(a2*x+b2*y+c2)-k*(a*x+b*y+1)^2.ans]] ].ln.y}].Line2D[P1. p12*p22*p33^2==p13*p23*p32^2}. p32=a*x2+b*y2+1.p23.P3]}.a.y.Line2D[a2_.{k}].L1].{x.P2].ln1. ans=Solve2D[{p11*p21*p32^2==p12*p22*p31^2.y->y4}.allRoots.P3]]. #])&].c1_]. #). N$2D[Map[Quadratic2D[(Q /. p31=1. ln=Polynomial$2D[Point2D[{x. allRoots=Solve2D[{Polynomial$2D[L4.y4_}]] := Module[{x.p22.b1_.(IsReal2D[a /. {x->x4.ln1.-y1}] //N$2D.Line2D[P1.L1.y3_}].Q]==0}.528 D2DTangentConics2D .p21.ln2}=Translate2D[{P2.ln2]. Three Points. {Line2D[P1.b}].p33.y}] //N$2D} ]. Two Lines (One Point on Line) Private function that constructs a list containing up to two quadratics through three points. One Line (One Point on Line) Private function that constructs a list containing one quadratic passing through four points and tangent to one line. TangentQuadratic$2D[Point2D[{0.P2]]. Two Lines (No Points on Lines) Private function that constructs a list containing four quadratics given three points and two tangent lines.b2_. P3:Point2D[{x3_.b2_. #] && IsReal2D[b /.p32.b1_.{x1.p31.ln2. .L23. k=c1*c2.L2}. One of the points must be on the tangent line.P3_Point2D. #]&].{-x1. L23=Polynomial$2D[Point2D[{x. TangentQuadratic$2D[{P1_Point2D. {Quadratic2D[L12*L13-k*ln*L23.Point2D[{x2_.y2_}]. p23=a2*x3+b2*y3+c2.Line2D[P2. N$2D[Map[(Q /.Quadratic and Conic Construction Four Points.c2_]] := Module[{p11.y}]. None of the points can be on the tangent lines.y1_}].ans. tangent to two lines when one of the points is on a tangent line.P2_Point2D.c2_]] := Module[{pt2.y3_}].b. #)&.P3. p33=a*x3+b*y3+1.{x. roots=Select[allRoots.P3]}.P2:Point2D[{x2_.Line2D[P1.y}].Pencil2D]. Point2D[{x4_. L12=Polynomial$2D[Point2D[{x.L13.0}].P2_Point2D.P3_Point2D.pt2.y1}]] ].L1_Line2D}.ln1. L1:Line2D[a1_. L4_Line2D] := Module[{Q.Point2D[{x3_.L12.pt3. p13=a1*x3+b1*y3+c1.c1_]. p21=c2.P3]].0}]. Q=Quadratic2D[{L1.Q}.k. Three Points. p11=c1. {pt2. Line2D[a1_.pt3.L2:Line2D[a2_.p13.y}].p12. Q=TangentQuadratic$2D[Point2D[{0. p12=a1*x2+b1*y2+c1. ans=Select[ans.Q}.k. TangentQuadratic$2D[P1:Point2D[{x1_.k}.

d_. {x->x2.y->y2}.Point2D[offset]]. Invert$2D[Line2D[a_.Q]. Private functions that determine an offset that will safely position a list of objects insuring that no line passes through the center of inversion and no point is coincident with the center of inversion. Translate2D[Map[Reciprocal$2D.y}].4*a*e-2*d*b.c_.c_]] := Point2D[{-a/c.ln3. Private functions that construct the pole point of a line with respect to a unit circle and the polar line of a point with respect to a unit circle.L3_Line2D}. objsTrans=Translate2D[origObjs.offset:{dx_.L1_Line2D}.y.offset] //N$2D ].L3].2*d*e-4*b*f. Invert$2D[Point2D[{x_.objsTrans. TangentInverse$2D[origObjs_List] := Module[{offset.-1].Q}. {Quadratic2D[ln1*ln3-k*ln13^2.ln13.dy_}] := IsCoincident2D[P1.y1_}]. Reciprocal Method Private function that constructs a list containing quadratics given five elements (points or tangent lines).D2DTangentConics2D .y.f_]] := Quadratic2D[4*c*f-e^2.objsTrans] //N$2D. InvalidOffsetQ$2D[P1:Point2D[{x1_.e_.4*a*f-d^2.ln1.Quadratic and Conic Construction 529 Three Points. Using the reciprocal method converts a case with more than two tangent lines to its reciprocal. Two Lines (Two Points On Lines) Private function that constructs a list containing up to one quadratic through three points. ln3=Polynomial$2D[Point2D[{x. offset=SaveOffset$2D[origObjs]. The method of reciprocals is used.y2_}]] := Module[{x.y_}]] := Line2D[x. ln13=Polynomial$2D[Point2D[{x.y}].-b/c}]. k=(ln1*ln3)/ln13^2 /.y}] //N$2D} ]. .-offset].y}]. which has two or fewer tangent lines. TangentQuadratic$2D[{P1_Point2D.{x. ln1=Polynomial$2D[Point2D[{x. Private function that constructs the reciprocal quadratic of a quadratic with respect to a unit circle.invertedObjs.Line2D[P1.P2:Point2D[{x2_. Reciprocal$2D[Quadratic2D[a_. invertedObjs=Map[Invert$2D. 4*c*d-2*b*e. Q=TangentQuadratic$2D[invertedObjs].P3]].b_.4*a*c-b^2] //N$2D.L1].k}. tangent to two lines when two of the points are on the tangent lines (one point on each tangent line). {P3_Point2D.b_.

offset]&.c1_]. SaveOffset$2D[obj_List] := Module[{offset={0.{-4. Epilogue End[ ].L1].b1_.{-4. Random[Integer.Epilogue InvalidOffsetQ$2D[L1:Line2D[a1_. offset ].0}}. offset={Random[Integer.4}].530 D2DTangentConics2D .dy_}] := IsOn2D[Point2D[offset]. True].4}]}]. While[MemberQ[Map[InvalidOffsetQ$2D[#. (* end of "D2DTangentConics2D‘" *) .obj]. (* end of "‘Private" *) EndPackage[ ].offset:{dx_.

"D2DTangentPoints2D‘". Initialization BeginPackage["D2DTangentLines2D‘". curve] constructs a list of lines through a point and tangent to a second-degree curve. "D2DExpressions2D‘". "D2DQuadratic2D‘". TangentLines2D[line. "D2DTransform2D‘"}]. "D2DHyperbola2D‘". {"D2DCircle2D‘".". "D2DGeometry2D‘".D2DTangentLines2D The package D2DTangentLines2D provides functions for computing lines that are tangent to curves using a variety of defining conditions.". TangentLines2D[line.". curve] constructs a list of lines tangent to two curves. Perpendicular2D] constructs a list of tangent lines perpendicular to a given line. "D2DSolve2D‘".". "D2DMaster2D‘". Parallel2D] constructs a list of tangent lines parallel to a given line. TangentLines2D::usage= "TangentLines2D[point. curve. "D2DLine2D‘". "D2DConic2D‘". TangentEquation2D::usage= "TangentEquation2D[line. D2DTangentLines2D::usage= "D2DTangentLines2D is a package for constructing tangent lines and line segments. TangentSegments2D::usage= "TangentSegments2D[curve. "D2DPoint2D‘". quad] constructs an equation involving the coefficients of a line and a quadratic constraining the line to be tangent to the quadratic. 531 . curve. "D2DEllipse2D‘". "D2DParabola2D‘". "D2DEquations2D‘". "D2DSegment2D‘".curve] constructs a list of line segments tangent to two curves. Begin["‘Private‘"]. TangentLines2D[curve.

{}.r2.e_.d_.y1_}]. Is2D[crv2. True.Line Construction Tangent Equation Line Tangent to a Quadratic TangentEquation2D[line. If the Parallel2D | Perpendicular2D keyword is omitted. circle] and tangent to a circle.0.c_.Quadratic2D}].532 D2DTangentLines2D . Line Construction Lines Through a Point Tangent to a Circle TangentLines2D[point.{Ellipse2D. curve] Constructs a list containing up to two lines through a point and tangent to a curve or quadratic. Parallel or Perpendicular Tangent Lines TangentLines2D[line. . pts=TangentPoints2D[P1.#]&. Quadratic2D[a_. the default is Parallel2D. TangentLines2D[P1:Point2D[{x1_.y1}.pts]] ] /.y1_}].q_.1]]. {Line2D[P1. Lines Through a Point Tangent to a Curve TangentLines2D[point.k2_}. Length[pts]==1.r2_]] := Union[TangentLine$2D[{x1.Parabola2D.Hyperbola2D.f_]] := ((4*c*f-e^2)*p^2+(4*a*f-d^2)*q^2+(4*a*c-b^2)*r^2+ 2*(b*d-2*a*e)*q*r+2*(b*e-2*c*d)*p*r+2*(d*e-2*b*f)*p*q)==0.crv2_] := Module[{pts}.b_. Constructs a list containing up to two lines through a point TangentLines2D[Point2D[{x1_. curve.Circle2D[{h2_.r_]. quad] Forms an equation between the coefficients of a line and a quadratic constraining the line to be tangent to the quadratic. Map[Line2D[P1.crv2]. TangentEquation2D[Line2D[p_.{h2. Which[ pts=={}.crv2]}. Parallel2D | Perpendicular2D] Constructs a list containing up to two lines which are parallel or perpendicular to a given line and tangent to a conic curve quadratic.k2}.

sv1.On[Line2D::invalid]].r2_.Quadratic2D}].sv2}.b_.L.Off[Line2D::invalid]. C2] /. {{A1->R.k1}. TangentLines2D[Circle2D[{h1_.a.c]. Is2D[crv. #)&.d_.{Circle2D.Ellipse2D.{Circle2D.Ellipse2D.Ellipse2D.K=k1-k2.Line Construction 533 TangentLines2D[L:Line2D[p_.Hyperbola2D.Parabola2D.crv.{h2. If[IsZero2D[z].eq1. TangentLines2D[Line2D[a_.D2DTangentLines2D .{R}].ans}.crv_.A2. Select[lns.Q].Off[Line2D::imaginary].k2_}. The private function TangentLine$2D implements the mathematics. Lines Tangent to Two Quadratics TangentLines2D[quad. lns=Map[(Line2D[A2. B2. eq1=TangentEquation2D[Line2D[p.R.{Circle2D. The first two lines in the list (if present) are the external tangents. Is2D[crv.crv_. The private function TanLn$2D computes the candidate tangent lines. B2=B1*H+A1*K.k2}.(R /.Parallel2D] /. quad] Constructs a list containing up to four lines tangent to two quadratics. If[sv1===String. Parallel2D] := Module[{z.c_].Hyperbola2D.R=r1+s*r2. TangentLines2D[L:Line2D[a_.ans]] ].lns.Circle2D[{h2_.r1. #)]&.r_].C2. Not[IsComplex2D[R /.q.r1_. {A1->R. TangentLine$2D[{h1_.Hyperbola2D. C2 =L*r1-h1*A2-k1*B2.k2_}. .q. B1->-Sqrt[L-R^2]}}]. TangentLines2D[L:Line2D[a_.Parabola2D}]. z=R*(-b^2+4*a*c)+q*(b*d-2*a*e)+p*(-2*c*d+b*e).#]]&.r1_]. Lines Tangent to Two Circles TangentLines2D[circle.c_].Parabola2D. A2=A1*H-B1*K.k1_}. If[sv2===String.crv_] := TangentLines2D[L.Parallel2D] := TangentLines2D[L.{-1.b_.e_. ans=Select[Solve2D[{eq1}. sv2=Head[Line2D::invalid].b_.Quadratic2D[crv].B2.{}. B1-> Sqrt[L-R^2]}.IsValid2D]].On[Line2D::imaginary]]. Is2D[crv.1}]}]. the last two lines (if present) are the internal tangents.Perpendicular2D] := TangentLines2D[Line2D[-b. sv1=Head[Line2D::imaginary].s_] := Module[{H=h1-h2. Map[Line2D[p.{h2_.Q:Quadratic2D[a_.k1_}.crv. and the private function DeleteCoincident$2D removes coincident solutions.b_.Parallel2D] /.r2.Quadratic2D}].f_]. #]]&].c_]. circle] Constructs a list containing up to four lines which are tangent to two circles.q_.c_.R].r2_]] := Flatten[{Map[Union[TangentLine$2D[{h1. L=H^2+K^2.Parallel2D] /.

hyperbolas.svMsg2}. Q2=If[Is2D[crv2.svMsg1.Hyperbola2D. IsCoincident2D[L1.L1.r}].{}. svMsg2=Head[Line2D::invalid].f1_]. p^2+q^2==1}.lns.Quadratic2D[crv1]].b1_.c2_.c1_.Q2}.q.e1_.Quadratic2D}].Hyperbola2D.{p.{Quadratic2D}].d2_.f1_]. curve] Constructs a list containing up to four lines tangent to two conic curves (circles. parabolas or quadratics).b1_.p.c1_].Q2]] /. TangentLines2D[Q1.q. Lines Tangent to Two Conics TangentLines2D[curve. Line Segments Tangent to Two Curves TangentSegments2D[curve. TangentLines2D[Q1:Quadratic2D[a1_.d2_.r.d1_. ellipses.s2. parabolas or quadratics).Ellipse2D.On[Line2D::imaginary]].Q2].b2_.Quadratic2D[crv2]].Ellipse2D. Select[lns. Q1=If[Is2D[crv1.s3}] /.c1_.ans. hyperbolas.Parabola2D.d1_. If[svMsg1===String. #)&.crv2. Q2:Quadratic2D[a2_. TangentEquation2D[L.e1_.r]. DeleteCoincident$2D[TanLn$2D[Q1. svMsg1=Head[Line2D::imaginary]. curve] Constructs a list containing up to four line segments tangent to two curves (circles. DeleteCoincident$2D[lns_List]:=lns.534 D2DTangentLines2D .IsValid2D] ].Q1]. . ellipses.Q2]]]. L2:Line2D[a2_.s3___}]:= DeleteCoincident$2D[{s1. L1:Line2D[a1_.{Circle2D.b2_. Q2:Quadratic2D[a2_.Off[Line2D::invalid]. TangentLines2D[crv1_.c2_]. DeleteCoincident$2D[{s1___.crv1.e2_.Quadratic2D}] && Is2D[crv2.Parabola2D.b1_. Is2D[crv1. If[svMsg2===String.{Circle2D.e2_.s2___.q. ans=Solve2D[{TangentEquation2D[L.c2_.{Quadratic2D}].Off[Line2D::imaginary].f2_]] := If[IsCoincident2D[Q1.b2_.Line Construction TanLn$2D[Q1:Quadratic2D[a1_.ans].On[Line2D::invalid]].Q2]. L=Line2D[p. lns=Map[(L /.crv2_] := Module[{Q1.f2_]] := Module[{L.L2].

{Circle2D. svMsg1=Head[Segment2D::imaginary].crv2_] := Module[{lns.Ellipse2D. (* end of "‘Private" *) EndPackage[ ].On[Segment2D::imaginary]]. If[svMsg1===String.svMsg2}.Parabola2D. (* end of "D2DTangentLines2D‘" *) 535 .Quadratic2D}] && Is2D[crv2.Epilogue TangentSegments2D[crv1_. svMsg2=Head[Segment2D::invalid]. lns=Map[Segment2D[Point2D[#.crv2]]&.Off[Segment2D::invalid].D2DTangentLines2D .Quadratic2D}]. Is2D[crv1.IsValid2D] ] /. lns=TangentLines2D[crv1.Hyperbola2D.svMsg1.{Circle2D.crv1].On[Segment2D::invalid]].Ellipse2D.lns]. Epilogue End[ ].crv2].Parabola2D.Hyperbola2D. Select[lns. If[svMsg2===String.Off[Segment2D::imaginary].Point2D[#.

.

".{}.R. s=(r*(y1-k)+S*Sqrt[R]*(x1-h))/d. IsNegative2D[R].c. "D2DLine2D‘".1}]]] ]. circle] Constructs a list containing up to two points that are the contact points of the lines tangent to a circle from a point. S->#)&. "D2DQuadratic2D‘"}]. "D2DEllipse2D‘". 537 .D2DTangentPoints2D The package D2DTangentPoints2D provides functions for constructing the point of contact between a curve and a tangent line. True.s. "D2DPoint2D‘". {"D2DCircle2D‘". Which[IsZero2D[R].y1_}].0. "D2DMaster2D‘". If[IsZero2D[d]. "D2DExpressions2D‘".k_}.r_]] := Module[{d.curve] constructs a list containing points that are the tangency points of the lines from a point to a curve. Begin["‘Private‘"]. This is a simplified formula for circles.k+r*s}] /.d-r^2].S}. {}. D2DTangentPoints2D::usage= "D2DTangentPoints2D is a package for constructing tangent points. "D2DIntersect2D‘".{1}. R=If[IsZero2D[d-r^2]. {-1. Initialization BeginPackage["D2DTangentPoints2D‘". Point Construction Circle Contact Points TangentPoints2D[point. "D2DParabola2D‘". c=(r*(x1-h)-S*Sqrt[R]*(y1-k))/d. d=(x1-h)^2+(y1-k)^2. Map[(Point2D[{h+r*c. TangentPoints2D[Point2D[{x1_. the general second-degree form also produces the correct points (see below).Circle2D[{h_. TangentPoints2D::usage= "TangentPoints2D[point. "D2DGeometry2D‘".". "D2DHyperbola2D‘".

crv2.q}.q. IsOn2D[P1. {a.q.538 D2DTangentPoints2D .Epilogue Conic Contact Points TangentPoints2D[point. (* end of "‘Private" *) EndPackage[ ].Quadratic2D[crv2]].c.q.r]. Q=If[Head[crv2]===Quadratic2D. p=2*a*x1+b*y1+d.y1_}]. r=d*x1+e*y1+2*f. Epilogue End[ ]. Points2D[Line2D[p.d. {}. (* end of "D2DTangentPoints2D‘" *) .Parabola2D.crv2_] := Module[{Q.crv2]}.e. {Point2D[Line2D[p. True.f. q=b*x1+2*c*y1+e.Q].d.b.b. TangentPoints2D[P1:Point2D[{x1_.c.Quadratic2D}].crv2]] ] /.e.p.And].Hyperbola2D. hyperbola or quadratic) from a point.r. curve] Constructs a list containing up to two points that are the contact points of the lines tangent to a second-degree curve (ellipse.a.{Ellipse2D.r].pts}.f}=List @@ Q. The circle is handled as a special case (see above). Which[ IsZero2D[{p. Is2D[crv2. parabola.

Scale2D[eqn. Translate2D::usage= "Translate2D[obj.k}] scales an object about coordinates {h. D2DTransform2D::usage= "D2DTransform2D is a package providing transformations.{h. "D2DMaster2D‘"}]. Begin["‘Private‘"].0}.{x.{u. Scale2D::usage= "Scale2D[obj.".{h.D2DTransform2D The package D2DTransform2D provides the basic support for the transformations provided by Descarta2D (reflect.". Translate2D[objList. 539 .".k}] scales a list of objects.v}] translates an equation in variables ’x’ and ’y’. Scale2D[objList.k} by scale factor ’s’. Translate2D[eqn.k}] scales an equation in variables ’x’ and ’y’. the default is {0. Rotate2D[eqn.k}] rotates a list of objects.line] reflects an angle in a line.k}] rotates an object an angle ’theta’ about a point with coordinates {h.y}.". Reflect2D::usage= "Reflect2D[obj. Rotate2D[objList.{h.{x.v}] translates an object delta distance {u.s.theta.{h.y}.". rotate. Reflect2D[objList.k}. the default is {0.line] reflects a list of objects in a line.{u.line] reflects an equation in variables ’x’ and ’y’ in a line.theta. if the {h. "D2DLine2D‘".k}] rotates an equation in variables ’x’ and ’y’.{x.s.k} coordinates are omitted.y}.{x. {"D2DExpressions2D‘".line] reflects an object in a line. Rotate2D::usage= "Rotate2D[obj.{h. ReflectAngle2D::usage= "ReflectAngle2D[theta.y}. Initialization BeginPackage["D2DTransform2D‘". if the center of scaling {h.v}.{u. Reflect[eqn.{h.v}] translates a list of objects. scale and translate).k} is omitted.0}.". Each Descarta2D object provides specific support for the transformations using these basic capabilities.

Reflect Coordinates Reflect2D[{x. returns False. Reflect2D[eqn_Equal. obj] /. . Reflect List Reflect2D[objList. IsTransformable$2D[obj_] := IsTransformableSingleLevel$2D[obj].b_. y->((a^2-b^2)*y-2*a*b*x-2*b*c)/(a^2+b^2)}.b_.c_]] := 2*ArcTan[b.-a]-theta. Reflect2D[obj_List?IsTransformable$2D.b_.y_?IsScalar2D}. {x->((b^2-a^2)*x-2*a*b*y-2*a*c)/(a^2+b^2).obj]) /. Reflect Reflect Angle ReflectAngle2D[θ.L:Line2D[a_. y}. This function is useful for reflecting objects that are defined by rotation angles. line] Reflects a list of {x. y} coordinates or objects.y}-2*(a*x+b*y+c)*{a. Reflect2D[{x_?IsScalar2D. IsTransformableSingleLevel$2D[obj_] := (IsValid2D[obj] || IsScalarPair2D[obj]).y_?IsScalar2D}. Not[IsScalarPair2D[obj]].Line2D[a_.c_]] := eqn /.b_.{x_?IsScalar2D. y} in a line. line] Reflects an equation in the variables x and y in a line.c_]] := {x.L]&.Line2D[a_. line] Reflects a list of coordinates {x. y}.c_]] := Map[Reflect2D[#.540 D2DTransform2D . ReflectAngle2D[theta_?IsScalar2D. IsTransformable$2D[obj_List] := (And @@ Map[IsTransformableSingleLevel$2D[#]&.b}/(a^2+b^2). Reflect Equation Reflect2D[eqn. otherwise.Line2D[a_. line] Reflects an angle in a line.Reflect Queries Transformable Query The private function IsTransformable$2D[ ] returns True if an object or all the objects in a list are transformable. {x. Not[IsScalarPair2D[obj]].

{x->h+(x-h)*Cos[theta]+(y-k)*Sin[theta]. Rotate Coordinates Rotate2D[coords. Rotate2D[eqn_Equal. it defaults to the origin. {h_?IsScalar2D.k_?IsScalar2D}] := eqn /.{h.k_?IsScalar2D}] := Map[Rotate2D[#. Scale Scale from Origin Scale2D[object.s. .0}] /. Scale2D[obj_?IsTransformable$2D. coords] Rotates a list of {x.theta_?IsScalar2D.y1_?IsScalar2D}. θ. y} coordinates or objects by an angle θ about a position specified by a coordinate list.D2DTransform2D .k_?IsScalar2D}] := {h+((x1-h)*Cos[theta]-(y1-k)*Sin[theta]).theta_?IsScalar2D.k}]&. Rotate2D[obj_List?IsTransformable$2D. Rotate2D[obj_?IsTransformable$2D. {x. θ] Rotates an object by an angle θ about the origin. θ. θ. Not[IsScalarPair2D[obj]].y_?IsScalar2D}.theta_?IsScalar2D.theta. y} by an angle θ about a position specified by a coordinate list. Rotate Equation Rotate2D[eqn.{x_?IsScalar2D. If the third argument is omitted. coords] Rotates an equation in the variables x and y by an angle θ about a position given by coordinates.0}].{0. obj] /. If the third argument is omitted. coords] Rotates a coordinate list {x. Rotate2D[{x1_?IsScalar2D. k+((x1-h)*Sin[theta]+(y1-k)*Cos[theta])}.{0.Rotate 541 Rotate Rotate About Origin Rotate2D[object. {h_?IsScalar2D. Not[IsZeroOrNegative2D[s]]. y}. Rotate List Rotate2D[objList. s] Scales an object about the origin.s_?IsScalar2D] := Scale2D[obj. it defaults to the origin. {h_?IsScalar2D.theta. y->k-(x-h)*Sin[theta]+(y-k)*Cos[theta]}.theta_?IsScalar2D] := Rotate2D[obj.

the scale factor must be positive.s_?IsScalar2D. Not[IsZeroOrNegative2D[s]]. If the position is omitted.s]. Scale2D[obj_?IsTransformable$2D. Scales an equation in the variables x and y from a position Scale2D[eqn_Equal. Scale Equation Scale2D[eqn. Not[IsZeroOrNegative2D[s]].542 D2DTransform2D . {h_?IsScalar2D.k_?IsScalar2D}] := Map[Scale2D[#. If the position is omitted.s_?IsScalar2D. (Not[IsScalarPair2D[obj]] && Not[IsZeroOrNegative2D[s]]).$Failed) /. it defaults to the origin.s.___] := (Message[Scale2D::invalidScale.y1-k}) /. {x.y+v}. {h_?IsScalar2D. coords] Scales a coordinate list from a position given by coordinates.k_?IsScalar2D}] := ({h. y}. {u_?IsScalar2D. s. y} coordinates or objects from a position given by coordinates.Translate Scales Coordinates Scale2D[coords.y_?IsScalar2D}. Scale2D[{x1_?IsScalar2D. it defaults to the origin. s. Scale2D[obj_List. coords] given by coordinates. coords] Scales a list of {x.s_?IsScalar2D. Invalid Scale Returns the $Failed symbol when Scale2D is called with a non-positive scale. Translate2D[{x_?IsScalar2D.y1_?IsScalar2D}.k}]&.{h.{h_?IsScalar2D.y->k+(y-k)/s}) /. s.s_?IsScalar2D. Translate Translate Coordinates Translate2D[coords. obj] /.y_?IsScalar2D}. {u. Scale List Scale2D[objList. IsZeroOrNegative2D[s].v_?IsScalar2D}] := {x+u. {x->h+(x-h)/s. . v}] Translates a coordinate list delta distance. s.k_?IsScalar2D}] := (eqn /.".k}+s*{x1-h.{x_?IsScalar2D. Scale2D::invalidScale= "The scale factor ‘1‘ is invalid.

(* end of "D2DTransform2D‘" *) . Not[IsScalarPair2D[obj]]. y}.{x_?IsScalar2D.{u.D2DTransform2D .v_?IsScalar2D}] := Map[Translate2D[#. {x. Translates an equation in the variables x and y by delta Translate2D[eqn_Equal. v}] distance. (* end of "‘Private" *) EndPackage[ ].y_?IsScalar2D}. {u_?IsScalar2D. {u.Epilogue 543 Translate Equation Translate2D[eqn. {u_?IsScalar2D. Translates a list of {x. Epilogue End[ ].v}]&. {u.y->y-v}). obj] /. Translate List Translate2D[objList.v_?IsScalar2D}] := (eqn /. y} coordinates or objects delta Translate2D[obj_List?IsTransformable$2D. v}] distance. {x->x-u.

.

s3}. Triangle2D::usage= "Triangle2D[{x1.a2.s2.{a1. "D2DLine2D‘".{x3. "D2DPoint2D‘". "D2DSegment2D‘".y2}. Inscribed2D]. "D2DGeometry2D‘".s3}.{"D2DCircle2D‘".D2DTriangle2D The package D2DTriangle2D implements the Triangle2D object.y3}] is the standard form of a triangle.s2. D2DTriangle2D::usage= "D2DTriangle2D is a package that implements the Triangle2D object. Centroid2D::usage= "Centroid2D is the keyword required in Point2D[triangle.a3}}. Centroid2D].{x2.a2. Inscribed2D::usage= "Inscribed2D is the keyword required in Circle2D[triangle.{a1.s3}.". "D2DMaster2D‘". "D2DExpressions2D‘". it is also required in Point2D[triangle.y1}.s2.".". "D2DTransform2D‘"}].{a1. "D2DSketch2D‘".a3}} given three of the six sides and/or angles. 545 . Circumscribed2D]. it is also required in Point2D[triangle. Begin["‘Private‘"].".". "D2DNumbers2D‘".a3}}] computes a complete triangle configuration of the form {{s1. SolveTriangle2D[{{s1.a2. Circumscribed2D]. True] computes an alternate configuration. the coordinates being the vertices of the triangle. if one exists. Circumscribed2D::usage= "Circumscribed2D is the keyword required in Circle2D[triangle. SolveTriangle2D::usage= "SolveTriangle2D[{{s1.". Initialization BeginPackage["D2DTriangle2D‘". unspecified sides and/or angles should be specified as Null. Inscribed2D].

p1. y1 }.{x1. y3 }] Standard representation of a triangle object in Descarta2D.y1_}.$Failed) /.y2_}. Triangle2D[p1:{x1_. {x2 . ‘2‘. the vertex points cannot be collinear.p3}. {x3 . {x3 . Validation Triangle2D[{x1.y3}. Triangle2D[p1:{x1_.Point2D[p3]]).p2.y3_?IsScalar2D}]] := True. If the imaginary parts are insignificant.y2_}. SetDisplay2D[ Triangle2D[{x1_. Triangle2D::imaginary= "An invalid triangle of the form ’Triangle2D[‘1‘. (FreeQ[{p1. y3 }] Detects that the arguments of a triangle are imaginary and returns the $Failed symbol. ‘3‘]’ has been detected. The three arguments are the vertex coordinates of the triangle. they are removed. y1 }.p2. y2 }.y3_}] := (Message[Triangle2D::imaginary.y1_}.$Failed) /.546 D2DTriangle2D . ‘2‘. y1 }.".p3:{x3_. Executed when the package is loaded.y3}]. y2 }.y2_}. y3 }] collinear and returns the $Failed symbol.{x2_.p3:{x3_.Description Description Representation Triangle2D[{x1. Detects that the vertex points of a triangle are Triangle2D::invalid= "An invalid triangle of the form ’Triangle2D[‘1‘.y3_}] := (Triangle2D @@ ChopImaginary2D[Triangle$2D[p1.p2:{x2_.p2. Line[{{x1. Triangle2D[{x1.y2}.y2}.p2.p3}._Pattern] && IsCollinear2D[Point2D[p1].p3}]).p2. {x2_?IsScalar2D.p2. IsValid2D[triangle] Verifies that a triangle is valid. y2 }. (FreeQ[{p1. IsValid2D[Triangle2D[ {x1_?IsScalar2D. Triangle2D[p1:{x1_.y1}.{x2.y2_}.". {x3_?IsScalar2D. Graphics Provides graphics for a triangle by extending the Mathematica Display command.p3]]) /. {x2 .{x3_. {x3 .{x3.Point2D[p2]. the arguments cannot be imaginary.y3_}].{x1. {x2 . .y1_}.y1_?IsScalar2D}._Pattern] && IsTinyImaginary2D[{p1.y1_}._Pattern] && IsComplex2D[{p1.p3].p2.y3_}] := (Message[Triangle2D::invalid.y1}.{x3. ‘3‘]’ has detected.p2:{x2_.p2:{x2_.{x2.p3}.0]).p3:{x3_.p3}.y2_?IsScalar2D}.y1}}] ]. (FreeQ[{p1.

".a2. Not[IsZeroOrNegative2D[{s1.$Failed). IsVertex$2D[n_] := (n==1 || n==2 || n==3). returns False. .a1. SolveTriangle2D::invConfig= "The configuration of sides and/or angles specified is invalid. s2 . The private function CheckConfiguration$2D[{{s1.a2_?IsScalar2D. s3 }.a3_?IsScalar2D}}]:={S. n] Computes the angle at a vertex of a triangle.s2. Vertex Query The private function IsVertex$2D[n] returns True if n is a valid triangle vertex number (1. CheckConfiguration$2D[___]:= (Message[SolveTriangle2D::invConfig]. otherwise.Queries 547 Queries Configuration Query and Check The private function IsValidConfiguration$2D[{{s1.s2_?IsScalar2D. IsValidConfiguration$2D[___]:=False. a2 . IsValidConfiguration$2D[{S. {a1 .a3_?IsScalar2D}}]:=True /. s2 . A:{a1_?IsScalar2D. a2 . no triangle can be constructed.s3_?IsScalar2D}. returns False.a2_?IsScalar2D. otherwise.A}]. A:{a1_?IsScalar2D. s3 }. otherwise.a3}]] && (IsZero2D[s1*Sin[a2]-s2*Sin[a1]] || Not[IsReal2D[s1*Sin[a2]-s2*Sin[a1]]]) && (IsZero2D[s2*Sin[a3]-s3*Sin[a2]] || Not[IsReal2D[s2*Sin[a3]-s3*Sin[a2]]]) && (IsZero2D[s1*Sin[a3]-s3*Sin[a1]] || Not[IsReal2D[s1*Sin[a3]-s3*Sin[a1]]]) && (IsZero2D[Pi-(a1+a2+a3)] || Not[IsReal2D[Pi-(a1+a2+a3)]]).A} /.s3. IsValidConfiguration$2D[{ S:{s1_?IsScalar2D. Scalars Angle Angle2D[triangle. CheckConfiguration$2D[{ S:{s1_?IsScalar2D. {a1 .s2_?IsScalar2D. a3 }}] checks the validity of a complete triangle configuration and returns True if it is valid. reports an error and returns $Failed.D2DTriangle2D . 2 or 3). a3 }}] checks the validity of a complete triangle configuration and returns the configuration unchanged if it is valid.s3_?IsScalar2D}.

(Count[A.a3_?IsScalar2D | Null}}. then they must be consistent. and.n-1] /. s3 }.p2:{x2_.s2_?IsScalar2D | Null.s3_?IsScalar2D | Null}.n_] := Angle2D[Triangle2D[p2. displays an error message. MemberQ[{True. . three constraints are expected.Scalars Angle2D[Triangle2D[p1:{x1_. A:{a1_?IsScalar2D | Null.False}.Null} | A:{a1_?IsScalar2D. if omitted.".a3_?IsScalar2D | Null}}. CheckConfiguration$2D[Nest[SolveTriangle$2D.548 D2DTriangle2D . c=Distance2D[p2. and the others should be set to Null. when set to True.n_] := Module[{a.y3_}]. returns an alternate configuration if two solutions exist.a2_?IsScalar2D} | A:{Null. alternateSolution_:False]:= (Message[SolveTriangle2D::constrain]. a2 . (n==1). alternateSolution_:False]:= (D2D$SolveTriangle2D$AlternateSolution=alternateSolution.Null]>3) && MemberQ[{True.{S.a2_?IsScalar2D.False}.Null.p2:{x2_.p3.alternateSolution].s2_.A}. SolveTriangle$2D[{S:{s1_. ArcCos[(a^2+b^2-c^2)/(2*a*b)] ] /.A].a1_?IsScalar2D. The global variable is used at lower levels to resolve ambiguous cases.p3:{x3_. Solve Triangle SolveTriangle2D[{{s1.y1_}.b.y1_}.y2_}. A:{a1_?IsScalar2D | Null. SolveTriangle2D::constrain= "The triangle configuration is under-constrained. a3 }}.p2]. The private function SolveTriangle$2D must be called three times to compute up to three missing configuration parameters. D2D$SolveTriangle2D$AlternateSolution=False. If more than three configuration parameters are specified.3]]) /.c}.y3_}].A /.$Failed) /.p3]. True | False] Completely solves a triangle given a partial configuration of side lengths and angles and returns the complete configuration of sides and angles. it defaults to False. Three of the six configuration parameters are expected.p3].a2_?IsScalar2D}}]:= {S. b=Distance2D[p1.alternateSolution].p1]. (n==2 || n==3).s3_}.a2_?IsScalar2D | Null. compute the third using θ1 + θ2 + θ3 = π.s2_?IsScalar2D | Null. if detected. Two angles are known. a=Distance2D[p1. Checks for under-constrained configurations. {a1 . s2 .a2_?IsScalar2D | Null.Null]>1 && Count[Join[S. SolveTriangle2D[{ S:{s1_?IsScalar2D | Null. SolveTriangle2D[{ S:{s1_?IsScalar2D | Null.p3:{x3_. A:{a1_?IsScalar2D. Null->Pi-(a1+a2)}. The second argument.s3_?IsScalar2D | Null}.y2_}. Angle2D[Triangle2D[p1:{x1_.

Null]>0. {1.a3_} /. we use the added constraint that the perimeter is set equal to 1 and issue a warning message.A}.n++]. SolveTriangle$2D[ {S:{s1_?IsScalar2D. Two sides and one angle (not the included angle) are known (SSA-CCW).3}].sides=S}.Null}} | {S:{s2_?IsScalar2D.A:{a1_?IsScalar2D.s1_?IsScalar2D.a2_?IsScalar2D. Map[(If[S[[#]]===Null.s3_?IsScalar2D}. . Three angles are known (AAA) but no sides. Null->SolveTriangle$SSA$2D[{s1.A:{a3_.a1_.a3_. A:{a1_?IsScalar2D.Null}. If[a3===Null.D2DTriangle2D .s3_?IsScalar2D. SolveTriangle$2D[{S:{___.Message[SolveTriangle2D::anglesOnly]].ArcCos[( s1^2-s2^2+s3^2)/(2*s1*s3)].a2_.s1_?IsScalar2D. SolveTriangle$2D[{S:{Null.a1_?IsScalar2D}} | {S:{Null.A} ]. While[S[[n]]===Null.s2_?IsScalar2D.s1_?IsScalar2D}.Null. Count[A.ArcCos[( s1^2+s2^2-s3^2)/(2*s1*s2)].Sin[a2].s2.Scalars 549 Three sides are known (SSS).a3_?IsScalar2D}}]:= Module[{SA}. SA={{Sin[a1]._?IsScalar2D. Compute all the sides directly.Null.a3]}}. Count[S.a2]. SolveTriangle$2D[{S:{s1_?IsScalar2D.a2_?IsScalar2D.a1_?IsScalar2D.Null}. Compute the missing angles directly.A:{a1_.a2_?IsScalar2D}} ]:= {S /.A}.Sin[a3]}/(Sin[a1]+Sin[a2]+Sin[a3]).Null}. A:{a1_. A:{a1_?IsScalar2D. Compute the missing side(s) using the Law of Sines.Null]>0}]:= {S.s1_?IsScalar2D}. SolveTriangle2D::anglesOnly= "The triangle configuration is under-constrained.sides[[#]]=S[[n]]*Sin[A[[#]]]/Sin[A[[n]]]])&.Null. a valid configuration with the triangle’s perimeter arbitrarily set to 1 will be computed.a1_}} | {S:{s3_?IsScalar2D.a3_?IsScalar2D}}]:= Module[{n=1.{If[a1===Null. but not all the angles. Since this case is under-constrained.a1}]. Compute the third side using the Law of Cosines.A:{a2_?IsScalar2D.a2_?IsScalar2D.A:{Null. {sides.___} /. SolveTriangle$2D[ {S:{s1_?IsScalar2D.A:{Null.ArcCos[(-s1^2+s2^2+s3^2)/(2*s2*s3)].s2_?IsScalar2D}. SA].a1]. Null->Sqrt[s1^2+s3^2-2*s1*s3*Cos[a2]].s3_?IsScalar2D}.". If[IsValidTriangleQ$2D[SA]. If[a2===Null.Null}} ]:= {S /.A}.Null.Null.a3_}} | {S:{Null.2. Three angles are known and at least one side. Two sides and the included angle are known (SAS).s2_?IsScalar2D.

Null->SolveTriangle$SSA$2D[{s1.s3_}.s1_?IsScalar2D}.False. a3=Pi-(a1+a2). L2:Line2D[A2_.False. Message[SolveTriangle2D::ambiguous.s1_?IsScalar2D.a2alt. True }. normValid=IsValidConfiguration$2D[{{s1.s3_?IsScalar2D.a2_. s3alt=Sqrt[s1^2+s2^2-2*s1*s2*Cos[a3alt]].False}. {False.C2_]] := Triangle2D[Reflect2D[{x1. s3.L2]]. {False.s3}.a2.a3_}}]:={S. {False. Null]].s2_. s3alt.A}.a1_?IsScalar2D. Returns the length of the third side of the configuration.True }. SolveTriangle$2D[{S:{s1_.y1_}.s3.s2.a3.s3alt.y3}.y1}.{x3_. Transformations Reflect Reflect2D[triangle. s3alt. Reflect2D[{x2. SolveTriangle$2D[ {S:{s1_?IsScalar2D.Null. {True .A:{a1_?IsScalar2D. a2alt=Pi-a2. a2=ArcSin[s2*Sin[a1]/s1]. Reflect2D[{x3.a2alt.y2_}.L2]. False}.False. If[normValid && altValid && Not[IsZero2D[s3-s3alt]].True .y3_}].a3}}].A:{Null.s3. Special function for solving SSA cases.B2_.Null}} ]:= {S /.Null. s3=Sqrt[s1^2+s2^2-2*s1*s2*Cos[a3]].s2_.a3alt}}]. {True .Null}} | {S:{Null.A:{a1_. s3alt.a3alt.{a1.s2. .s3_?IsScalar2D}. SolveTriangle2D::ambiguous= "Two valid solutions exist for this configuration.550 D2DTriangle2D . Switch[{normValid.True }. or Null if the configuration is invalid. s3. {True . Not[D2D$SolveTriangle2D$AlternateSolution]]]. No other cases match. Reflect2D[Triangle2D[{x1_. altValid=IsValidConfiguration$2D[{{s1.{a1.True .Null.True. SolveTriangle$SSA$2D[{s1_. a3alt=Pi-(a1+a2alt).". s3.s3alt}.True.a1}].altValid}.A:{Null. set the alternate solution option to ’‘1‘’ to compute the other configuration.L2].altValid.A}.Null}.{x2_.False.Transformations One angle (not the included angle) and two sides are known (SSA-CW).True }.a1_?IsScalar2D}} | {S:{s3_?IsScalar2D. Null. just return the configuration.normValid.y2}.a1_}]:= Module[{a2.D2D$SolveTriangle2D$AlternateSolution}. {True . line] Reflects a triangle in a line. {False.False}.False}.

D2DTriangle2D .{h.nb).k}].theta.Centroid2D] := Point2D[{x1+x2+x3. Scale2D[Triangle2D[{x1_.k}]. Not[IsZeroOrNegative2D[s]].y3_}].{x3+u.{h.y3}.y2+v}.y3_}].{h.{x3_.y3}. Rotate2D[Triangle2D[{x1_. Scale2D[{x2.theta_?IsScalar2D.{h.y1+v}.theta.{h.y2}.theta.y1}.y1_}.s. {u_?IsScalar2D. θ.y2_}. {u. {h_?IsScalar2D.k}]. Point2D[Triangle2D[{x1_.{x2_.y3+v}]. coords] Scales a triangle from a position given by coordinates.{x2_.y2}. s. Scale2D[{x3.y1_}. Point Construction Centroid Point2D[triangle.y2_}.s.{x2_. Centroid2D] Constructs the centroid point of a triangle.y1_}.nb).{x3_.y1+y2+y3}/3].y3_}].s_?IsScalar2D. {h_?IsScalar2D. If the third argument is omitted. Translate Translate2D[triangle.v_?IsScalar2D}] := Triangle2D[{x1+u. v}] Translates a triangle delta distance. The centroid is the intersection of the medians of the triangle (the lines connecting the vertices to the midpoints of the sides).y2_}.Point Construction 551 Rotate Rotate2D[triangle. coords] Rotates a triangle by an angle θ about a position specified by a coordinate list. Rotate2D[{x3.k_?IsScalar2D}] := Triangle2D[Scale2D[{x1.{x3_.y1}. Scale Scale2D[triangle.y2_}.s.y1_}.{x3_.{x2_.k}]. Translate2D[Triangle2D[{x1_.k}]] /. Rotate2D[{x2. it defaults to the origin (see D2DTransform2D. it defaults to the origin (see D2DTransform2D. If the third argument is omitted.{x2+u. .y3_}].{h.k}]].k_?IsScalar2D}] := Triangle2D[Rotate2D[{x1.

{x2_. n1 . Center of Inscribed Circle Point2D[triangle. n2_?IsVertex$2D] := Line2D[T[[n1]]. n1 . Circumscribed2D] Constructs the center of the circle that circumscribes a triangle.y1_}.y2_}. n1_?IsVertex$2D. Point2D[Triangle2D[{x1_.y1_}.y3_}].y3_}].{x2_.y3}]]].y3_}]. n2 ] n2 of a triangle.y2_}.y2}].{x3_. Line Segment Construction Side of a Triangle Segment2D[triangle. (n1!=n2).n_?IsVertex$2D] := Point2D[T1[[n]]]. Inscribed2D] Constructs the center of the circle that inscribes a triangle.Point2D[{x3.y1_}.Inscribed2D]].{x2_.{x2_. Line Construction Side of a Triangle Line2D[triangle. Vertex Point Point2D[triangle.Point2D[{x2.y1}]. Constructs a vertex point of a triangle.552 D2DTriangle2D . The center of the inscribed circle is the intersection of the angle bisectors of the triangle sides. Constructs the line associated with vertices n1 and n2 of a Line2D[T:Triangle2D[{x1_.y2_}. Constructs the line segment associated with vertices n1 and .T[[n2]]] /. The center of the circumscribed circle is the intersection of the perpendicular bisectors of the triangle sides. Point2D[T1:Triangle2D[{x1_.y3_}]. n] numbered from 1 to 3.Circumscribed2D] := Point2D[Circle2D[Point2D[{x1.y1_}.{x3_.{x3_.Line Segment Construction Center of Circumscribed Circle Point2D[triangle.y2_}.{x3_. The vertex points are Point2D[T1:Triangle2D[{x1_. n2 ] triangle.Inscribed2D] := Point2D[Circle2D[T1.

k}.y1}. s1=Distance2D[p2.T[[n2]]] /.p3].y2}+s3*{x3. point.Point2D[{x3.k}=(s1*{x1. Triangle2D[Point2D[{x1_.y1}].{x3_.Circumscribed2D] := Circle2D[Point2D[{x1.s. Circle Construction Circumscribed Circle Circle2D[triangle.y1_}. Triangle from Three Lines Triangle2D[line.Point2D[{x2.y2}.y1}+s2*{x2.y3_}]] := Triangle2D[{x1.p2]. Circle2D[{h. Circle2D[Triangle2D[{x1_.p3:{x3_.y3})/(2*s).y3}].y2_}.y2_}. n1_?IsVertex$2D. Circumscribed2D] Constructs a circle that circumscribes a triangle.r.y1_}. line. .{x3.Point2D[{x3_. Constructs a triangle from three lines that define the sides of Triangle2D::noTriangle= "Two of the lines ‘1‘ are parallel. Triangle Construction Triangle from Three Points Triangle2D[point.y1_}].D2DTriangle2D . (n1!=n2).r] ]. n2_?IsVertex$2D] := Segment2D[T[[n1]].{x2_. Inscribed2D] Constructs a circle inscribed in a triangle.Inscribed2D] := Module[{s1. s3=Distance2D[p1. Circle2D[Triangle2D[p1:{x1_.y3_}]. s=(s1+s2+s3)/2.y3_}]. no triangle exists.h.{x2.{x2_. s2=Distance2D[p1. {h.Point2D[{x2_. line] the triangle.y3_}].y2_}].".y2_}.p3]. Inscribed Circle Circle2D[triangle.Circle Construction 553 Segment2D[T:Triangle2D[{x1_. point] Constructs a triangle from three vertex points.k}.s3.y1_}.{x3_. r=Sqrt[(s-s1)*(s-s2)*(s-s3)/s].s2. or the three are concurrent.y2}].y3}]].p2:{x2_.

a3_?IsScalar2D | Null}}. f1=-S1^2+S2^2+S3^2. when set to True.{A1.S2. s2 .L3]. Triangle2D[{s1_?IsScalar2D.alternateSolution]. If more than three configuration parameters are specified.d->S3}] ] /.c3_]] := If[IsParallel2D[{L1. s2 . Triangle2D[{ S:{s1_?IsScalar2D | Null.{L1.L3]] ].b3_.A2.c2_]. s3 }.b2_.{a.False}. returns an alternate solution if two solutions exist. s3 }] Constructs a triangle in standard position from a configuration of three side lengths.L2.Null. (* end of "D2DTriangle2D‘" *) . a2 . {a1 . (* end of "‘Private" *) EndPackage[ ]. Message[Triangle2D::noTriangle.s3_?IsScalar2D | Null}. L3:Line2D[a3_. a3 }}. then they must be consistent.f1. Three of the six configuration parameters are expected. SA=SolveTriangle2D[{S. The first vertex will be at the origin and the second on the +x-axis.{d. MemberQ[{True. f2=-(S1-S2-S3)(S1+S2-S3)(S1-S2+S3)(S1+S2+S3). If[SA===$Failed.a2_?IsScalar2D | Null.alternateSolution].L2.L3]. Triangle2D[{0. Triangle from Sides/Angles Triangle2D[{s1.L2].$Failed. The second argument. Triangle2D[{{s1.b. L2:Line2D[a2_. and the others should be set to Null.A2.A3}}=SA.Null}}]. it defaults to False.0}.L3}] || IsConcurrent2D[L1.S3}.s2_?IsScalar2D | Null.A3.Point2D[L1.s3_?IsScalar2D}]:= Triangle2D[{{s1. Epilogue End[ ]. The first vertex will be at the origin and the second on the +x-axis.s3}. Triangle2D[Point2D[L1.A1.L3}].a. if omitted.b}] /.0}.554 D2DTriangle2D .b1_.Epilogue Triangle2D[L1:Line2D[a1_.d}.$Failed.c1_].S3.A}.Point2D[L2.S2.s2_?IsScalar2D. A:{a1_?IsScalar2D | Null. {a->f1/(2*S3).f2. {{S1.L2. alternateSolution_:False]:= Module[{SA.{Null.b->Sqrt[f2/S3^2]/2.s2. True | False] Constructs a triangle in standard position from a configuration of side lengths and angles.S1.

Part VIII Explorations .

.

P = Point2D@8x. x.apollon. P1 = Point2D@8x1. y2. y<D. y) that moves so that the ratio of its distance from two fixed points P1 (x1 . Show that the locus is the circle described. y1. y1<D. x2. y1 ) and P2 (x2 . P2 = Point2D@8x2. y2<D. 557 .nb Circle of Apollonius Exploration Show that the locus of a point P (x. k2 − 1 k2 − 1  where d = |P1 P2 |. Approach Form the equation of the locus directly from the conditions. The locus is called the Circle of Apollonius for the points P1 and P2 and the ratio k. Solution Construct the points. In[1]: Clear@x1. y2 ) is a circle with radius dk r=q 2 (k 2 − 1) and center  −x1 + k 2 x2 −y1 + k 2 y2 . yD.

In[4]: C1 = Circle2D@Quadratic2D@eq1. E3D. P2. y<DD êê FullSimplify −x1 + k2 x2 −1 + k −y1 + k2 y2 −1 + k k2 HHx1 − x2L2 + Hy1 − y2L2L H−1 + k2L Out[4] Circle2DA9 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . Form the equation representing the relationship. x2 −> −1. In[3]: Clear@kD eq1 = k ^ 2 ∗ d2 ^ 2 − d1 ^ 2 êê Expand Out[3] −x2 + k2 x2 + 2 x x1 − x12 − 2 k2 x x2 + k2 x22 − y2 + k2 y2 + 2 y y1 − y12 − 2 k2 y y2 + k2 y22 Construct the circle from its equation. €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ 2 2 è!!!!!!!!!!!!!!!!!!!! € E H−1 + k2L2 Discussion This is a plot of a numerical example with P1 (1.558 apollon. k −> 1. y2 −> −2.5<D. PD. 8 x1 −> 1. y1 −> 1.5. −2) and k = 1. E2. P2D. PD. Sqrt@E1_ ^ 2 ∗ E2_ ^ 2 ∗ E3_D −> E1 ∗ E2 ê Sqrt@1 ê E3D< −x1 + k2 x2 −1 + k −y1 + k2 y2 −1 + k dk Out[5] Circle2DA9 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . 8 k ^ 2 ∗ HHx1 − x2L ^ 2 + Hy1 − y2L ^ 2L −> d ^ 2 ∗ k ^ 2. 8x. Sketch2D@8P1. €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ =. C2 = C1 êê. C2< êê. 1). In[2]: d1 = Distance2D@P1. $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% E €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ 2 2 2 In[5]: Clear@d. 0 -2 -4 -6 -8 -6 -4 -2 0 . E1. The numerator under the radical is dk. d2 = Distance2D@P2. €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ =.nb Compute the distances. In[6]: d = Distance2D@P1. P2 (−1.

arccent. In[1]: Clear@rD. C1 = Circle2D@80. Solution Construct a semicircular arc of radius r (the portion of the circle above the x-axis).nb Centroid of Semicircular Arc Exploration Show that the centroid of the area bounded by a semicircular arc of radius r and its chord is on the axis of symmetry at a distance H= 4r 3π from the chord of the arc. 0D. 0<. yD. compute the width of a horizontal rectangle spanning the arc having infinitesimal height. Using symbolic computations. Use integration to find moments of inertia on each side of the centroid. L1 = Line2D@Point2D@0. In[2]: Clear@yD. 559 . rD. Equate the moments of inertia on each side of the centroid and solve for the y-coordinate of the centroid. Construct a horizontal line at height y. Approach Construct representative geometry for the semicircular arc. Compute the intersection points of the horizontal line with the arc.

The final step is the same in both versions. y −> yBL êê Simplify 1 è!!!!!!!!!!!!!!! yB r2 − yB2 H2 r2 + yB2L + r2 yB ArcTanA €€€€€€€€€€€€€€€€€€€€€€€€€€€€ €E è!!!!!!!!!!!!!!! 3 r2 − yB2 1 2 Out[8] − €€€€€ π r2 yB + €€€€€ The moments of inertia must be the same on each side of the centroid line. y −> yBL − Hint1 ê. yD êê Simplify 1 è!!!!!!!!!!!! y ! r2 − y2 H2 r2 + y H−2 y + 3 yBLL + r2 yB ArcTanA €€€€€€€€€€€€€€€€€€€€€€€€€ è!!!!!!!!!!!! ! €E 3 r2 − y2 Out[5] €€€€€ The next few steps show the output computed by Mathematica Version 3.1. In[10]: Solve@eq1.0 produces slightly different results that are algebraically equivalent.0. In[7]: int2 = Integrate@L ∗ Hy − yBL. y=E= The width of the arc is the difference between the abscissas of the intersection points.nb In[3]: pts = Points2D@L1. C1D è!!!!!!!!!!!!! Out[3] 9Point2DA9 r2 − y2 . Hr ^ 2L ^ H3 ê 2L −> r ^ 3 2 r3 3 1 è!!!!!!!!!!!!!!! yB r2 − yB2 H2 r2 + yB2L + r2 yB ArcTanA €€€€€€€€€€€€€€€€€€€€€€€€€€€€ €E è!!!!!!!!!!!!!!! 3 r2 − yB2 Out[6] − €€€€€€€€€€€€€ + €€€€€ I2 is the expression for the moment of inertia of the upper area with respect to y. In[5]: Clear@yBD. y=E. yBD 4r 3π Out[10] 99yB → €€€€€€€€€€ == . In[9]: eq1 = I2 − I1 == 0 2 r3 3 1 2 Out[9] €€€€€€€€€€€€€ − €€€€€ π r2 yB == 0 Solve for y. Version 4. In[4]: L = XCoordinate2D@First@ptsDD − XCoordinate2D@Last@ptsDD Out[4] 2 è!!!!!!!!!!!! ! r2 − y2 By integrating Ld find the moment of inertia of an area. where d is the distance from the centroid line (y = y). int1 = Integrate@L ∗ HyB − yL. Point2DA9− è!!!!!!!!!!!! ! r2 − y2 .560 arccent. yD êê Simplify 1 è!!!!!!!!!!!! y ! r2 − y2 H2 r2 + y H−2 y + 3 yBLL − r2 yB ArcTanA €€€€€€€€€€€€€€€€€€€€€€€€€ è!!!!!!!!!!!! ! €E 3 r2 − y2 Out[7] − €€€€€ In[8]: I2 = −Limit@int2. y −> rD − Hint2 ê. I1 is the expression for the moment of inertia of the upper area with respect to y. In[6]: I1 = Hint1 ê. y −> 0L ê.

|(P − P0 ) × (P1 − P0 )| is equal to |P P 0 ||P P 1 | sin(α) which is a scalar multiple of sin(α). Use the trigonometric definition of a dot product to justify the value for c. (P − P0 ) · (P1 − P0 ) is equal to |P P 0 ||P P 1 | cos(α) which is the same scalar multiple of cos(α). Show that s = |(P − P0 ) × (P1 − P0 )| c = (P − P0 ) · (P1 − P0 ) represent values of s and c useful for computing the bulge factor of the arc. Therefore. respectively. s and c are multiples of the sine and cosine of the angle between the chord and the entry angle as required.arcentry. Approach Use the trigonometric definition of a cross-product to justify the value for s. Solution The cross-product definition in two dimensions is A × B = |A||B| sin(α) where α is the angle between vectors A and B.nb Arc from Bounding Points and Entry Direction Exploration Let P0 and P1 be the start and end points of an arc. Therefore. Therefore. The dot product trigonometric definition in two dimensions is A · B = |A||B| cos(α) where α is the angle between vectors A and B. 561 . and P be a third point on the vector tangent to the arc at P0 .

5 2 1. v2_<D := Cross@8u1. B = s ê Hc + Sqrt@c ^ 2 + s ^ 2DL 3 −3 + 3 Out[3] €€€€€€€€€€€€€€€€€€€€€€€€€€€€ è!!! € 2 Plot the geometry.5 3 2. 1<D. 0<D.562 arcentry. c + c2 + s2 In[3]: P0 = Point2D@p0 = 83. v2. 0) and end point (0. 8u2_. P0D<D. Segment2D@P. 8u2. P. s = Magnitude2D@Cross2D@p − p0. In[2]: Magnitude2D@8u1_. P1.5 0 0 1 2 3 4 . 3. 0) with an entry angle vector through the point (4. p1. Compute the bulge factor using s and c.5 1 0. 0<. v1. First define functions for the two-dimensional cross-product and magnitude. In[4]: Sketch2D@8P0. p1 − p0DD. BD. 0<D. 1). 0<D. Arc2D@p0. p1 − p0D.nb Discussion Example: Construct and sketch the arc with start point (3. v1_<. v1_. In[1]: Cross2D@8u1_. c = Dot@p − p0. The bulge factor is given by B= s √ . w1_: 0<D := Sqrt@u1 ^ 2 + v1 ^ 2 + w1 ^ 2D. P = Point2D@p = 84. P1 = Point2D@p1 = 80.

The dot product trigonometric definition in two dimensions is given by A · B = |A||B| cos(α) where α is the angle between vectors A and B. The cross-product definition in two dimensions is given by A × B = |A||B| sin(α) where α is the angle between vectors A and B. 563 . of an arc and P be a third point on the vector tangent to the arc at P1 .arcexit. therefore. s and c are multiples of the sine and cosine of the angle between the chord and the entry angle as required. is the same scalar multiple of cos(α). Show that s = |(P1 − P0 ) × (P − P1 )| c = (P1 − P0 ) · (P − P1 ) represent values of s and c useful for computing the bulge factor of the arc. Use the trigonometric definition of a dot product to justify the value for c. respectively. (P1 − P0 ) · (P − P1 ) is |P0 P1 ||P P1 | cos(α) and. Solution Let Q be the point of intersection of the tangents at end points P0 and P1 . The entry angle QP0 P1 = α is equal to the angle QP1 P0 because triangle 4QP0 P1 is an isosceles triangle. Therefore. Approach Use the trigonometric definition of a cross-product to justify the value for s.nb Arc from Bounding Points and Exit Direction Exploration Let P0 and P1 be the start and end points. Therefore. the expression |(P1 − P0 ) × (P − P1 )| is |P0 P1 ||P P1 | sin(α) which is a scalar multiple of sin(α).

Segment2D@P. The bulge factor is given by B= s √ . P1D<D.nb Discussion Example: Construct and sketch the arc with end points (3. 0<. 3 2 1 0 -1 0 1 2 3 . Arc2D@p0. v2_<D := Cross@8u1.564 arcexit. 0<D. s = Magnitude2D@Cross2D@p1 − p0. Compute the bulge factor using s and c. w1_: 0<D := Sqrt@u1 ^ 2 + v1 ^ 2 + w1 ^ 2D. 0<D. v1. p − p1D. P1. 0) with an exit angle vector through the point (1. P. v1_. In[1]: Cross2D@8u1_. P1 = Point2D@p1 = 80. p1. v1_<. First define functions for the two-dimensional cross-product and magnitude. In[4]: Sketch2D@8P0. 8u2. B = s ê Hc + Sqrt@c ^ 2 + s ^ 2DL 3 −3 + 3 Out[3] €€€€€€€€€€€€€€€€€€€€€€€€€€€€ è!!! € 2 Plot the geometry. P = Point2D@p = 81. 8u2_. v2. −1<D. BD. 0) and (0. p − p1DD. In[2]: Magnitude2D@8u1_. −1). c + c2 + s2 In[3]: P0 = Point2D@p0 = 83. c = Dot@p1 − p0. 0<D.

565 . Compare the radii of these circles to show they are equal. Compute the tangent circles as described in the exploration statement. below). and c1 and c2 . c1 and c2 . Solution Construct the arbelos circles and the tangent line. These circles are known as Archimedes’ Circles. Prove that the two circles C 0 and C 00 tangent to this line. r2 and r3 = 2 (r1 + r2 ) (see definitions. the large semicircle. c3 . see figure). Approach Position the arbelos from the origin using circles whose radii are r1 .archimed. in an arbelos (shoemaker’s knife.nb Archimedes’ Circles Exploration y C¢ C¢¢ r3 r1 r2 x Draw the vertical tangent line at the intersection point of the two smaller tangent circles. are congruent (have equal radii).

c1 = Circle2D@8r1. 0. −r2. r1D. t1D. c3 = Circle2D@8Hr1 + r2L. Since negative radii are invalid. t1 = TangentCircles2D@8c1. − €€€€€€€€€€€€€€€€€€€€€ . 0<. . r2D. Compare the radii. c2 = Circle2D@82 ∗ r1 + r2. €€€€€€€€€€€€€€€€€€€€€ . 0<. −2 r1D Construct the tangent circles. r1. On@Solve2D::infiniteD. −r2. €€€€€€€€€€€€€€€€€€€€€ . 0<. Map@Radius2D.nb In[1]: Clear@r1. One pair is above the x-axis. − €€€€€€€€€€€€€€€€€€€€€ . r2D. c3. In[2]: Off@Solve2D::infiniteD. − €€€€€€€€€€€€€€€€€€€€€ . r2. the other pair is below. − €€€€€€€€€€€€€€€€€€€€€ . c3. l12 = Line2D@Point2D@2 ∗ r1. t2 = TangentCircles2D@8c2. €€€€€€€€€€€€€€€€€€€€€ == r1 + r2 r1 + r2 r1 + r2 r1 + r2 Out[3] 99−r1. t2D< êê Simplify r1 r2 r1 r2 r1 r2 r1 r2 r1 + r2 r1 + r2 r1 + r2 r1 + r2 r1 r2 r1 r2 r1 r2 r1 r2 9−r1.566 archimed. 0D. l12<D. In[3]: 8Map@Radius2D. the radius of the Archimedes’ Circle is given by R = r1 r2 / (r1 + r2 ). r1 + r2D. €€€€€€€€€€€€€€€€€€€€€ =. InfinityD Out[1] Line2D@1. l12<D.

In[1]: Clear@x0.arcmidpt.nb Midpoint of an Arc Exploration P P1 P0 Show that the midpoint. . x1. y0<D. P . 567 . P0 = Point2D@8x0. y1D. P1 = Point2D@8x1. Solution Create the arc end points. P 2 2 Approach Construct the perpendicular bisector of the arc’s chord. y1<D. Offset the midpoint of the chord an appropriate direction and distance to find the arc’s midpoint. of a bulge factor arc between points P0 and P1 whose bulge factor is B has coordinates   (x0 + x1 ) − B(y0 − y1 ) (y0 + y1 ) + B(x0 − x1 ) . y0.

y1<. 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 . Arc2D@p0. 2D. In[7]: P0 = Point2D@p0 = 84. P1 = Point2D@p1 = 80. y1_<D. P1D. Construct the midpoint and plot the geometry. 4) and bulge factor B = 2. 0) and (0. Coordinates2D@PMDD x0 + x1 2 y0 + y1 2 1 2 y0 + y1 2 Out[3] Point2DA9 €€€€€€€€€€€€€€€€€€€€€ − y0 + €€€€€€€€€€€€€€€€€€€€€ . P = Point2D@PM. y0<. In[3]: Q = Rotate2D@P0. p1. €€€€€ HB Hx0 − x1L + y0 + y1L=E The coordinates of the point at the parameter t = 1/2 produce the same result. In[5]: Arc2D@8x0. B_ ? IsScalar2DD := Point2D@HHx0 + x1L − B Hy0 − y1LL ê 2. P1 : Point2D@8x1_. P. P1. dD. €€€€€ HB Hx0 − x1L + y0 + y1L= Discussion Example: Construct the midpoint of the bulge factor arc with end points (4. 4<D. Q. First.568 arcmidpt. In[4]: Clear@B. Rotate P0 about PM π/2 radians to find Q. which is on the vector from PM to P . Sketch2D@8P0. B ∗ d ê 2D ê. d −> Sqrt@Hx0 − x1L ^ 2 + Hy0 − y1L ^ 2D êê Simplify 1 2 1 2 Out[4] Point2DA9 €€€€€ Hx0 + x1 + B H−y0 + y1LL. y0_<D. 0<D. 8x1. define a function for computing the midpoint. P1. where d is the distance between P0 and P1 . Pi ê 2. x0 + €€€€€ H−x0 − x1L + €€€€€€€€€€€€€€€€€€€€€ =E Offset PM in the direction of Q by distance h = Bd/2. In[2]: PM = Point2D@P0. 2D<D. P = ArcMidPoint2D@P0. BD@1 ê 2D êê FullSimplify 1 2 1 2 Out[5] 9 €€€€€ Hx0 + x1 + B H−y0 + y1LL. HHy0 + y1L + B Hx0 − x1LL ê 2D.nb Construct the midpoint of the arc’s chord. In[6]: ArcMidPoint2D@P0 : Point2D@8x0_.

8xt. 0) can be expressed exactly in symbolic form in terms of elementary functions of a and b. 0<. 0<.nb Arc Length of a Parabolic Conic Arc Exploration Using exact integration in Mathematica show that the arc length of a parabolic conic arc with control points P0 (0. Approach Create the conic arc. Find the parametric equations. Solution Create the conic arc. Show that the result is a function of a and b only. 8xt. yt<D êê Simplify Out[3] 82 Ha + t − 2 a tL. In[3]: 8Dx. bD. tD&. −2 b H−1 + tL t< Compute the derivatives. 0). 1 ê 2D. b<. In[2]: Clear@tD. b H2 − 4 tL< 569 . Dy< = Map@D@#. 8a.caarclen. 81. In[1]: Clear@a. PA (a. yt< = ca1@tD êê Simplify Out[2] 8t H−2 a H−1 + tL + tL. Compute the arc length using the standard formula. b) and P1 (1. ca1 = ConicArc2D@80.

arclen1 = HI1 ê.1. The result shown here was computed by Mathematica Version 3. t −> 0L êê Simplify è!!!!!!!!!!!! ! è!!!!!!!!!!!!!!!!!!!!!!!!!!!! a2 + b2 H−a + 2 a2 + 2 b2L 1 − 2 a + a2 + b2 H1 − 3 a + 2 a2 + 2 b2L 1−4a+4a +4b 1−4a+4a +4b è!!!!!!!!!!!!! è!!!!!!!!!!!!!!!!!!!!!!!!!!!! a−2 a2 −2 b2 1−3 a+2 a2 +2 b2 € ME € ME b2 LogA4 I a2 + b2 + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ b2 LogA4 I 1 − 2 a + a2 + b2 + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1−4 a+4 a2 +4 b2 1−4 a+4 a2 +4 b2 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ € + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ € 3ê2 H1 − 4 a + 4 a2 + 4 b2L H1 − 4 a + 4 a2 + 4 b2L3ê2 Out[4] €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €− 2 2 2 2 . t −> 1L − HI1 ê.nb Integrate to find the arc length. In[4]: I1 = Integrate@Sqrt@Dx ^ 2 + Dy ^ 2D. Version 4.570 caarclen. The resulting function involves elementary functions of a and b only.0 produces a different result that is algebraically equivalent and involves elementary functions of a and b only. tD.0.

8X1. b) and (d. In[1]: Clear@a. b<. pD. Assume b > 0 and d > 0. 0). pD. €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ = 2 2 Form an implicit equation of the curve by eliminating t. show that the area between the conic arc and its chord is given by    1−ρ bdρ 2 A = 3 ρr + (−1 + ρ) loge 2r ρ+r where r = p −1 + 2ρ (ρ 6= 1/2). b. 0<. 571 . Approach Construct the conic arc in the given position and use integration to find the area. (a. ca1 = ConicArc2D@80. Y1< = ca1@tD êê FullSimplify t H2 a p H−1 + tL + d H−1 + pL tL −1 + p H1 − 2 tL − 2 H−1 + tL t 2 b p H−1 + tL t −1 + p H1 − 2 tL − 2 H−1 + tL t Out[2] 9 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ € . Determine the coordinates of a point at parameter t. In[2]: Clear@tD. 8a. Solution Construct the conic arc.nb Area of a Conic Arc (General) Exploration For the conic arc whose control points are (0. 0<. 0). 8d.caarea1. d.

In[4]: ans = Solve@eq1. rD. L. The length.nb In[3]: Clear@x. eq1 = Eliminate@8x == X1.0 produces a slightly different result that is algebraically equivalent. In[5]: L = Hx ê. ans@@1. tD Out[3] 4 a2 p2 y2 + a p2 y H4 b d − 8 b x − 4 d yL == 4 b2 d p2 x − 4 b2 p2 x2 − 4 b d p2 x y − d2 y2 + 2 d2 p y2 − d2 p2 y2 Solve the implicit equation for x. A2 = b ∗ d ∗ p ∗ Hp ∗ r + H−1 + pL ^ 2 ∗ Log@H1 − pL ê Hp + rLDL ê H2 ∗ r ^ 3L ê. E2. of an area element in terms of y is the difference between the two x locations on the curve. 1DDL êê FullSimplify d è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Hb p − yL Hb p + y − 2 p yL bp Out[5] €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ The area between the curve and the x-axis is the integral of L evaluated between the limits on the y-axis.1. In[6]: Off@Integrate::generD. yD. ans@@2. The result shown in this step was computed using Mathematica Version 3. b ∗ p<D êê FullSimplify è!!!!!!!!!!!!!!!!!!!!!!!!! è!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2 I b H−1+pL p 2 2 i €E è!!!!!!!!!!! j I H−1 + pL −b H−1 + pL p −b H−1 + pL p LogA €€€€€€€€€€€€€€€€€€€€€€€€€€€ j i 1 1−2 p 1 − 2 p H−2 + 4 pL bp k k j j €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ j dj €+ Out[6] €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ j è!!!!!!!!!!!!! è!!!!!! j j j y z zy Ip i y è!!!!!!!!! ! iè!!!!!!!!!!!!! z z y zz b2 p2 j j1 − €€€€€€€€€€€€€€€€€€€€€€€€€ j 1 − 2 p p + I H−1 + pL2 LogA2 b p j z zz è!!!!!!!!!!!!! zEzz 1 − 2 p { {zz k k {{ This is the area formula given in the exploration statement above. In[7]: On@Integrate::generD. so we ignore the convergence warning by turning the warning message off. xD êê FullSimplify è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Hb p − yL Hb p + y − 2 p yL M 2bp è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! b d p + 2 a p y + d I−p y + Hb p − yL Hb p + y − 2 p yL M 9x → €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 2bp b d p + 2 a p y − d Ip y + Out[4] 99x → €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ =. y == Y1<. Version 4.0. 8y. r −> Sqrt@−1 + 2 ∗ pD b d p Ip è!!!!!!!!!!!!!!! 1−p −1 + 2 p + H−1 + pL2 LogA €€€€€€€€€€€€€€€€€€€€€€ € EM p+è!!!!!!!!!!!!! −1+2 p Out[7] €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ € 3ê2 2 H−1 + 2 pL The area under the curve is the same as the area given by the formula. The curve is smooth. 1DDL − Hx ê. A1 = Integrate@L. In[8]: IsZero2D@A1 − A2D Out[8] True . Clear@E1. 0.572 caarea1.

b) and (d. 8d. Solution Create the conic arc. (a.caarea2. 8a. Solve for t in terms of the y-coordinate. 573 . 0<. 0). Approach Place the conic arc in the position given and use integration to find the area. ans = Solve@ca1@tD@@2DD == y. dD. ca1 = ConicArc2D@80. 0<. In[2]: Clear@tD. 9t → €€€€€ j1 + €€€€€€€€€€€€€€€€€€€€€€€€€ Find the x-coordinate of the left side of the rectangle. b<. In[1]: Clear@a. 1 ê 2D. b. tD êê Simplify 1 2 è!!!!!!!!!!!!! b−2y 2 b 1 i 2 k è!!!!!!!!!!!!! y b−2y b { z j z== Out[2] 99t → €€€€€ − €€€€€€€€€€€€€€€€€€€€€€€€€ è!!! è!!! =.nb Area of a Conic Arc (Parabola) Exploration Show that the area between a conic arc whose projective discriminant is ρ = 1/2 and its chord is given by A= bd 3 when the control points are (0. 0).

In[4]: X2 = ca1@tD@@1DD ê. yD êê Simplify. y −> 0L bd 3 Out[6] €€€€€€€€€€ . ans@@2. ans@@1.nb In[3]: X1 = ca1@tD@@1DD ê. In[5]: L = X2 − X1 êê Simplify d è!!!!!!!!!!!!! b−2y b Out[5] €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ è!!! Find the area by integration (ρ = 1/2. so the limits of integration are 0 to b/2). 1DD êê Simplify bd− è!!! è!!!!!!!!!!!!! b d b−2y +2ay−dy 2b Out[3] €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ Find the x-coordinate of the right side of the rectangle.574 caarea2. In[6]: I1 = Integrate@L. 1DD êê Simplify bd+ è!!! è!!!!!!!!!!!!! b d b−2y +2ay−dy 2b Out[4] €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ Find the width of the rectangle. y −> b ê 2L − HI1 ê. A1 = HI1 ê.

y1 ) and whose projective discriminant is ρ is H= −ρ2 xA + (ρ − 1)2 xM 1 − 2ρ K= −ρ2 yA + (ρ − 1) yM 1 − 2ρ 2 where PM (xM . PA (xA . yM ) is the midpoint of the conic arc’s chord and has coordinates xM = x0 y0 + y1 . 2 and yM = x1 2 Approach Form the quadratic equation of a conic arc and convert it to a quadratic.0. The following steps were computed using Mathematica Version 3.1.nb Center of a Conic Arc Exploration Show that the center (H. Solution Determines the quadratic equation of a conic arc. Both versions produce the same final step.cacenter. y0 ). Find the center point of the quadratic and simplify. Version 4.0 produces different results that are algebraically equivalent. K) of a conic arc whose control points are P0 (x0 . yA ) and P1 (x1 . 575 .

y<D êê Simplify. x0. x. 8x. In[3]: q1 = Quadratic2D@eq1. In[4]: Clear@pD. 8a −> HHy − yAL Hx1 − xAL − Hx − xAL Hy1 − yALL ê F. FD. x1.nb In[1]: Clear@a. yA. y0 + y1 −> 2 ∗ yM< êê FullSimplify p2 xA − H−1 + pL2 xM −1 + 2 p p2 yA − H−1 + pL2 yM −1 + 2 p Out[4] Point2DA9 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . k −> H1 − pL ^ 2 ê H4 p ^ 2L. €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ =E Change the signs on the numerator and denominator to get the desired formulas.576 cacenter. 8F −> Hy0 − yAL Hx1 − xAL − Hx0 − xAL Hy1 − yAL. xA. c1 = Point2D@q1D êê Simplify Out[3] Point2DA 2 F k Hx0 + x1 − 2 xAL + H−1 + 4 kL xA H−xA y0 − x0 y1 + xA y1 + x1 Hy0 − yAL + x0 yAL 9 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . y0. In[5]: Map@HH−1 ∗ Numerator@#DL ê H−1 ∗ Denominator@#DLL&. b −> HHy − yAL Hx0 − xAL − Hx − xAL Hy0 − yALL ê H−FL< êê Simplify 1 F 2 Out[1] €€€€€€€ 2€ H−k HF + x0 y − x1 y − x y0 + xA y0 + x y1 − xA y1 − x0 yA + x1 yAL + HxA Hy − y1L + x Hy1 − yAL + x1 H−y + yALL HxA H−y + y0L + x0 Hy − yAL + x H−y0 + yALLL Multiply through by F 2 . c2D −p2 xA + H−1 + pL2 xM 1−2p −p2 yA + H−1 + pL2 yM 1−2p Out[5] Point2DA9 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . k. x0 + x1 −> 2 ∗ xM. €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ =E . H−1 + 4 kL Hx1 y0 − xA y0 − x0 y1 + xA y1 + x0 yA − x1 yAL 2 F k Hy0 + y1 − 2 yAL + H−1 + 4 kL yA H−xA y0 − x0 y1 + xA y1 + x1 Hy0 − yAL + x0 yAL €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ =E H−1 + 4 kL Hx1 y0 − xA y0 − x0 y1 + xA y1 + x0 yA − x1 yAL Simplify. y. b. eq1 = a ∗ b − k H1 − a − bL ^ 2 ê. c2 = c1 ê. In[2]: eq2 = eq1 ∗ F ^ 2 Out[2] −k HF + x0 y − x1 y − x y0 + xA y0 + x y1 − xA y1 − x0 yA + x1 yAL2 + HxA Hy − y1L + x Hy1 − yAL + x1 H−y + yALL HxA H−y + y0L + x0 Hy − yAL + x H−y0 + yALL Construct the quadratic and the center points of the quadratic. y1.

(a.nb Circular Conic Arc Exploration Show that the conic arc with control points (0. €€€€€€€€€€ . Solution Create the conic arc. e1. Construct the quadratic associated with the conic arc. 8a. pD. c1. b) and (2a. Approach Create the conic arc and find the quadratic associated with it. Force the quadratic’s coefficients to represent a circle and solve for ρ. b<. 0) will be a circular arc if ρ= a(−a + √ a2 + b 2 ) b2 . €€€€€€€€€€€€€€€€€€€€€€ 2 2 € . 0). f1< = Map@Together. d1. In[3]: 8a1. 0<. In[2]: Q1 = Quadratic2D@ca1D. 0<. pD. List @@ Q1D 1 4a −1 + 2 p 4b p 1 2a 1 2b Out[3] 9− €€€€€€€€€€€€ 2€ . Extract and simplify the coefficients. 0. b1. 577 . − €€€€€€€€€€ .cacircle. 82 a. b. 0= Find ρ that makes the quadratic a circle. ca1 = ConicArc2D@80. In[1]: Clear@a.

ans2<. In[6]: ca2 = ca1 êê. Sketch2D@8ca2<D.578 cacircle. 8a −> 6.nb In[4]: ans1 = Solve@a1 == c1. b −> 20. In[5]: ans2 = Last@ans1D@@1DD a I−a + è!!!!!!!!!!!! ! a2 + b2 M b € Out[5] p → €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ 2 Discussion A numerical example with a = 6 and b = 40. 9p → €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ 2 2 Use the positive result. pD êê Simplify a Ia + è!!!!!!!!!!!! ! a2 + b2 M b a I−a + è!!!!!!!!!!!! ! a2 + b2 M b € == Out[4] 99p → − €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ =. 4 3 2 1 0 0 2 4 6 8 10 12 .

yM ) is the midpoint of P0 P1 ). p1 = Point2D@P1 = 8x1. Solution Create the conic arc control points. PA (xA . In[1]: Clear@x0.0. €€€€€€€€€€€€€€€€€€€€€ =E Construct the point on the median. y0 ). Approach Construct the geometry and compare the coordinates of P to the shoulder point coordinates. This result was computed using Mathematica Version 3.nb Shoulder Point on Median Exploration Let C be a conic arc with control points P0 (x0 . y0<D. In[2]: pM = Point2D@p0. xA.0 computes a slightly different result that is algebraically equivalent. Let P be the point on the median PA PM associated with vertex PA of 4P 0 PA P1 such that |P P M |/|PA PM | = ρ (PM (xM . x1. pA = Point2D@PA = 8xA. y0. p0 = Point2D@P0 = 8x0. y1D. Show that P is coincident with the shoulder point of C. having coordinates (xM + ρ(xA − xM ). y1<D.1. Version 4. y1 ) and projective discriminant ρ.camedian. yA. yA ) and P1 (x1 . 579 . p1D x0 + x1 2 y0 + y1 2 Out[2] Point2DA9 €€€€€€€€€€€€€€€€€€€€€ . Construct the midpoint of the chord. yA<D. yM + ρ(yA − yM )). Both versions verify that the points are coincident in the final step.

8 x0 −> 0. pA. xA −> 2. In[4]: Clear@xM. yA −> 6. x1 −> 6. P1. P = Point2D@pM. yM −> Hy0 + y1L ê 2<D êê Simplify 1 2 1 2 Out[4] Point2DA9 €€€€€ Hx0 − p x0 + x1 − p x1 + 2 p xAL. y0 −> 0. In[6]: ca1 = ConicArc2D@P0.65<. Segment2D@pM. pA. pAD< êê.580 camedian. Q = Point2D@8 xM + p HxA − xML ê. Sketch2D@8ca1. PlotRange −> AllD. €€€€€ Hy0 − p y0 + y1 − p y1 + 2 p yAL=E The point on the median is coincident with the shoulder point. Q. In[5]: IsCoincident2D@P. pM. p1. yMD. QD Out[5] True Discussion This is a plot of a numerical example. yM + p HyA − yML ê. p ∗ Distance2D@pM. p0. pD. €€€€€ Hy0 − p y0 + y1 − p y1 + 2 p yAL=E Construct the shoulder point. 6 5 4 3 2 1 0 0 1 2 3 4 5 6 . y1 −> 0. xM −> Hx0 + x1L ê 2. p −> 0.nb In[3]: Clear@pD. PA. pADD êê Simplify 1 2 1 2 Out[3] Point2DA9 €€€€€ Hx0 − p x0 + x1 − p x1 + 2 p xAL.

caparam. Solution Create the unit conic arc. eq1 = Eliminate@8xt == First@ca1@tDD. PA (a. 8a. tD. yt<D êê Simplify Out[3] Quadratic2D@4 b2 p2. 81. Approach Create the unit conic arc. 8xt. b) and P2 (1. In[3]: q1 = Quadratic2D@eq1. 4 H1 − 2 aL b p2.nb Parametric Equations of a Conic Arc Exploration Show that the parametric equations of a unit conic arc represent the same implicit quadratic equation as the one underlying the conic as derived from the control points P0 (0. ca1 = ConicArc2D@80. pD. Eliminate t from the parametric equations and construct a quadratic from the result. b<. 8t<D Out[2] a p2 H4 b − 8 b xt − 4 ytL yt + 4 a2 p2 yt2 == 4 b2 p2 xt − 4 b2 p2 xt2 − 4 b p2 xt yt − yt2 + 2 p yt2 − p2 yt2 Construct the quadratic represented by the parametric equations. 0). In[2]: Clear@xt. yt. pD. −4 b2 p2. 1 − 2 p + H1 − 2 aL2 p2. Eliminate t from the parametric equations. In[1]: Clear@a. 0<. b. 0<. Verify that the two quadratics are identical. 0D 581 . 4 a b p2. 0) and ρ. yt == Last@ca1@tDD<. Construct a quadratic directly from the conic arc.

nb Construct the quadratic from the conic arc. 4 b2 p2. 4 H−1 + 2 aL b p2. 0D Both quadratics are the same. In[5]: IsCoincident2D@q1. −1 + 2 p − H1 − 2 aL2 p2. In[4]: q2 = Map@Simplify. ignoring the −1 factor. −4 a b p2. q2D Out[5] True . Quadratic2D@ca1DD êê Simplify Out[4] Quadratic2D@−4 b2 p2.582 caparam.

C1D êê FullSimplify 1 2 Out[2] 9Point2DA9 €€€€€ Is − 1 è!!!!!!!!!!!!!!2 è!!!!!!!!!!!!!! 4 p + s M. 0) of C1 with the x-axis are the roots of the quadratic equation x2 − sx − p = 0. 1. 1). passing through the three points (0. C1 = Circle2D@ p1 = Point2D@80. €€€€€€€€€€€€€€€ =. Solution Construct the circle through three points. Solve the quadratic equation directly and show that the roots are equal to the x-coordinates of the intersection points. €€€€€ Intersect the circle with the x-axis. p2 = Point2D@80. 583 . sD. 0D.carlyle. −p). −p) and (s. show that the x-coordinates of the intersection points P1 (x1 . In[2]: pts = Points2D@Line2D@0. 0=E. 1<D. −p<DD êê FullSimplify s 2 1−p 2 1 "####################### H1 + pL2 + s2 E 2 Out[1] Circle2DA9 €€€€€ . (0. p3 = Point2D@8s. In[1]: Clear@p. 0) and P2 (x2 . 0=E= 2 Solve the quadratic directly which produces the same roots as the x-axis intersections. Approach Construct the circle through three points and intersect it with the x-axis.nb Carlyle Circle Exploration Given a circle. C1 . Point2DA9 €€€€€ Is + 4 p + s2 M. −p<D.

In[4]: Sketch2D@8C1. xD 1 2 Out[3] 99x → €€€€€ Is − 1 è!!!!!!!!!!!!!!2 è!!!!!!!!!!!!!! 4 p + s M=. p2. 9x → €€€€€ Is + 4 p + s2 M== 2 Discussion This is a plot of a numerical example with p = 2 and s = 4. s −> 4<D.584 carlyle. Solve@x ^ 2 − s ∗ x − p == 0.nb In[3]: Clear@xD. 2 1 0 -1 -2 -3 0 1 2 3 4 The intersection points on the x-axis are the same as the roots of the equation. 8p −> 2. In[5]: NSolve@x ^ 2 − 4 ∗ x − 2 == 0.44949<< .44949<. pts. 8x → 4. p1. p3< ê. xD Out[5] 88x → −0.

t3D. V2. 8V1. €€€€€€€€€€€€€€€€€€€€ =E= Point2DA9 €€€€€€€€€€€€€€€€€€€€ 1 + t32 1 + t32 1 − t22 1 + t2 2 t2 1 + t2 Out[2] 9Point2DA9 €€€€€€€€€€€€€€€€€€€€ 2 . express the coordinates of the vertex points in terms of parameters t1 . In[1]: RationalParameterization2D@t_D := 8H1 − t ^ 2L ê H1 + t ^ 2L.castill. Describe a method for inscribing a triangle inside C1 such that the sides of the triangle pass through the three given points. In[2]: Clear@t1. P2 and P3 be three points inside the circle C1 ≡ x2 + y 2 = 1. Solution This is a function that returns the rational parameterization of a unit circle at the origin given a parameter value. Form three equations in three unknowns. 8t1. using the condition that each of the given points must lie on a line containing one side of the triangle. Point2DA9 €€€€€€€€€€€€€€€€€€€€ 2 . Solve the three equations for the parameter values of the vertex points. Approach Let V1 . €€€€€€€€€€€€€€€€€€€€ 2 =E. t2 and t3 . t1 . €€€€€€€€€€€€€€€€€€€€ 2 =E. t2. V2 and V3 be the vertex points of the inscribed triangle. t3<D 1 − t12 2 t1 1 + t1 1 + t1 2 t3 1 − t32 . 2 t ê H1 + t ^ 2L<. t. t2 and t3 . Using the rational parametric equations of the circle.nb Castillon’s Problem Exploration Let P1 . Construct three points on C1 at parameters t1 . V3< = Map@Point2D@RationalParameterization2D@#DD&. t2. t2 and t3 . 585 .

eq3 = Equation2D@L13. −0. y2 −> −0. In[6]: Sketch2D@8Circle2D@80. −1 − t1 t3D< Form three equations by forcing the points P1 . y3 −> −0. t3<D êê FullSimplify. −1 − t1 t3 + H1 − t1 t3L x3 + Ht1 + t3L y3 == 0< Solve the equations for the parameter values. P3 = Point2D@8x3. L13< Out[3] 8Line2D@1 − t1 t2. V3D. y2. Line2D@1 − t1 t3. so we suppress them and use them in the graphical illustrations below. ansD< ê. x3. eq1 = Equation2D@L12. In[3]: L12 = Line2D@V1.5.5). Segment2D@V1. −1 − t2 t3 + H1 − t2 t3L x2 + Ht2 + t3L y2 == 0. y1 −> 0. V3. The resulting expressions are complicated and uninteresting. t2. 0.25.25. y2<D. P1 = Point2D@8x1.586 castill. 8x1. −0. Length@ansD Out[5] 2 Discussion Example 1: Plot the solutions for the points P1 (0. Segment2D@V2. y3<D. t2 + t3. V3D< ê. 1D. y1.5.nb Construct three lines containing the three sides of the triangle. 8x1 −> −0. V3D êê FullSimplify. P2. eq2 = Equation2D@L23. y1<D. V2.5.25. P3. −1 − t1 t2D. . P2 and P3 to be on the lines containing the sides of the triangle. eq2. P2 = Point2D@8x2. L23. x2 −> 0. 0<. In[5]: ans = Solve2D@eqns. y1<D. #L&. x3 −> −0. 8L12. In[4]: Clear@x1. L13 = Line2D@V1.5.5) and P3 (−0. 8x2. 8t1. P1. y3D.5<D. L23 = Line2D@V2. y3<D.5. x2.25). Map@H8V1. V2D. V2D êê FullSimplify. t1 + t2. 8x3. y2<D. Segment2D@V1. t1 + t3. eqns = 8eq1. Notice that in general there are two solutions to the problem. P2 (0. V3D êê FullSimplify. −1 − t2 t3D. eq3< Out[4] 8−1 − t1 t2 + H1 − t1 t2L x1 + Ht1 + t2L y1 == 0. Line2D@1 − t2 t3.

8x1 −> 0. 0<. y2 −> 0.5). Segment2D@V1. Segment2D@V2. P2 (−0. In[7]: Sketch2D@8Circle2D@80. P1. V3D.5.5) and P3 (0.5). 1 0. V3. Map@H8V1. #L&. P3. y3 −> −0.5 0 0. 1D.5. ansD< ê.5 1 Example 2: Plot the solutions for the points P1 (0.5 0 -0. x3 −> 0. 0. x2 −> −0.5 0 0.5.5 0 -0. Segment2D@V1.nb 587 1 0.5 1 . 0. P2.5<D.castill. V2D.5 -1 -1-0. y1 −> 0. V2.5.5. −0.5. V3D< ê.5 -1 -1-0.

.

b.catnln. 8a. 4 b2 p2. 0D 589 . 0) and whose projective discriminant is ρ. 4 H−1 + 2 aL b p2. Construct the polar of P with respect to the quadratic (the tangent. Solution Create the conic arc. 0<. b p=E Construct the underlying quadratic. pD. Approach Create the conic arc and construct a point at t = 1/2.nb Tangent Line at Shoulder Point Exploration Let P be the point at parameter value t = 1/2 on a unit conic arc. PA (a. Let L be the line tangent to C at t. Show that L is horizontal and. b<. The point P is called the shoulder point of the conic arc. −4 a b p2. parallel to the conic arc’s chord. whose control points are P0 (0. 0<. therefore. b) and P1 (1. ca1 = ConicArc2D@80. −1 + 2 p − H1 − 2 aL2 p2. L). In[3]: Q = Quadratic2D@ca1D êê Simplify Out[3] Quadratic2D@−4 b2 p2. 0). Construct the point at t = 1/2. 81. In[1]: Clear@a. Construct the quadratic underlying the conic arc. C. pD. In[2]: P = Point2D@ca1@1 ê 2DD êê Simplify 1 2 1 2 Out[2] Point2DA9 €€€€€ + J− €€€€€ + aN p. Show that L is parallel to the chord P0 P1 at a distance bρ from P0 P1 .

b = 2 and ρ = 0.2 0 -0. P.2 . 8−0.4 0. CurveLength2D −> 5.2 0 0.2 0. QD êê Simplify Out[4] Line2D@0.45<.6 0. −b pD Discussion Plot a numerical example with a = 1. L< ê.2 -0.nb The tangent line at P is horizontal and at a distance bρ from P0 P2 .25<<D. 1.45.4 0. 1. PlotRange −> 88−0.25. 8a −> 1. 1.6 0. b −> 2.25<.8 0. In[4]: L = Line2D@P.25.2 1 0. In[5]: Sketch2D@8ca1.8 1 1. p −> 0. 1.590 catnln.

0. 2 b − 4ac b − 4ac Approach Directly apply the change in variables to the equation and simplify the resulting quadratic. f. yD. Solution Apply the specified change in variables. x. d. In[1]: Clear@a.center. implying that the center of the conic is h= 2ae − bd 2cd − be . y −> y + H2 a ∗ e − b ∗ dL ê Hb ^ 2 − 4 a ∗ cL< 2 2cd−be 2cd−be −b d + 2 a e b −4ac b −4ac b −4ac 2 −b d + 2 a e −b d + 2 a e 2cd−be + xN J €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ + yN + c J €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ + yN b J €€€€€€€€€€€€€€€€€€€€€€€€€€€€ € b2 − 4 a c b2 − 4 a c b2 − 4 a c € + xN + e J €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ + yN + Out[1] f + d J €€€€€€€€€€€€€€€€€€€€€€€€€€€€ € + xN + a J €€€€€€€€€€€€€€€€€€€€€€€€€€€€ 2 2 2 Simplify the quadratic and notice that the linear terms have vanished. b.0 produces a slightly different result for the constant term that is algebraically equivalent to the one shown here. 8x −> x + H2 c ∗ d − b ∗ eL ê Hb ^ 2 − 4 a ∗ cL. k= 2 . e. eq1 = a ∗ x ^ 2 + b ∗ x ∗ y + c ∗ y ^ 2 + d ∗ x + e ∗ y + f ê.1. Version 4. This result was computed using Mathematica Version 3.nb Center of a Quadratic Exploration Show that applying the change in variables x = x0 + 2cd − be 2ae − bd and y = y 0 + 2 2 b − 4ac b − 4ac to the quadratic equation ax2 + bxy + cy 2 + dx + ey + f = 0 causes the linear terms to vanish. c. 591 .

b and c are unaffected by this change in variables. y<D êê FullSimplify c d2 + e H−b d + a eL b −4ac Out[2] Quadratic2DAa.592 center. . 0. €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ € + fE 2 Discussion Notice that the coefficients a.nb In[2]: Q1 = Quadratic2D@eq1. 0. 8x. b. c.

respectively.chdlen. P1 is one of the intersection points. d.nb Chord Length of Intersecting Circles Exploration r2 r1 d C1 C2 D Show that the distance. d. 593 . and the distance between the centers is D. Approach Assume the radii of the two circles centered at C1 and C2 are r1 and r2 . between the intersection points of two circles is given by p − (D − r1 − r2 ) (D + r1 − r2 ) (D − r1 + r2 ) (D + r1 + r2 ) d= D where D is the distance between the centers of the circles. The length of the common chord. and r1 and r2 are the radii of the two circles. can be found by equating the area (squared) of 4C 1 C2 P1 using Heron’s formula and the standard area formula A = bh/2.

D1D. Sqrt@−D1 ^ 4 + 4 D1 ^ 2 r ^ 2D −> D1 ∗ Sqrt@−D1 ^ 2 + 4 r ^ 2D Out[4] 9d → "#################### # −D12 + 4 r2 = . This result was √ computed using Mathematica Version 3. ans2 = Last@ansD êê. In[2]: Clear@dD. A2 = HD1 ∗ Hd ê 2L ê 2L ^ 2 êê Simplify d2 D12 16 Out[2] €€€€€€€€€€€€€€€€€€ Set the areas equal and solve for d. This result was computed using √ Mathematica Version 3. r2.1. Discussion If the radii are equal the result can be significantly simplified. Version 4.0. r2 −> r< êê FullSimplify. A1 = s Hs − r1L Hs − r2L Hs − D1L êê Simplify 1 16 Out[1] − €€€€€€€€€ HD1 − r1 − r2L HD1 + r1 − r2L HD1 − r1 + r2L HD1 + r1 + r2L A2 is the area (squared) by the standard area formula A = bh/2 (d is the distance between the intersection points.e. ans2 êê.1. i. Take the positive value. In[3]: ans = Solve@A1 == A2. Version 4.nb Solution A1 is the area (squared) by Heron’s formula.0 produces a different result involving −1 that is algebraically equivalent. In[4]: Clear@rD. In[1]: Clear@r1.0. 8r1 −> r.594 chdlen. the length of the chord).0 produces a different result involving −1 that is algebraically equivalent. dD êê FullSimplify è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! −HD1 − r1 − r2L HD1 + r1 − r2L HD1 − r1 + r2L HD1 + r1 + r2L D1 è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! −HD1 − r1 − r2L HD1 + r1 − r2L HD1 − r1 + r2L HD1 + r1 + r2L 9d → €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == D1 Out[3] 99d → − €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ =. s = Hr1 + r2 + D1L ê 2.

0D Simplify and convert the quadratic to an equation. −a2 b. Point2D@0. Equation2D@ Quadratic2D @@ SimplifyCoefficients2D@List @@ QD. Q = Quadratic2D@Point2D@0. In[1]: Clear@a. 0. Approach Find the quadratic (circle) through the three points. 0D. then convert it to an equation.nb Circle Through Three Points Exploration Show that the equation of the circle through the three points (0. 0). 0D. bDD Out[1] Quadratic2D@a b. Solution Construct the quadratic. b) is x2 + y 2 − ax − by = 0. bD. 0) and (0. In[2]: Clear@x. y<D Out[2] −a x + x2 − b y + y2 == 0 595 .cir3pts. 8x. Point2D@a. (a. −a b2. yD. a b.

.

Approach Create an expression for the area. subtended by a segment of a circle whose area is one-third of the full circle is the root of the equation θ − sin θ π = . A1 = SegmentArea2D@c1 = Circle2D@80. Solution Find the area of a circle’s segment. θ. Create an expression for the area of a full circle. In[1]: Clear@r. 80.circarea. In[2]: A2 = Area2D@c1D Out[2] π r2 Form the equation. 0<. t1<D 1 2 Out[1] €€€€€ r2 Ht1 − Sin@t1DL Find the area of a full circle. t1D. of a segment in terms of a generic angular span. A2 . 3 2 Also.nb One-Third of a Circle’s Area Exploration Show that the angle. 597 . show that θ is within 1/2 percent of 5π/6 radians. Solve the equation A1 = A2 /3 for θ1 . rD. A1 . θ1 .

1. Area2D@Circle2D@80. In[4]: eq2 = eq1 ê. r ^ 2 −> 1 π 3 1 2 Out[4] − €€€€€ + €€€€€ Ht1 − Sin@t1DL == 0 Discussion Solve the equation A1 = A2 /3 for θ1 . 0<. 8t1. In[5]: rt = FindRoot@Pi ê 3 == Ht1 − Sin@t1DL ê 2. 1DD ê 3< êê N Out[7] 81.598 circarea.nb In[3]: eq1 = A1 − A2 ê 3 == 0 π r2 3 1 2 Out[3] − €€€€€€€€€€€€€ + €€€€€ r2 Ht1 − Sin@t1DL == 0 Divide both sides by r2 . In[7]: 8SegmentArea2D@Circle2D@80. 80. 0<.60533< Show that t1 is close to 5π/6.0472. rt<D. t1 ê. .005D 5 6 Out[6] €€€€€ Perform a numerical check. 1D.0472< . Pi<D Out[5] 8t1 → 2. In[6]: Rationalize@N@t1 ê PiD ê. rt.

choose the point P0 to be the origin and the circle C1 to have center (h1 .nb Circle–Point Midpoint Theorem Exploration y P0 x r1 C1 Show that the locus of midpoints from a fixed point P0 to a circle C1 of radius r1 . 0). Solution Construct the circle and the locus of points. show that the center point of the locus is the midpoint of the segment between P0 and the center of C1 . 599 . Construct the locus of midpoints and examine its form. Furthermore. is a circle of radius r1 /2. Approach Without loss of generality.cirptmid.

Discussion Here’s a function that computes the midpoint circle in the special position. p0. tD. l1 = Segment2D@p0. 0). r ê 2D.5 0 -0. which is the midpoint of the line segment from the point to the circle’s center.5 2 2. Point2D@C1@Pi ê 6DDD. 0<. In[3]: Map@Hp0 = Point2D@0. p1 = Point2D@C1@Pi ê 6DD. 0D. r1 −> 3<<D. In[2]: Circle2D@Circle2D@8h_. p1. Point2D@C1@tDDD 1 2 1 2 Out[1] Point2DA9 €€€€€ Hh1 + r1 Cos@tDL. Sketch2D@8C1. r1 −> 1<.nb In[1]: Clear@h1.5 1 1. 88h1 −> 2. €€€€€ r1 Sin@tD=E This locus is clearly a circle of radius r1 /2 centered at (h1 /2. 0<.5 3 3 2 1 0 -1 -2 -3 -1 0 1 2 3 4 5 . #DL&. p1D. r_DD := Circle2D@8h ê 2. C2 = Circle2D@C1D. r1D. 8h1 −> 2. 0D. r1. 1 0. P< ê. 0<. l1. pts = Point2D@Point2D@0.600 cirptmid. The first plot is a numerical example with the origin outside the circle (r1 = 1). while the second plot’s origin is inside the circle (r1 = 3). C1 = Circle2D@8h1. C2.5 -1 0 0. P = Point2D@p0.

cramer2.nb Cramer’s Rule (Two Equations) Exploration Show that the solution to the system of two linear equations in two unknowns a1 x + b 1 y + c 1 = 0 a 2 x + b 2 y + c2 = 0 is given by .

.

−c1 b1 .

.

−c2 b2 x= D where .

.

.

.

and y = .

.

a D = .

.

1 a2 .

.

a1 .

.

a2 .

−c1 .

.

−c2 .

D . .

b1 .

.

. b2 .

b2. b1<. Solution Compute the necessary determinants. −c2<<D. 8a2. Approach Use the Mathematica Det command to compute the appropriate determinants and then substitute the solutions back into the original equations to demonstrate that they solve the equations. In[1]: Clear@a1. 601 . c1. dD = Det@88a1. b2<<D. b1<. dx = Det@88−c1. −c1<. dy = Det@88a1. 8a2. b1. a2. 8−c2. b2<<D. c2D.

0< Discussion The Solve command produces the same result in Mathematica Version 3. In[4]: Solve@8a1 ∗ x + b1 ∗ y + c1 == 0. a2 ∗ x + b2 ∗ y + c2< ê. 8x.0. y<D êê Simplify −b2 c1 + b1 c2 −a2 b1 + a1 b2 a2 c1 − a1 c2 −a2 b1 + a1 b2 Out[4] 99x → €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ = Show that the solutions solve the original equations. Version 4. 8a1 ∗ x + b1 ∗ y + c1. y1< = 8dx ê dD. yD. a2 ∗ x + b2 ∗ y + c2 == 0<. In[2]: 8x1. 8x −> x1.0 computes a slightly different result that is algebraically equivalent.nb Compute the solutions.602 cramer2.1. y −> y1< êê Simplify Out[3] 80. y → €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == . dy ê dD< −b2 c1 + b1 c2 −a2 b1 + a1 b2 a2 c1 − a1 c2 −a2 b1 + a1 b2 Out[2] 9 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . In[3]: Clear@x.

cramer3.nb Cramer’s Rule (Three Equations) Exploration Show that the solution to the system of three linear equations in three unknowns a1 x + b1 y + c1 z + d1 = 0 a2 x + b2 y + c2 z + d2 = 0 a3 x + b3 y + c3 z + d3 = 0 is given by x= .

.

−d1 .

.

−d2 .

.

−d3 b1 b2 b3 D c1 c2 c3 .

.

.

.

.

.

.y= .

.

a1 .

.

a2 .

.

a3 −d1 −d2 −d3 D c1 c2 c3 .

.

.

.

.

.

and z = .

.

a1 .

.

a2 .

.

a3 b1 −d1 b2 −d2 b3 −d3 D .

.

.

.

.

.

where .

.

a1 .

D = .

.

a2 .

a3 b1 b2 b3 c1 c2 c3 .

.

.

.

. .

.

Solution Compute the necessary determinants. Approach Use the Mathematica Det command to compute the appropriate determinants and then substitute the solutions back into the original equations to demonstrate that they solve the equations. 603 .

c1<. 0< Discussion The Solve command produces the same result in Mathematica Version 3. dx = Det@88−d1. y1. . 8a2. 8a1 ∗ x + b1 ∗ y + c1 ∗ z + d1.nb In[1]: Clear@a1. b3. a2 ∗ x + b2 ∗ y + c2 ∗ z + d2 == 0.0. In[3]: Clear@x. −d1. b3. d2. c1<.1. −d1<. c2<. y. 8x −> x1. a3 ∗ x + b3 ∗ y + c3 ∗ z + d3< ê. 8x. 8−d2. 8a3. yD. d1. 8−d3. b1. a3. −d2<. 8a2.604 cramer3. In[4]: Clear@zD. 8a2.0 computes a slightly different expression that is algebraically equivalent. c1. d3D. c2<. dy ê dD. c1<. 0. z −> z1< êê Simplify Out[3] 80. −d2. b2. dz ê dD< b3 c2 d1 − b2 c3 d1 − b3 c1 d2 + b1 c3 d2 + b2 c1 d3 − b1 c2 d3 −a3 b2 c1 + a2 b3 c1 + a3 b1 c2 − a1 b3 c2 − a2 b1 c3 + a1 b2 c3 −a3 c2 d1 + a2 c3 d1 + a3 c1 d2 − a1 c3 d2 − a2 c1 d3 + a1 c2 d3 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . dD = Det@88a1. c2. −a3 b2 c1 + a2 b3 c1 + a3 b1 c2 − a1 b3 c2 − a2 b1 c3 + a1 b2 c3 a3 b2 d1 − a2 b3 d1 − a3 b1 d2 + a1 b3 d2 + a2 b1 d3 − a1 b2 d3 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ = −a3 b2 c1 + a2 b3 c1 + a3 b1 c2 − a1 b3 c2 − a2 b1 c3 + a1 b2 c3 Out[2] 9 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . b1. b1. c2<. y −> y1. In[2]: 8x1. Version 4. b3. c3<<D. b2. dy = Det@88a1. dz = Det@88a1. −d3<<D. b1. 8a3. z1< = 8dx ê dD. c3. −d3. 8a3. a3 ∗ x + b3 ∗ y + c3 ∗ z + d3 == 0<. a2 ∗ x + b2 ∗ y + c2 ∗ z + d2. z<D D b3 c2 d1 − b2 c3 d1 − b3 c1 d2 + b1 c3 d2 + b2 c1 d3 − b1 c2 d3 −a3 b2 c1 + a2 b3 c1 + a3 b1 c2 − a1 b3 c2 − a2 b1 c3 + a1 b2 c3 −a3 c2 d1 + a2 c3 d1 + a3 c1 d2 − a1 c3 d2 − a2 c1 d3 + a1 c2 d3 y → €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . Simplify@ Solve@8a1 ∗ x + b1 ∗ y + c1 ∗ z + d1 == 0. −a3 b2 c1 + a2 b3 c1 + a3 b1 c2 − a1 b3 c2 − a2 b1 c3 + a1 b2 c3 a3 b2 d1 − a2 b3 d1 − a3 b1 d2 + a1 b3 d2 + a2 b1 d3 − a1 b2 d3 z → €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == −a3 b2 c1 + a2 b3 c1 + a3 b1 c2 − a1 b3 c2 − a2 b1 c3 + a1 b2 c3 Out[4] 99x → €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . Compute the solutions. b2. a2. c3<<D. c3<<D. b2. b3. Show that the solutions solve the original equations.

deter. Show that the expanded algebraic form for the 2 × 2 determinant .nb Determinants Exploration Determinants often provide a concise notation for expressing relationships in analytic geometry.

.

.

a1 b 1 .

.

.

.

a2 b 2 .

Show that the expanded algebraic form . is given by −a2 b1 + a1 b2 .

.

.

.

.

.

for the 3 × 3 determinant .

a1 b1 c1 .

.

a2 b2 c2 .

.

a 3 b 3 c3 .

b2D. Approach Use the Mathematica Det command to compute the desired determinants. 8a2. a2. In[1]: Clear@a1. b2<<D Out[1] −a2 b1 + a1 b2 605 . b1<. is given by −a3 b2 c1 + a2 b3 c1 + a3 b1 c2 − a1 b3 c2 − a2 b1 c3 + a1 b2 c3 . b1. Solution The Det command produces the desired results directly. Det@88a1.

8a3. c2<. b2. c3<<D Out[2] −a3 b2 c1 + a2 b3 c1 + a3 b1 c2 − a1 b3 c2 − a2 b1 c3 + a1 b2 c3 . b1. b3. b1. a3. c3D. a2. c1. 8a2.606 deter. c1<.nb In[2]: Clear@a1. b2. b3. Det@88a1. c2.

b. a. True< 607 .elfocdir. Approach Construct the directrix and the pole of the focus and verify that they are the same lines. Line2DA− è!!!!!!!!!!!! ! a2 − b2 . −a2E= The lines in pairs are coincident. bD. 0. IsCoincident2D@dlns@@2DD. Line2DA1. 0D. e1D. In[1]: Clear@a. 0. e1 = Ellipse2D@80. 0<. − €€€€€€€€€€€€€€€€€€€€€€€€€ è!!!!!!!!!!!!! € E. Line2D@fpts@@2DD. −a2E. Solution Construct the required geometry. dlns = Directrices2D@e1D êê Simplify a2 a2 − b2 a2 a2 − b2 Out[1] 9Line2DA1. In[2]: lns = 8Line2D@fpts@@1DD. e1D< êê Simplify è!!!!!!!!!!!!! Out[2] 9Line2DA a2 − b2 .nb Focus of Ellipse is Pole of Directrix Exploration Show that the focus of an ellipse is the pole of the corresponding directrix. In[3]: 8IsCoincident2D@dlns@@1DD. 0. lns@@2DDD< Out[3] 8True. 0. fpts = Foci2D@e1D. €€€€€€€€€€€€€€€€€€€€€€€€€ è!!!!!!!!!!!!! € E= Construct the polars of the foci. lns@@1DDD.

nb Discussion This is a plot of a numerical example with a = 1. fpts.5 -2 -1 0 1 2 .5 and b = 1.5 -1 -1.5 1 0. CurveLength2D −> 3D.5. b −> 1<.5 0 -0. In[4]: Sketch2D@8e1. 8a −> 1.608 elfocdir. 1. dlns< ê.

yD. y −> y − e ê H2 cL< êê Expand d2 4a e2 4c Out[1] − €€€€€€€€€€ − €€€€€€€€€€ + f + a x2 + c y2 609 . x. a ∗ x ^ 2 + c ∗ y ^ 2 + d ∗ x + e ∗ y + f ê. Solution Apply the transformation rules to the equation. d.nb Eliminate Linear Terms Exploration Show that applying the change in variables x0 = x − d e and y 0 = y − 2a 2a to the quadratic equation ax2 + cy 2 + dx + ey + f = 0 yields the quadratic 2 2 ax0 + cy 0 − e2 d2 − +f =0 4a 4c whose linear terms have vanished.elimlin. e. c. In[1]: Clear@a. 8x −> x − d ê H2 aL. Approach Apply the transformation rules directly to the quadratic equation. f.

.

fD. Solution Create a quadratic.nb Eliminate Cross-Term by Rotation Exploration Show that by rotating a quadratic ax2 + bxy + cy 2 + dx + ey + f = 0 through an angle θ given by tan(2θ) = b c−a the xy term will vanish. b. Approach Create a quadratic and rotate it by an angle θ. Rotate the quadratic. Simplify the coefficient of the xy term.elimxy1. c. b. ArcTan@b ê Hc − aLD ê 2D. In[1]: Clear@a. In[3]: Q1@@2DD êê Simplify Out[3] 0 611 . c. Show that the coefficient of the xy term is zero. d. e. fD. e. Q = Quadratic2D@a. In[2]: Q1 = Rotate2D@Q. d.

.

elimxy2. 613 . where k= (c − a) + b s  c−a b 2 + 1. Approach Create a quadratic and form a quadratic equation.nb Eliminate Cross-Term by Change in Variables Exploration Show that applying the change in variables x0 = kx + y and y 0 = ky − x. to the equation ax2 + bxy + cy 2 + dx + ey + f = 0 will cause the xy term to vanish and a new quadratic with the following coefficients will be formed: a0 = ak 2 − bk + c b0 = 0 c0 = ck 2 + bk + a d0 = dk − e e0 = ek + d f 0 = f. Apply the change in variables and examine the coefficients.

a + b k + c k2. −b + 2 a k − 2 c k + b k2. In[2]: Clear@x. d + e k. fD The xy term is zero. 8x. b. k −> Hc − aL ê b + Sqrt@HHc − aL ê bL ^ 2 + 1D êê Simplify Out[4] 0 . 8x. c. −e + d k. d. eq1 = Equation2D@Q1. Q1 = Quadratic2D@a. kD. b. e. In[4]: Q2@@2DD ê. c. e.614 elimxy2. In[3]: Q2 = Quadratic2D@eq1. y<D Out[3] Quadratic2D@c − b k + a k2. fD. y −> k ∗ y − x< Out[2] f + d Hk x + yL + a Hk x + yL2 + e H−x + k yL + b Hk x + yL H−x + k yL + c H−x + k yL2 == 0 Examine the resulting coefficients. d. 8x −> k ∗ x + y. y<D ê.nb Solution Create a quadratic. y. Form the quadratic equation and apply the change in variables. fD. In[1]: Clear@a.

Solution Create a quadratic.elimxy3.nb Eliminate Cross-Term by Change in Variables Exploration Show that applying the change in variables x0 = kx + y and y 0 = ky − x. fD. e.nb. Compare the result to the result of elimxy2. In[1]: Clear@a. c. 615 . b. where k= (c − a) + b s c−a b 2 + 1. Q1 = Quadratic2D@a. e. fD. s= √ 1 + k2 Approach Create a quadratic and rotate and scale it as specified. to the equation ax2 + bxy + cy 2 + dx + ey + f = 0 is equivalent to rotating the quadratic by an angle θ given by tan θ = 1 k and scaling the quadratic by a scale factor 1 . b. c. d. d.

Q2 = Rotate2D@Q1. a + k Hb + c kL.nb. $%%%%%%%%%%%%% k2 k2 Simplify. f H1 + k2LE k2 Scale as specified. 1 $%%%%%%%%%%%%% 1 + €€€€€€€ € k Hd + e kL. In[5]: Q4 = Q3 ê. H1 + k2L Ha + k Hb + c kLL. Version 4.nb. 1 1 $%%%%%%%%%%%%% 1 + €€€€€€€ € k H−e + d kL. The results shown in the next few steps were computed using Mathematica Version 3.nb Rotate it by the specified angle. 0. f H1 + k2LE k2 k2 As shown in elimxy2. $%%%%%%%%%%%%% 1 + €€€€€€€ 2€ k H−e + d kL. a + k Hb + c kL. 2 Ha − cL k + b H−1 + k2L. f H1 + k2LE 1 + €€€€€€€ € k H−e + d kL 1 + k2 . ArcTan@1 ê kDD êê Simplify Out[2] Quadratic2DAc + k H−b + a kL. 8Sqrt@1 + k ^ H−2LD ∗ k −> Sqrt@1 + k ^ 2D< êê Simplify Out[5] Quadratic2D@c + k H−b + a kL. 1 ê Sqrt@1 + k ^ 2DD êê Simplify Out[4] Quadratic2DAH1 + k2L Hc + k H−b + a kLL.0. In[4]: Q3 = Scale2D@Q2. Both versions produce the same result in the final step. 1 1 è!!!!!!!!!!! è!!!!!!!!!!! $%%%%%%%%%%%%% 1 + €€€€€€€ € k Hd + e kL 1 + k2 . fD .616 elimxy3. 0. a + k Hb + c kL. Q2 1 k Out[3] Quadratic2DAc + k H−b + a kL. −e + d k.0 produces similar results except the coefficients are multiplied by a constant. showing the same result as elimxy2. $%%%%%%%%%%%%% 1 + €€€€€€€ € k Hd + e kL. In[2]: Clear@kD. d + e k. In[3]: Q2@@2DD = 0. 0. the xy term must vanish.1.

elldist. Sum of distances squared is a constant. 2 A1 B1 + 2 A2 B2. C12 + C22 − KD 617 . 2 A1 C1 + 2 A2 C2. In[2]: Clear@KD. Distance from Two Lines Exploration A point moves so that the sum of the squares of its distances from two intersecting straight lines is a constant. C2. In[3]: Q1 = Quadratic2D@eq1. l1D ^ 2 + Distance2D@pt. B2. 2 B1 C1 + 2 B2 C2. y) to the lines and show that the equation must be an ellipse. B2. 8x. C2D. B1. yD. B1. l1 = Line2D@A1.nb Ellipse Locus. A2. yD. Solution Create the two lines and a generic point. 8A1 ^ 2 + B1 ^ 2 −> 1. In[1]: Clear@A1. B12 + B22. Approach Compute the distances from a generic point (x. l2 = Line2D@A2. pt = Point2D@x. assume the lines are normalized). C1D. A2 ^ 2 + B2 ^ 2 −> 1< Out[3] Quadratic2D@A12 + A22. y<D ê. C1. eq1 = Distance2D@pt. Prove that its locus is an ellipse. l2D ^ 2 − K HC1 + A1 x + B1 yL2 A1 + B1 HC2 + A2 x + B2 yL2 A2 + B2 Out[2] −K + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ 2 2 2 2 Form the quadratic equation (without loss of generality. K. x.

B 2 − 4AC. B 2 − 4AC.5. B1 −> 1. therefore. #L&. CurveLength2D −> 5D. In[4]: disc = Q1@@2DD ^ 2 − 4 ∗ Q1@@1DD ∗ Q1@@3DD êê Simplify Out[4] −4 HA2 B1 − A1 B2L2 The discriminant of the quadratic.5 1 0. l2. is negative.5. 1. C2 −> −1<. K −> 3. K −> 6<D< ê. A2 −> −0. Discussion This is a plot of a numerical example using three different values of K. 8 A1 −> 1. 8K −> 2.5 -2 -1 0 1 2 . the curve is an ellipse. In[5]: Sketch2D@8l1.5 0 -0.nb Compute the discriminant of the quadratic.5. Map@HQ1 ê. B2 −> 2. C1 −> −1. 2 Note that the expression (A2 B1 − A1 B2 ) cannot be zero if the lines intersect.618 elldist.

0 < e < 1. q)). 0D. theta êê Simplify q p Out[1] ArcTanA €€€€€ E 619 .nb Ellipse from Focus and Directrix Exploration Show that the ellipse with focus F (x1 . h = x1 + a=d where s d= e (1 − e2 ) px1 + qy1 + r (px1 + qy1 + r)2 and D = . b = a 1 − e2 . 0D. q] is ArcTan[q/p]. rD. In[1]: Clear@p. 2 2 p +q p2 + q 2 Approach Apply the definition of an ellipse to the supplied focus and directrix for a general point (x. y1 ). L = Line2D@p.ellfd. θ = tan−1 (p. Solution The rotation angle of the ellipse is the angle the line perpendicular to L makes with the +x-axis (in Mathematica ArcTan[p. d d p . q. Line2D@Point2D@0. 1. is defined by the constants paeD qaeD . theta = Angle2D@Line2D@0. directrix line L ≡ px + qy + r = 0 and eccentricity. q. y) and show that the derived locus is an ellipse. the first form takes into account the quadrant of the point (p. rD. q). LDD. k = y1 + .

1. Solving for a gives the following result in Mathematica Version 3. In standard position the distance from the focus of an ellipse to its directrix is given by d = a/e − ae. 9b → a 1 − e2 == The eccentricity is the ratio of the distance from a general point to the focus to the distance to the directrix.620 ellfd. k1< = Coordinates2D@ Point2D@ Q1 = Quadratic2D@eq1. In[4]: Clear@x1. 8x. In[6]: 8h1. eD. − €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ Out[6] 9 €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €= 2 2 2 2 2 2 Find the coordinates of the center using the formula provided. aD êê Simplify de 1−e Out[2] 99a → €€€€€€€€€€€€€€€€ 2€ == Also. Solve@d == a ê e − a ∗ e. yD. the eccentricity is given by e = result). y<D êê SimplifyDD êê Simplify −Hp2 + q2L x1 + e2 Hq2 x1 − p Hr + q y1LL H−1 + e L Hp + q L Hp2 + q2L y1 + e2 Hq Hr + p x1L − p2 y1L H−1 + e L Hp + q L . dL = Distance2D@P. yD.0 produces a slightly different result that is algebraically equivalent. Version 4. a. x. In[5]: eq1 = e ^ 2 ∗ dL ^ 2 − dF ^ 2 êê Expand êê Together 1 p +q 2 e2 q r y + 2 e2 p q x y − p2 y2 − q2 y2 + e2 q2 y2 + 2 p2 y y1 + 2 q2 y y1 − p2 y12 − q2 y12L 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 Out[5] €€€€€€€€€€€€€€€€€€€ 2 2€ He r + 2 e p r x − p x + e p x − q x + 2 p x x1 + 2 q x x1 − p x1 − q x1 + Find the coordinates (h1 . . In[2]: Clear@d. y1. F = Point2D@x1. FD. bD Out[3] 99b → −a è!!!!!!!!!!!2 è!!!!!!!!!!! 1 − e =.nb Now we must show that the lengths a and b are given by the formulas. $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ = p2 + q2 Out[4] 9 Form the equation for the eccentricity squared. P = Point2D@x. p a2 − b2 /a and solving for b gives (take the positive In[3]: Solve@e == Sqrt@a ^ 2 − b ^ 2D ê a.0. LD< Hr + p x + q yL2 "###################################### Hx − x1L2 + Hy − y1L2 . y1D. k1 ) of the center of the quadratic. 8dF = Distance2D@P.

ellipse1<. eccentricity1D 116 623 61 623 114 89 57 623 8 5 Out[9] Ellipse2DA9− €€€€€€€€€€€€ . €€€€€€€€€€€€€€€€€€€ è!!!!! . ellipse1 = Ellipse2D@focus1. 3 2 1 0 -1 -1 0 1 2 3 . k2< = 8x1 + p ∗ a ∗ e ∗ D1 ê d. directrix and eccentricity. 1<D. €€€€€€€€€€€€€€€€€€€€€€ è!!!!!!!! € . ArcTanA €€€€€ EE 7 2 In[10]: Sketch2D@8focus1. D1 −> Hp ∗ x1 + q ∗ y1 + rL ê Hp ^ 2 + q ^ 2L< e2 p Hr + p x1 + q y1L H1 − e L Hp + q L e2 q Hr + p x1 + q y1L H1 − e L Hp + q L Out[7] 9x1 + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ € . CurveLength2D −> 5D. −20D. b −> a ∗ Sqrt@1 − e ^ 2D. y1 + q ∗ a ∗ e ∗ D1 ê d< êê. d −> Sqrt@Hp ∗ x1 + q ∗ y1 + rL ^ 2 ê Hp ^ 2 + q ^ 2LD.ellfd. directrix1 = Line2D@5. 8a −> d ∗ e ê H1 − e ^ 2L. 0< Discussion An example showing the construction of an ellipse from its focus. 8. directrix1. eccentricity1 = 3 ê 4. y1 + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €= 2 2 2 2 2 2 This shows that the center indeed has the same coordinates as the point from the formula. In[9]: focus1 = Point2D@81 ê 2. 8h2. In[8]: 8h1 − h2.nb 621 In[7]: Clear@D1D. directrix1. k1 − k2< êê Simplify Out[8] 80. − €€€€€€€€€€€€ =.

.

b. Construct the two foci of the ellipse. f2D è!!!!!!!!!!!!! è!!!!!!!!!!!!! Out[3] $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I a2 − b2 + a Cos@tDM + b2 Sin@tD2 I− a2 − b2 + a Cos@tDM + b2 Sin@tD2 + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 2 623 . 0D. In[2]: 8f1. a. In[3]: sum1 = Distance2D@p1. In[1]: Clear@a. f1D + Distance2D@p1. Solution Create the ellipse and a generic point on it. Approach Construct a generic point on an ellipse. p1 = Point2D@e1@tDD Out[1] Point2D@8a Cos@tD.nb Sum of Focal Distances of an Ellipse Exploration Show that the sum of the distances from the two foci to any point on an ellipse is 2a. 0=E. Show that the sum of the distances is 2a. f2< = Foci2D@e1D è!!!!!!!!!!!!! Out[2] 9Point2DA9 a2 − b2 .ellips2a. 0<. b Sin@tD<D Construct the focus points of the ellipse. e1 = Ellipse2D@80. tD. where a is the length of the semi-major axis. b. Point2DA9− è!!!!!!!!!!!! ! a2 − b2 . Find the distance from each focus to the generic point. 0=E= Find the sum of the distances from the generic point to the foci.

è!!!!!!!!!!!! ! a + 2 a a2 − b2 Cos@tD + a2 Cos@tD2 − b2 Cos@tD2= Out[4] 9a − 2 a 2 2 This shows that both expressions factor into perfect squares. sum1@@2. In[5]: 8He3 = Ha − Sqrt@a ^ 2 − b ^ 2D ∗ Cos@tDL ^ 2L − e1. He4 = Ha + Sqrt@a ^ 2 − b ^ 2D ∗ Cos@tDL ^ 2L − e2< êê Expand Out[5] 80. e2< = Map@Expand@# ê. sum2 ê. In[7]: Clear@E1D. 1DD<D è!!!!!!!!!!!! ! a2 − b2 Cos@tD + a2 Cos@tD2 − b2 Cos@tD2. 8sum1@@1. 0< Replace the expressions under the radicals with the equivalent perfect square expressions.nb Work on the expressions under the radicals.624 ellips2a. 1DD. In[6]: sum2 = Sqrt@e3D + Sqrt@e4D è!!!!!!!!!!!!! è!!!!!!!!!!!!! Out[6] $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Ia + a2 − b2 Cos@tDM Ia − a2 − b2 Cos@tDM + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 2 Since a > b > 0. Sin@tD ^ 2 −> 1 − Cos@tD ^ 2D&. In[4]: 8e1. both expressions are clearly the square root of a squared positive number. Sqrt@E1_ ^ 2D −> E1 Out[7] 2 a . which simply reduces to the positive number itself.

625 . Construct one of the focal points. Approach Construct an ellipse in standard position. In[2]: fpt = First@Foci2D@e1DD "################# a12 − b12 . In[1]: Clear@a1. e1 = Ellipse2D@80. − "################# a12 − b12 E Intersect the line with the ellipse. a1. b1D.elllen. InfinityD Out[3] Line2DA1. 0=E Out[2] Point2DA9 Construct a line perpendicular to the x-axis through the focus. In[3]: fln = Line2D@fpt. 0D. where a is the length of the semi-major axis and b is the length of the semi-minor axis. 0. b1. Construct a line perpendicular to the axis of the ellipse through one of the focal points (the line containing the focal chord). Solution Create the ellipse.nb Length of Ellipse Focal Chord Exploration Prove that the length of the focal chord of an ellipse is 2b2 /a. Compute the distance between the points of intersection of the ellipse and the line. 0<.

Point2DA9 a12 − b12 .nb In[4]: pts = Points2D@fln. 8Sqrt@b1 ^ 4 ê a1 ^ 2D −> b1 ^ 2 ê a1< 2 b12 a1 Out[6] €€€€€€€€€€€€€€€€ . In[5]: d = Distance2D@Sequence @@ ptsD b14 a1 Out[5] 2 $%%%%%%%%% €€€€€€€€€€€ 2 Notice that since a > 0 and b > 0 the solution reduces to 2b2 /a. − €€€€€€€€€€€ =E. €€€€€€€€€€€ =E= a1 a1 Out[4] 9Point2DA9 The length of the focal chord is the distance between the intersection points.626 elllen. In[6]: d ê. e1D 2 b12 "################# "################# b1 a12 − b12 .

a2 − b2 = ea. Approach Create a standard ellipse centered at the origin and create an expression representing the distance from a focus point to a point on the ellipse (in terms of the eccentricity and semimajor axis). respectively. pt = Point2D@e1@tDD Out[2] Point2D@8a Cos@tD. b Sin@tD<D Solve for b in terms of a and e. Find the focus points In[1]: Clear@a. b.nb Apoapsis and Periapsis of an Ellipse Exploration Show that the greatest. b. 0<D. therefore. e1 = Ellipse2D@80. apoapsis. Solution The eccentricity is given by e = and use this substitution. Find the parameter value on the ellipse where the distance is a minimum or a maximum. radial distance of a point on an ellipse as measured from a focus point is given by r = a(1 + e) and r = a(1 − e). where e is the eccentricity and a is the length of the semi-major axis of the ellipse. where b > 0.ellrad. 0D. 0<. Sqrt@a ^ 2 − b ^ 2D −> a ∗ e Out[1] 8Point2D@8a e. eD. fpts1 = Foci2D@e1D ê. 0<D< Find a general point on the ellipse in terms parameter t. p p a2 − b2 /a. periapsis. Point2D@8−a e. In[2]: Clear@tD. a. and least. 627 .

Sqrt@a ^ 2 ∗ E1_ ^ 2D −> a ∗ H−E1L êê Factor Out[6] 8a H1 + eL. from the point to the focus. In[4]: d = Distance2D@fpts1@@1DD. or θ = π.nb In[3]: ans = Solve@Sqrt@a ^ 2 − b ^ 2D ê a == e. periapsis< ê. ans@@2DD êê Simplify Out[4] "##################################### a2 H−1 + e Cos@tDL2 The maximum value of d occurs when cos(θ) = −1. −a H−1 + eL< . Cos@tD −> 1<D "###################### # "####################### a2 H−1 − eL2 . #L&. the minimum value of d occurs when cos(θ) = 1. 8Cos@tD −> −1. ptD ê. 8apoapsis. bD Out[3] 99b → −a è!!!!!!!!!!!2 è!!!!!!!!!!! 1 − e =. 9b → a 1 − e2 == Determine the distance. or θ = 0. d. In[5]: 8apoapsis. periapsis< = Map@Hd ê. In[6]: Clear@E1D.628 ellrad. a2 H−1 + eL2 = Out[5] 9 Since e < 1. the sign must be reversed outside the radical.

0D<. Ellipse2D@8Point2D@−a2. 0D<. 0<. Sqrt@a_ ^ 2D −> a Out[1] 9Ellipse2DA80. Point2D@a1. E2< = 8Ellipse2D@8Point2D@−a1. Solution Construct the two ellipses by vertex points. a2 "#############2 1 − e1 . e1D. 0DE. 8E1. a2D. 0D.nb Similar Ellipses Exploration All ellipses of equal eccentricity are essentially similar in that by a proper choice of scales (and axes) they can be made to coincide.ellsim. a. a2. 0<. ArcTan@2 a1. 0<. 0D. 0DE 629 . a1. a2. Approach Construct two ellipses with equal eccentricity. a1. a2 ê a1D Out[2] Ellipse2DA80. a1 Ellipse2DA80. Show that one can be scaled to coincide with the other. "#############2 1 − e1 . 0DE= Scale the first to coincide with the second In[2]: Scale2D@E1. ArcTan@2 a1. Point2D@a2. e1D< ê. a2 "#############2 1 − e1 . ArcTan@2 a2. Show this property is true for two ellipses of equal eccentricity centered at the origin. In[1]: Clear@e1.

E2< ê.630 ellsim.5 0 -0. 8a1 −> 1.75<D.5 -1 -2 -1 0 1 2 . In[3]: Sketch2D@8E1. a2 −> 2.nb Discussion This is a plot of a pair of similar ellipses. e1 −> . 1 0.

b2 + a2 m2 E= Show the lines in equation form. y. 0<. tln = TangentLines2D@l1. −1. In[2]: Clear@a. b2 + a2 m2 + m x − y == 0= 631 . b. yD. quad] to construct the desired tangent lines.ellslp. −1. Approach Construct a line with slope m and use the function TangentLines2D[ln. a. bD. In[1]: Clear@x. −m x + yD Construct the lines tangent to the ellipse and parallel to the line. tlnD Out[3] 9− è!!!!!!!!!!!!!!!!! ! è!!!!!!!!!!!!!!!!!! b2 + a2 m2 + m x − y == 0. mD Out[1] Line2D@m. − è!!!!!!!!!!!!!!!!! ! è!!!!!!!!!!!!!!!!!! b2 + a2 m2 E. Solution Construct a line with slope m. In[3]: Map@Equation2D@#. −1. 8x. e1 = Ellipse2D@80. l1 = Line2D@Point2D@x. mD. y<D&. Line2DAm.nb Tangent to an Ellipse with Slope Exploration Show thatpthe lines tangent to the ellipse x2 /a2 + y 2 /b2 = 1 with slope m are given by y = mx ± a2 m2 + b2 . 0DD Out[2] 9Line2DAm.

In[4]: Sketch2D@8tln. 3 2 1 0 -1 -2 -3 -4 -2 0 2 4 .632 ellslp.nb Discussion Plot a numerical example. a −> 2. 8m −> 1 ê 2. b −> 1<D. e1< ê.

yA. A1 = Point2D@xA. y) such that 4AP B. P = Point2D@x. yBD. The coordinates of Pn are given by P0 ((xA + xB + xC ) /3. x. xC. yD. Approach Construct the geometry and solve a system of equations that equates the areas of the three triangles. B(xB . In[1]: Clear@xA. Compute the areas of the triangles. 4ABC connects the midpoints of the sides of 4P 1 P2 P3 .eqarea. yAD. +yA − yB + yC ) P3 (+xA + xB − xC . 633 . yD. 4AP C and 4BP C have equal areas. yB ) and C(xC . Compare the centroid and midpoints as specified. xB ). C1 = Point2D@xC.nb Equal Areas Point Exploration Given 4ABC with vertices A(xA . yC. yC ) show that there are four positions of a point Pn (x. B1 = Point2D@xB. yCD. (yA + yB + yC ) /3) P1 (−xA + xB + xC . xB. P0 is the centroid of 4ABC and 4P 1 P2 P3 . +yA + yB − yC ). yB. −yA + yB + yC ) P2 (+xA − xB + xC . Solution Create the points.

C1DD. y → yA + yB − yC<. Centroid2DD 1 3 1 3 Out[7] Point2DA9 €€€€€ HxA + xB + xCL. a3 = Area2D@Triangle2D@B1. P2. Point2D@8xA + xB − xC. yA<D< . yA + yB − yC<D= Out[5] 9Point2DA9 €€€€€ HxA + xB + xCL. yB<D. 8P0. P3D. Squaring is required because the area calculation may produce a symbolically negative number for the area. In[3]: 8eq1 = a1 ^ 2 == a2 ^ 2. a2 = Area2D@Triangle2D@A1. yD ê. Point2D@8xB. Form equations by equating the areas (squared). P1. P. yA − yB + yC<D. 8x. P2D. In[4]: ans = Solve@8eq1. €€€€€ HyA + yB + yCL=E Show that 4ABC connects the midpoints of the sides of 4P 1 P2 P3 . In[6]: Point2D@Triangle2D@A1. yC<D. eq2 = a2 ^ 2 == a3 ^ 2< 1 4 1 €€€€€ HxA y − xC y − x yA + xC yA + x yC − xA yCL2. B1. ansD. y → yA − yB + yC<. P2. −yA + yB + yC<D. P. In[8]: 8Point2D@P1. P3D. B1DD. P. Point2D@8xA − xB + xC. P0< = Map@HPoint2D@x. €€€€€ HyA + yB + yCL=E. P3D< Out[8] 8Point2D@8xC. C1DD. y → −yA + yB + yC<. #L&. 1 1 8x → −xA + xB + xC. P1. 4 1 €€€€€ HxA y − xC y − x yA + xC yA + x yC − xA yCL2 == 4 1 €€€€€ HxB y − xC y − x yB + xC yB + x yC − xB yCL2= 4 Out[3] 9 €€€€€ HxA y − xB y − x yA + xB yA + x yB − xA yBL2 == Solve the system of equations. 8x → xA − xB + xC. Show that P0 is the centroid of 4ABC and 4P 1 P2 P3 .nb In[2]: a1 = Area2D@Triangle2D@A1. P2. Point2D@P2. y<D Out[4] 98x → xA + xB − xC. 9x → €€€€€ HxA + xB + xCL. y → €€€€€ HyA + yB + yCL== 3 3 Construct points at the solutions. In[5]: 8P3. Point2D@8xA. Centroid2DD 1 3 1 3 Out[6] Point2DA9 €€€€€ HxA + xB + xCL. P3< 1 1 3 3 Point2D@8−xA + xB + xC. eq2<.634 eqarea. €€€€€ HyA + yB + yCL=E In[7]: Point2D@Triangle2D@P1. C1D. Point2D@P1.

P1. P2. B1. P3D.nb 635 Discussion This is a plot of a numerical example. P3< ê. yC −> 3<D. 4 2 0 -2 -4 -2 0 2 4 . Triangle2D@P1. In[9]: Sketch2D@8Triangle2D@A1. yB −> 0. P2. C1D. xB −> 3.eqarea. yA −> −1. 8xA −> −1. xC −> 1. P0.

.

Solution Without loss of generality. Approach Construct the chords and compare their lengths. Position them at the origin and along the positive x-axis.nb Eyeball Theorem Exploration y r1 r2 x d The tangents to each of two circles from the center of the other are drawn as shown in the figure.eyeball. Prove that the chords illustrated are equal in length. scale the circles so that the distance between the centers is 1. 637 .

0D.638 eyeball. pt2 = TangentPoints2D@Point2D@c2D. 1 0. r1 r2< Discussion This is a plot of a numerical example.25 0 -0.nb In[1]: Clear@r1. 0<. c1D.75 0 0. pt2< ê. c2D. 2<. example. pt1. pt1@@1DDD. r2 −> 0. Show that (half) the heights of the segments are equal In[3]: sin1 = YCoordinate2D@pt1@@1DDD ê Distance2D@Point2D@0. r2D.5 2 . l21.5 0. 1<<D. r2D. c1D.5 1 1. l12 = TangentLines2D@Point2D@c1D. 8h1 = Simplify@r1 ∗ sin1D.25 -0. l21 = TangentLines2D@Point2D@c2D. In[4]: example = 8r1 −> 0. c2D. h2 = Simplify@r2 ∗ sin2D< Out[3] 8r1 r2. c2. Compute the tangent points. 0<.5 -0. pt2@@2DDD. 0D. c2 = Circle2D@81. c1 = Circle2D@80. 8−1.375<. r1D. PlotRange −> 88−1 ê 2.25. Sketch2D@ 8c1. sin2 = YCoordinate2D@pt2@@2DDD ê Distance2D@Point2D@1. In[2]: pt1 = TangentPoints2D@Point2D@c1D.75 0. l12.

P3D. Show that lines P1 Q23 . In[3]: 8L12 = Line2D@P1. Line2D@0. 0D. Solution Without loss of generality. L23 = Line2D@P2.gergonne. P2 = Point2D@a.nb Gergonne Point of a Triangle Exploration Let Q12 . The point of concurrency is called the Gergonne Point of the triangle after J. respectively. 0D. Construct the lines through the sides of the triangle. bD. Construct the tangency points and the prescribed lines. L13 and L23 . L13 = Line2D@P1. Approach Create the triangle in a simplified position and construct the inscribed circle. bD. P3D. Show that the lines are concurrent. P1 = Point2D@0. 1 − a. T1 = Triangle2D@P1. Inscribed2DD êê FullSimplify. founder-editor of the mathematics journal Annales de Mathematiques. Q13 and Q23 be the points of contact of the inscribed circle of 4P 1 P2 P3 with sides L12 . P2.D. Line2D@b. In[2]: C1 = Circle2D@T1. a. P3D< Out[3] 8Line2D@−b. 0D. P3 = Point2D@1. Gergonne (1771–1859). 1. P2 Q13 and P3 Q12 are concurrent. P2D. −bD< 639 . 0D. Construct the circle inscribed in the triangle. In[1]: Clear@a. create the triangle’s vertex points and the triangle itself in a convenient position.

b −> 1<.6 0. 8−0. Q12.25. Point2D@L1. 8Point2D@L12. Q23D.2 . L2. T1. List @@ L3<D êê FullSimplify Out[6] 0 Discussion This plots a numerical example with specific points.2 -0. P3.8 1 1.25. In[7]: Sketch2D@8P1. C1.6 0. PlotRange −> 88−0. C1D. In[6]: Det@8List @@ L1. L2D< êê. Line2D@P2. 1.25<.4 0. 8a −> 2 ê 3. Q23< = Map@FullSimplify. List @@ L2. In[5]: 8L1. Q13.4 0. In[4]: 8Q12. 8Line2D@P1. L2. Q13D. C1D. Construct the lines defining the Gergonne point. Q12D<D. 1. Point2D@L23. L3< = Map@FullSimplify. The three lines are concurrent if the determinant of their coefficients is zero.2 0 0. Line2D@P3. L3. C1D<D.nb Construct tangency points which are the poles of the sides with respect to the inscribed circle. P2.640 gergonne.25<<D.8 0.2 0.2 0 -0. 1. L1.2 1 0. Q23. Point2D@L13. Q13.

E1D.heron. sinAD êê Last 1 2 2 a2 b 2 a2 c a4 b c b2 c c2 b Out[2] 9sinA → €€€€€ $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 + €€€€€€€€€€€€ 2 € + €€€€€€€€€€€€ 2 € − €€€€€€€€€€€€€€€ 2 2 − €€€€€€€ 2€ − €€€€€€€ 2€ = 641 . c. cosAD êê Simplify −a2 + b2 + c2 2bc Out[1] 99cosA → €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == Find an expression for the sin A using the previous expression for cos A. cA = Solve@a ^ 2 == b ^ 2 + c ^ 2 − 2 ∗ b ∗ c ∗ cosA. cosA. cA. of a 4ABC is given by p K = s(s − a) (s − b) (s − c) where the semi-perimeter s = (a + b + c) /2 and a. K. In[1]: Clear@a. b and c. K. Using the identity (sin A) = 1 − (cos A) the area can be computed using K = (1/2) bc sin A. Use the positive result. Simplify the resulting expression for the area. s. b. to Heron’s formula. Solution Find an expression for the cos A using the Law of Cosines. derive an expression for cos A (the cosine of the angle 2 2 at vertex A of the triangle) using the Law of Cosines.nb Heron’s Formula Exploration Show that the area. sinA. Approach In a 4ABC with side lengths a. In[2]: sA = Solve@HsinA ^ 2 + cosA ^ 2 == 1L ê. b and c are the lengths of the sides.

Version 4.1. −a − c −> −H2 ∗ s − bL< êê FullSimplify Out[6] è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! s H−a + sL H−b + sL H−c + sL . In[3]: K1 = b ∗ c ∗ sinA ê 2 ê. Sqrt@E1_D :> Sqrt@Factor@E1DD 1 4 H−a + b − cL Ha + b − cL H−a + b + cL Ha + b + cL b c Out[4] €€€€€ b c $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% − €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ 2 2 In[5]: K3 = K2 ê. sA êê FullSimplify 1 4 H−a + b − cL Ha + b − cL H−a + b + cL Ha + b + cL b c Out[3] €€€€€ b c $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% − €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ 2 2 Simplify to Heron’s formula. b + c −> 2 ∗ s − a. 8a + b −> 2 ∗ s − c. In[4]: K2 = K1 ê. The following steps were computed using Mathematica Version 3.642 heron.0 produces slightly different results that are algebraically equivalent.0.nb Compute the area of the triangle from one-half the product of the base and height. Sqrt@−E1_ ê Hb ^ 2 ∗ c ^ 2LD :> Sqrt@−E1D ê Hb ∗ cL 1 è!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! −H−a + b − cL Ha + b − cL H−a + b + cL Ha + b + cL 4 Out[5] €€€€€ In[6]: K4 = K3 êê.

b ∗ Sinh@tDD Out[1] Point2D@8a Cosh@tD. b. f2< = Foci2D@h1D è!!!!!!!!!!!!! Out[2] 9Point2DA9 a2 + b2 . p1 = Point2D@a ∗ Cosh@tD. Solution Create the hyperbola and a generic point on it. Show that the difference of the distances is 2a. In[3]: diff1 = Distance2D@p1.nb Focal Distances of a Hyperbola Exploration Show that the difference of the distances from the two foci to any point on a hyperbola is 2a. In[1]: Clear@a. Point2DA9− è!!!!!!!!!!!! ! a2 + b2 . where a is the length of the semi-transverse axis. b. 0=E= Compute the difference of the distances from the generic point to the foci.hyp2a. 0D. f2D − Distance2D@p1. a. tD. h1 = Hyperbola2D@80. f1D è!!!!!!!!!!!!! è!!!!!!!!!!!!! 2 2 Out[3] − $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I− a2 + b2 + a Cosh@tDM + b2 Sinh@tD2% + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I a2 + b2 + a Cosh@tDM + b2 Sinh@tD2 643 . 0=E. Find the distance from each focus to the generic point. b Sinh@tD<D Create the focus points of the hyperbola. Construct the two foci of the hyperbola. 0<. Approach Construct a generic point on a hyperbola. In[2]: 8f1.

In[5]: 8He3 = Ha − Sqrt@a ^ 2 + b ^ 2D ∗ Cosh@tDL ^ 2L − e1. 8−Sqrt@E1_ ^ 2D + Sqrt@E2_ ^ 2D −> −H−E1L + E2< Out[7] 2 a . 2. Sinh@tD ^ 2 −> Cosh@tD ^ 2 − 1D&. In[7]: Clear@E1. E2D. In[4]: 8e1. b > 0 and cosh(θ) ≥ 1 the expression under the radicals are reduced as follows. diff1@@2. 1DD. 0< Replace the expressions under the radicals with the equivalent perfect square expressions.644 hyp2a. In[6]: diff2 = −Sqrt@e3D + Sqrt@e4D è!!!!!!!!!!!!! 2 è!!!!!!!!!!!!! 2 Out[6] − $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Ia − a2 + b2 Cosh@tDM + $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Ia + a2 + b2 Cosh@tDM Since a > 0.nb Work on the expressions under the radicals. e2< = Map@Expand@# ê. diff2 ê. è!!!!!!!!!!!! ! a + 2 a a2 + b2 Cosh@tD + a2 Cosh@tD2 + b2 Cosh@tD2= Out[4] 9a − 2 a 2 2 This shows that both expressions factor into perfect squares. 1DD<D è!!!!!!!!!!!! ! a2 + b2 Cosh@tD + a2 Cosh@tD2 + b2 Cosh@tD2. 8diff1@@1. He4 = Ha + Sqrt@a ^ 2 + b ^ 2D ∗ Cosh@tDL ^ 2L − e2< êê Expand Out[5] 80.

b. c<. if the quadratic represents an equilateral hyperbola. b. Map@HQ1 ê. Solution This is a function that implements the approach. parameterized by the variable k. a and c. p4. y2_<D. k. #L&. y3_<D. p3 : Point2D@8x3_. 3D. Pencil2DD. Discussion Here’s the plot of the solution for the four points specified. 1). In[1]: Quadratic2D@p1 : Point2D@8x1_. y1_<D. 1). −1) and (4. Approach Form a quadratic. representing the pencil of quadratics passing through the four points. kD. a.hyp4pts. p4 : Point2D@8x4_. −3) by plotting the hyperbola(s) and the four points. 645 . p3. must satisfy the relationship a = −c. (−2. c< = List @@ Take@Q1. (−1. y4_<D.nb Equilateral Hyperbolas Exploration Describe a method for finding the equilateral hyperbola(s) passing through four points. Q1 = Quadratic2D@p1. ans = Solve@a == −c. ansD D. 8a. p2 : Point2D@8x2_. Hyperbola2DD := Module@8Q1. The first and third coefficients of the quadratic. Show that the technique produces the correct results for the points (2. p2. k. Solve the equation for k.

CurveLength2D −> 20D..5 5 7.5 . 3.46192. −3<D<.646 hyp4pts.461538. p3 = Point2D@8−2. 1<D. q1 = Quadratic2D@p1. −18. −1<D.5 -5 -2. 1<D... hyp1<. 1. 1. p4 = Point2D@84.692308<. 4 2 0 -2 -7. p2 = Point2D@8−1. 0. −60.D< In[3]: hyp1 = Map@Loci2D. Hyperbola2DD êê N Out[2] 8Quadratic2D@24.nb In[2]: pts = 8p1 = Point2D@82.07942D<< In[4]: Sketch2D@8pts.5 0 2..46192.. −6. 36. p2. −24. p3. q1D Out[3] 88Hyperbola2D@80. p4.

use calculus to verify that the areas between two parameters t1 and t2 of a segment and a sector of a hyperbola are given by 647 .nb Areas Related to Hyperbolas Exploration y P2 O x P1 y P2 O x P1 Referring to the figures.hyparea.

This is found by intersecting a horizontal line through the point on the hyperbola with the line between P1 and P2 . y. 8x2. This step and the one immediately following show the results computed by Mathematica Version 3. Integrate (x2 − x1 ) dx from y1 to y2 to find the area of the segment. y2<D. Approach Find the coordinates of x1 and x2 . y1 ) and (x2 . In[1]: Clear@x. y2D. a. y2 ) .648 hyparea. y1<. yD. Line2D@Point2D@x.0.nb ab (sinh(s(t2 − t1 )) − s(t2 − t1 )) Asegment = 2 abs (t2 − t1 ) Asector = 2 where a and b are the lengths of the semi-transverse and semi-conjugate axes. Version 4. Find the area of the 4OP1 P2 from its vertex points. Solution The x-coordinate of a point on the hyperbola (found by solving x2 /a2 − y 2 /b2 = 1 for x) in terms of the y-coordinate. s = cosh−1 (e) and e is the eccentricity of the hyperbola (assuming the parameterization Descarta2D uses for a hyperbola). y1. respectively. In[3]: L = X2 − X1 êê FullSimplify y2 b x2 H−y + y1L + x1 Hy − y2L y1 − y2 Out[3] −a $%%%%%%%%%%%%% 1 + €€€€€€€ 2€ + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ . 0DDD êê FullSimplify x2 H−y + y1L + x1 Hy − y2L y1 − y2 Out[2] €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ L is the length of the horizontal line segment between the hyperbola and the line through P1 and P2 .0 produces slightly different results that are algebraically equivalent.1. X2 = XCoordinate2D@ Point2D@Line2D@8x1. bD. X1 = a ∗ Sqrt@1 + y ^ 2 ê b ^ 2D y2 b Out[1] a $%%%%%%%%%%%%% 1 + €€€€€€€ 2€ The x-coordinate of a point on a line between (x1 . x2. In[2]: Clear@x1. Subtract the area of the segment from the area of the triangle to find the area of the sector. the coordinates of the ends of the infinitesimal rectangle.

P = H1@tD ê.nb 649 Find the indefinite integral L 4 y. A3 = A2 êê. 8 x1 −> HP@@1DD x2 −> HP@@1DD y1 −> HP@@2DD y2 −> HP@@2DD 1 2 ê. In[9]: Clear@t1. ArcCosh@Sqrt@a ^ 2 + b ^ 2D ê aD −> s Out[8] 8a Cosh@s tD. b Sinh@s tD< Simplify. ê. yD êê FullSimplify y y y J−x2 y + 2 x2 y1 + x1 Hy − 2 y2L + a "############ 1 + €€€€€€ H−y1 + y2LN + a b H−y1 + y2L ArcSinh@ €€€€ D b2 b 2 Out[4] €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ 2 Hy1 − y2L Find the area of the hyperbolic segment between the chord and the hyperbola by evaluating the integral at the vertical limits. which represents an infinitesimal rectangular area.hyparea. In[5]: A1 = HI1 ê. t −> t2L< êê FullSimplify Out[9] − €€€€€ a b H−ArcSinh@Sinh@s t1DD + ArcSinh@Sinh@s t2DD + Sinh@s Ht1 − t2LDL . In[7]: H1 = Hyperbola2D@80. 0<. Find the coordinates of a point at a general parameter t on a hyperbola. ê. t −> t2L. Simplify. 0D. y −> y1L êê FullSimplify j 1 i j y12 y22 $%%%%%%%%%%%%%%%% − Hx1 + x2L Hy1 − y2L − a y2 $%%%%%%%%%%%%%%% % + Out[5] €€€€€ j 1 + €€€€€€€€€€€ j ja y1 1 + €€€€€€€€€€€ b2 b2 2 j k y z y1 y2 z a b JArcSinhA €€€€€€€€€ E − ArcSinhA €€€€€€€€€ ENz z z z b b { In[6]: A2 = A1 êê. a ∗ Sqrt@1 + y2 ^ 2 ê b ^ 2D −> x2< 1 2 y1 b y2 b Out[6] €€€€€ Jx1 y1 − Hx1 + x2L Hy1 − y2L − x2 y2 + a b JArcSinhA €€€€€€€€€ E − ArcSinhA €€€€€€€€€ ENN Create the hyperbola. t2D. ê. In[4]: I1 = Integrate@L. In[8]: Clear@sD. t −> t1L. b. a. t −> t1L. y −> y2L − HI1 ê. 8 a ∗ Sqrt@1 + y1 ^ 2 ê b ^ 2D −> x1.

y2 −> HP@@2DD ê. t −> t2L< êê FullSimplify 1 2 Out[12] − €€€€€ a b Sinh@s Ht1 − t2LD The area of the sector is the difference. t −> t2L. In[12]: AreaTriangle = Area2D@ Triangle2D@80. In[13]: AreaSector = AreaTriangle − AreaSegment êê Simplify 1 2