## Exploring Analyic Geometry with |
|||||

Home | Contents | Commands | Packages | Explorations | Reference |

Tour | Lines | Circles | Conics | Analysis | Tangents |

Transformations

Translations

Rotations

Scaling

Reflections

Explorations

A transformation is a mathematical operation that changes a function of variables, say f(x,y), into a new function f'(x',y') where

These equations are called the equations of the transformation. Transformations can often be constructed so that f' is much simpler than f. In this chapter we will study four transformations that have useful geometric interpretations: translation, rotation, scaling and reflection.

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`

Translations [Top]

A translation is a transformation that maps coordinates (x,y) into

(x+u,y+v).

When a translation is applied to a locus of points, the resulting locus has the same shape and orientation as the original one, but its position with respect to the coordinate axes is offset by distances u in the x-direction and v in the y-direction. The equations of the transformation are

x'=x+u and y'=y+v.

Example: Determine the coordinates of the point that results from translating (3,2) by u=-1 and v=-3.

Solution: The function Translate2D[{x,y},{u,v}] translates a coordinate list (x,y) by the specified offset (u,v), returning a new coordinate list. The function Translate2D[point,{u,v}] performs the same translation and returns a translated point.

{Translate2D[{3,2},{-1,-3}],

Translate2D[Point2D[{3,2}],{-1,-3}]}

■

A translation can also be applied to an equation. For example, if

f(x,y)=Ax+By+C

is a linear equation in two variables, we can translate this by making the substitutions x=x'-u and y=y'-v. Mathematica provides powerful functions for performing these transformations.

Clear[x,y,u,v,a,b,c];

a*x+b*y+c /. {x->x-u,y->y-v} //Expand

In standard mathematical notation the translated equation is

Ax+By-Au-Bv+C.

Mathematica Hint: The Mathematica function Replace, represented by the /. operator, applies a set of replacement rules to an expression.

In a similar manner a quadratic equation can be translated. Again Mathematica provides a convenient means for performing the algebraic operations.

Clear[x,y,u,v,a,b,c,d,e,f];

a*x^2+b*x*y+c*y^2+d*x+e*y+f /.

{x->x-u,y->y-v} //Expand

Collecting terms and writing in standard mathematical notation yields the translated quadratic equation

where

A' | = | A |

B' | = | B |

C' | = | C |

D' | = | D-2Au-Bv |

E' | = | E-2Cv-Bu |

F' | = |

Using these basic formulas for translations it is easy to translate other objects. The location of curves, such as circles, ellipses and conic arcs, are defined by points and can be translated by translating the points themselves. For example, Ellipse2D[{h,k},a,b,θ] is translated to Ellipse2D[{h+u,k+v},a,b,θ].

Example: Translate the ellipse

by the offsets u=2 and v=-2. Plot both the original ellipse and the translated ellipse.

Solution: The function Translate2D[object,{u,v}] translates an object u in the x-direction and v in the y-direction. The object may be a coordinate list, a geometric object or a list of Descarta2D objects.

e2=Translate2D[e1=Ellipse2D[{1,-3},4,3,0],{2,-2}]

Sketch2D[{e1,e2}]

■

Rotations [Top]

Rotation transformation.

A rotation by an angle θ about the origin is a transformation that maps coordinates (x,y) into (xcosθ-ysinθ,ycosθ+xsinθ). The mapping is easily confirmed using trigonometry as shown in Figure [trans:fig02].

cosα | = | x/r |

sinα | = | y/r |

x' | = | OA' |

. | = | rcos(α+θ) |

. | = | r(cosαcosθ-sinαsinθ) |

. | = | r((x/r)cosθ-(y/r)sinθ) |

. | = | xcosθ-ysinθ. |

Similarly, it can be shown that y'=ycosθ+xsinθ.

In order to rotate about a point (h,k), we first translate the coordinates to the origin, perform the rotation using the equations above, then apply the inverse translation to restore the object to its original position with the rotation applied. The general equations of a rotation so derived are

x' | = | h+(x-h)cosθ-(y-k)sinθ |

y' | = | 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. Solving for x and y in terms of x' and y' (and making use of the identity ) yields the equations

x | = | h+(x'-h)cosθ+(y'-k)sinθ |

y | = | k-(x'-h)sinθ+(y'-k)cosθ. |

Substituting into Ax+By+C yields the equation

A'x+B'x+C'=0

where

A' | = | Acosθ-Bsinθ |

B' | = | Bcosθ+Asinθ |

C' | = | Ah+Bk+C-(Ah+Bk)cosθ-(Ak-Bh)sinθ. |

Rotating the quadratic equation is accomplished in the same manner, by replacing x and y with the proper rotated coordinates. The resulting expressions for the coefficients of the rotated quadratic equation,

are somewhat long, but can be written symbolically as

A' | = | |

B' | = | |

C' | = | |

D' | = | |

. | . | 2(Bh-(A-C)k)cosθsinθ+ |

. | . | (2Ah+Bk+D)cosθ-(Bh+2Ck+E)sinθ |

E' | = | |

. | . | 2((A-C)h+Bk)cosθsinθ+ |

. | . | (Bh+2Ck+E)cosθ+(2Ah+Bk+D)sinθ |

F' | = | |

. | . | |

. | . | |

. | . | |

. | . | |

. | . |

By applying the formulas for rotating coordinates, linear equations and quadratic equations, we can now specify how to rotate all of the Descarta2D objects. Points and lines can be rotated by directly applying the formulas for coordinates and linear equations, respectively. Curves that are located by points can be rotated by rotating the defining points; additionally, curves that have orientation angles, such as arcs, parabolas, ellipses and hyperbolas, are rotated by adding the rotation angle, θ, to the angle of the curve.

Example: Rotate the ellipse

π/2 radians about its center point and about the origin. Plot all three ellipses.

Solution: The Descarta2D function Rotate2D[object,θ,{,}] rotates an object by angle θ about point . The function Rotate2D[object,θ] rotates an object by angle θ about the origin. The object may be a coordinate list, a geometric object or a list of Descarta2D objects.

e1=Ellipse2D[{3,0},2,1,Pi/2];

{e2=Rotate2D[e1,Pi/2,{3,0}],e3=Rotate2D[e1,Pi/2]}

Sketch2D[{e1,e2,e3}]

■

Scaling [Top]

A scaling transformation maps coordinates (x,y) to (x',y') using the transformation equations

x'=h+s(x-h) and y'=k+s(y-k).

The scale factor, s>0, indicates the ratio of corresponding lengths of the scaled object with respect to the original object. The point (h,k) is called the center of scaling. A point at the center of scaling does not change coordinates during a scaling transformation.

Solving the scaling transformation equations for (x,y) in terms of (x',y') yields

Substituting the coordinates (x,y) into the linear polynomial Ax+By+C yields the scaled linear polynomial

Ax+By+Ah(s-1)+Bk(s-1)+sC.

Similarly, applying a scaling transformation to the quadratic polynomial

yields

where

A' | = | |

B' | = | |

C' | = | |

D' | = | (D+(1-s)(2Ah+Bk))/s |

E' | = | (E+(1-s)(Bh+2Ck))/s |

F' | = |

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.

Example: Scale the circle by a factor of 3/2 about its center point and the origin. Plot the three circles.

Solution: The function Scale2D[object,s,{h,k}] scales the object using scale factor s about the center of scaling (h,k). Scale2D[object,s] scales the object about the origin. The object may be a coordinate list, a geometric object or a list of Descarta2D objects.

c1=Circle2D[{2,1},1];

{c2=Scale2D[c1,3/2,{2,1}],c3=Scale2D[c1,3/2]}

Sketch2D[{c1,c2,c3}]

■

Reflections [Top]

A reflection transformation maps the coordinates (x,y) to coordinates that are the "mirror" reflection of the coordinates with respect to a line that represents the position of the mirror. Consider the point and the reflection line . The following Descarta2D commands can be used to determine the coordinates of the reflection of point in line .

Clear[x1,y1,A2,B2,C2];

p1=Point2D[{x1,y1}];

l2=Line2D[A2,B2,C2];

p2=Point2D[p1,Point2D[p1,l2],

2*Distance2D[p1,l2]] //Simplify

In standard mathematical notation the coordinates of the reflected point are given by the transformation equations

= | ||

= |

Solving the transformation equations for in terms of yields

= | ||

= |

Mathematica Hint: While it is feasible to solve these equations manually using algebra, it is much less effort to let Mathematica do the work using the Solve function. The command would be of the form

Solve[{x2==XCoordinate2D[p2],

y2==YCoordinate2D[p2]},{x1,y1}] //Simplify

Substituting the coordinates into a linear equation yields the reflected linear equation

where

= | ||

= | ||

= |

Substituting the coordinates into a quadratic polynomial

yields a quadratic Q' reflected in the line of the form

where

A' | = | |

B' | = | |

C' | = | |

D' | = | |

E' | = | |

F' | = |

and

. | ||

. |

Reflection of an Angle

A reflected 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, be a reflection line that makes an angle α with the +x-axis, and L' the reflection of L in as shown in Figure [trans:fig05]. We wish to determine the angle θ' that L' makes with the +x-axis. Using the fact that supplementary angles sum to π and that the interior angles of a triangle sum to π, the angle θ'=2α-θ. The relationship also holds true when α=θ, in which case L and L' do not intersect. By applying the methods for reflecting coordinates, equations and angles we are able to reflects all of the geometric objects in the Descarta2D system.

Example: Reflect the arc centered at (3,2) with radius 1 and start and end angles of π and 3π/2 in the line x+3y+2=0.

Solution: The Descarta2D function Reflect2D[object,line] reflects the object with respect to the line. The object may be a coordinate list, a geometric object, or a list of objects.

a2=Reflect2D[a1=Arc2D[Point2D[{3,2}],2,{Pi,3Pi/2}],

l1=Line2D[1,3,2]]

Sketch2D[{a1,l1,a2}]

■

Explorations [Top]

Reflection in a Point. [reflctpt.html]

A point P'(x',y') is said to be the reflection of a point P(x,y) in the point C(H,K) if C is the midpoint of the segment PP'. Using this definition show that

• The transformation equations for a reflection in a point are

x'=2H-x | x=2H-x' | |

y'=2K-y | y=2K-y'. |

• The reflection of the line ax+by+c=0 in the point (H,K) is

ax+by-(2aH+2bK+c)=0.

• The reflection of the quadratic in the point (H,K) is

. | . | |

. | . |

Also, verify that the reflection in a point transformation is equivalent to a rotation of π radians about the reflection point (H,K).

Inversion. [inverse.html]

A point P'(x',y') is said to be the inverse of a point P(x,y) in the circle

if points O(h,k), P and P' are collinear and . Using this definition show that

• The coordinates of P'(x',y') are

• If the circle of inversion is , the coordinates of P' are

• If the circle of inversion is , the inverse of the line , assuming L does not pass through the origin, is the circle

• If the circle of inversion is , the inverse of the line , assuming L passes through the origin (), is L itself.

• If the circle of inversion is , the inverse of the circle is

• If the circle of inversion is , the inversion of , which passes through the origin, is the line . L is parallel to the tangent line to C through the origin. The equation of the tangent line is .

Inversion is clearly a non-rigid transformation.

www.Descarta2D.com