|
Drawing Shapes with Piecewise Defined Functions
Mechanical engineers often need to draw curves that join smoothly to line segments,
for example in designing a rounded corner on a machine part with straight sides.
Most CAD programs have automatic procedures for drawing these smooth transition curves.
In this activity you'll use a graphing calculator to experiment with using piecewise
defined functions to design and test a smooth transition curve between two angled
lines.
To get our lines and curve, we'll use the following piecewise-defined function:

In order to graph this function you'll need enter it into the graphing calculator
as a sum of three expressions, multiplying each expression by a test function that
is 1 where you want this expression to take over and 0 where you want it to drop
out. Remember that on your calculator an inequality has a value: X < -1
has the value 1 when the inequality is true, that is, when X is less than
-1, and the value 0 otherwise. So (X < -1)(-X - 1) is a function with a switch:
when X is less than -1 it's the function -X - 1, but for any other X it's the constant
function 0. On the calculator the piecewise function to graph might look like this:
Y1 = (X < -1)(-X - 1) + (-1 £ X)(X £ 1)A(X2
- 1) + (X > 1)(X - 1)
Before you can draw the graph you'll need to go to the home screen and store a value
for A. For the graph below we've used A = 2.
Now draw the graph. To see the area that we are interested in you may want to
zoom in, and since you're going to be looking at angles, you'll want equal scales
on the two axes. On the TI-83 you could set up a good viewing window by doing ZStandard followed by ZSquare
and then zooming in once. Here's what you will see:

ACTIVITIES
1. Experiment with reshaping the middle piece of your graph by changing the parameter
A. On the TI-83 you can do this by returning to the home screen, storing a new value
of A (don't forget to press ENTER to put the new
value in memory) and then pressing GRAPH. What
does A seem to control about the shape of this curve?
2. Find a value of A for which the middle curve makes a smooth transition between
the two straight lines. You might want to zoom in on one of the "joints"
between the pieces to check how smoothly they fit together.
3. Now we'll try our fit the other way around. Restore the value of A to 2 in the
home window. The task here is to change the first and third equations so that the
lines make a smooth continuation of the curve in the middle. This is more complicated,
because as you change the slope of each line you'll also have to change the y-intercept
to keep the lines connected to the curve. Experiment with different slopes and intercepts.
You won't want to retype that long piecewise function definition, so use your calculator's
insert capability to add coefficients in front of the Xs in the two linear functions.
On the TI-83, position the cursor in the expression and press 2nd
INS to go into insert mode.
FURTHER READING ON THE WEB
Drafting programs like AutoCAD usually have several different routines for interpolating
smooth curves. One common technique is called a Bézier curve. With a Bézier
curve, you anchor two endpoints and then shape the curve between them by positioning
"control points" that attract the curve. By splicing curved sections together
at their endpoints, designers can draw a smooth curve that passes through any number
of points. This curve will be the graph of a piecewise defined function, but because
the slopes of the curves match at the joints, the graph looks smooth. At the Web
site
http://SunSITE.UBC.CA/LivingMathematics/V001N01/UBCExamples/Bezier/bezier.html
you can make your own Bézier curve by dragging the control points around.
In this case the function defining the shape is a cubic polynomial. You'll learn
about polynomials and their graphs in Chapter 3. If you're interested in the math
behind these curves, check out the interesting graphics notes at
http://graphics.cs.ucdavis.edu/GraphicsNotes/Bezier-Curves/Bezier-Curves.html
|