Exploring Analyic Geometry with Mathematica®

Home Contents Commands Packages Explorations Reference
Tour Lines Circles Conics Analysis Tangents

Distance Using Polar Coordinates

polardis.html

Exploration

The location of a point in the plane may be specified using polar coordinates, (r,θ), where r is the distance from the origin to the point, and θ is the angle the ray to the point from the origin makes with the +x-axis. Show that the distance, d, between two points "polardis_1.gif" and "polardis_2.gif" given in polar coordinates is

"polardis_3.gif"

Approach

Convert the given polar coordinates of the points to rectangular coordinates and then apply the Distance2D function to the converted points.

Initialize

To initialize Descarta2D, select the input cell bracket and press SHIFT-Enter.

This initialization assumes that the Descarta2D software has been copied into one of the standard directories for AddOns which are on the Mathematica search path, $Path.

<<Descarta2D`

Solution

This is a function for converting a polar point to rectangular coordinates.

Point2D[PolarPoint2D[r_,theta_]]:=
   Point2D[{r*Cos[theta],r*Sin[theta]}];

Define two arbitrary points in polar coordinates.

Clear[r1,r2,theta1,theta2];
p1=Point2D[P1=PolarPoint2D[r1,theta1]];
p2=Point2D[P2=PolarPoint2D[r2,theta2]];

Find the distance between the two points.

d=Distance2D[p1,p2] //Simplify

"polardis_4.gif"

Discussion

Distance2D can be defined to handle polar coordinates directly as shown here.

Distance2D[PolarPoint2D[r1_,theta1_],
           PolarPoint2D[r2_,theta2_]]:=
   Sqrt[r1^2+r2^2-r1*r2*Cos[theta1-theta2]]

Try out the new Distance2D function.

"polardis_5.gif"

"polardis_6.gif"


Copyright © 1999-2007 Donald L. Vossler, Descarta2D Publishing
www.Descarta2D.com