Project 2: The Competitive World of Design
Some hints on Maple and the math you'll need
You're going to be doing more complicated plots than usual, so you'll need to load a special Maple package. Here it is:
> with(plots):
(I surpressed the output by using a colon).
I want to make a simple little vase. Designing it lying on it's side is easier (it avoids the whole problem with functions not having two outputs for any input). I'm going to start with a simple parabola. This is not my first attempt; I shifted it up and over several times until I got it where I wanted it to be:
> f := x -> 4-(x-3)^2;
> plot(f(x), x=1..4, y=0..4, scaling=constrained);
I forced the graph to be to scale, so I'll have a feel for what my shape really is going to look like.
I want to be able to plot this curve along with several others I have yet to define, each one over a different interval. I could do this by defining a piecewise function, but I don't want to. (If you want to, look up piecewise in the help menu).
Instead, I'm going to name each of my plots, and then display them all at one time.
> plot1:=plot(f(x),x=1.4..4, y=0..4, scaling=constrained):
I surpressed the output when I defined plot1, because if you don't, you get long lines of gobbledook.
> g:=x -> 2.1*(x-1)^2+1.5;
> plot(g(x), x=0..1.8, scaling=constrained);
> plot2:=plot(g(x),x=0..1.8, y=0..4, color=blue, scaling=constrained):
> display(plot1,plot2);
These two curves don't quite meet up, but I can imagine a third curve going from about x=1.2 to x=1.8 connecting the two smoothly. So I want to cut out a section around where they meet and replace it with a curve that will match both f(x) and g(x) smoothly.
In order for my new function, h(x), to match g(x) smoothly on the left, the y-coordinates of both g(1.2) and h(1.2) must be the same, AND the slope of g at 1.2 and the slope of h at 1.2 must be the same. So we know we want h(1.2)=g(1.2) and h'(1.2)=g'(1.2).
And, of course, in order for h(x) to match f(x) smoothly on the right, we need h(1.8)=f(1.8) and h'(1.8)=f'(1.8).
Here's the big idea.
We want h(x) to satisfy 4 conditions. That means we basically have four unknowns. There will usually exist a polynomial wth four coefficients to satisfy these four unknowns. (It may not look like you expect it to, though!)
Four coefficients means a cubic polynomial.
> h:= x -> a*x^3+b*x^2+c*x+d;
We also need to use h', so I need to find it (which is easy enough) and enter it:
> dh:= x -> 3*a*x^2+2*b*x+c*x;
Now we need to find a, b, c, and d so that h(1.3)=g(1.3), h(2)=f(2), dh(1.3)=dg(1.3), and dh(2)=df(2). This is four equations in four unknowns, which would be a pain for us to do, but easy for Maple:
First, we have Maple do the derivatives (I know you can, but in this case it's easier, because then you can just cut and paste as you tweak your functions to get them to look like you want them to), and then define derivative functions in Maple:
> diff(f(x),x);
> df:= x -> -2*x+6;
> diff(g(x),x);
> dg:= x -> 4.2*x-4.2;
And now we're ready to have Maple to the solving for us:
> solve( { h(1.2)=g(1.2), h(1.8)=f(1.8), dh(1.2)=dg(1.2), dh(1.8)=df(1.8)});
Important: to avoid confusion later, it's best to now name my new function something other than h, so that I can use h again for my inside function, or even if I want to go back and tweak my f and g!!!
Let's see what this gets us. Remember it's quicker to cut and paste, when dealing with numbers like this!
> m := x -> .3518518519*x^3-.2133333333*x^2-.1400000000*x+1.451200000;
> plot3:= plot(m(x), x=1.2..1.8, color=black, scaling=constrained):
> display(plot1,plot2,plot3);
This looks like it will probably be pretty good. I'll now go back and change the domains of plot 1 and plot 2. In the ordinary course of events, I would just go back up there and change them there, but for your benefit, I'll redo them here:
> plot1:=plot(f(x),x=1.8..4, y=0..4, scaling=constrained): plot2:=plot(g(x),x=0..1.2, y=0..4, color=blue, scaling=constrained):
> display(plot1,plot2,plot3);
I know that this ended up not looking all that different from a cosine or sine graph, but the point is that I smoothed out the connection between the curves (in fact, I made a connection where there wouldn't have been one.)
Now, I need to see what this would look like from the outside, were it revolved around the x-axis.
> t1:=tubeplot( [x,0,0], x=0..1.2, radius= g(x)): t2:=tubeplot([x,0,0], x=1.2..1.8, radius=m(x)): t3:=tubeplot([x,0,0], x=1.8..4, radius=f(x)):
> display(t1,t2,t3);
>
Okay, so I've made the outside of a little vase.
This demonstrates the techniques I wanted to show you, so I'll stop here. You, however, would still need to do the following:
1) Make sure that the actual 3-D vase is to the scale I want it to be. This vase will be 8 inches wide at it's widest spot, but only 4 inches tall, which sounds distorted. It doesn't look that distorted in my plot -- why not?
Because I didn't force it to be too scale. Here's what it would look like to scale:
> display(t1,t2,t3, scaling=constrained);
So I'd either have to stretch my curves out some, or perhaps I could just fix the problem by shifting the curve down a bit.
2) Once I have it so it really looks the way I want it to and to a realistic scale, I need to design the interior curve as well (after all, unless something is infinitesimally thin, it has an inside and an outside). In some cases, you'll be be able to go the simple route and just shift your outside curve down some. In other cases, you either won't want to do that, or you won't be able to. So don't put this part off!
3) You need to calculate the volume, using the techniques you've learned, (and putting them in the units you're using for your to-scale object).
Do not put this off either -- it will often not be as easy as it sounds, as you'll have several different curves. In fact, if you go for the more interesting shapes, as Tara wants you to do, where the inside doesn't match the outside exactly, you may have to break your volume finding process into many different intervals.