display | more...

A graphical calculator is a nifty tool, but without help it can only plot 2d functions. There are programs available to allow it to draw 3d functions, but it's a lot more fun to do it yourself.


Axes
First, we need to orient the axes. To avoid confusion with the original axes, I believe it's easiest to keep the y-axis vertical. To figure out how to draw the axes, we start out by having a horizontal x-axis, a vertical y-axis, and a z-axis which is perpendicular to this, meaning it's coming towards you.

     |y
     |
     |
-----z-----x
     |
     |
     |

Then, we turn our view around the y-axis (so we're going left or right). This will bring the z-axis into view. The length of the z-axis will be 0 when we've turned 0 degrees, then increase slowly when we turn, then increases faster, until it's 1 (full length) when we're at 90 degrees. This might remind you of the function sin(x). If we define a to be the angle we rotated around the y-axis, the horizontal length of the z-axis will be sin(a). Similarly, the horizontal length of the x-axis changes. It starts at one, but goes to 0 for 90 degrees. This is the function cos(a).
After that, we turn our view up or down around the center. The vertical length of the y-axis goes from 1 to 0, and is thus given by cos(b), where b is the amount of degrees we turn vertically. The vertical lengths of the x-axis and the z-axis change too, but they won't range from 0 to 1. Instead, their maximum length is a function of a. If we were to turn around our axis 90 degrees so we look at it from the top, we'll see that the maximum vertical length ranges from 0 to 1 too. for the x-axis, it's 0 if a is 0 and 1 when a is 90 degrees. This gives us the equation: sin(a)*sin(b).The equation for the z-axis is similar, cos(a)*sin(b), a cos because it begins at maximum vertical length one and then goes to 0 when a goes to 90 degrees.

We can plot these functions in a graph to see if we did it right. It's faster to calculate the values of the sines and cosines beforehand, since the graphing is going to take quite long later on otherwise. The easiest way to plot it is to use the parametric setting. You can find this on a TI83/84 under Mode>Par. I will use 30 for a and 20 for b. Then, if you go to the screen to enter the graphs (Y=), you can enter y and x as a function of T. First, we'll plot the x-axis. The horizontal length was given by cos(a) so we'll write the function down as:

X1T=0.87*T

This way it will draw the x-axis from left to right, because we'll have T run from -1 to 1. You can get the T by clicking the X,T,θ,n button, but entering the letter T with the ALPHA button works too. The vertical length was given by sin(a)*sin(b):

Y1T=0.5*0.34*T

But like this, when T increases, the point on the axis will go down. I think it's prettier the other way around, so we'll change it to:

Y1T=-0.5*0.34*T

Make sure to use the small minus sign, on the down right of the white keys on the TI83/84.
Like this we can do all three of the axes. For the y-axis:

X2T=0
Y2T=0.94*T

And for the z-axis:

X3T=-0.5*T
Y3T=-0.87*0.34*T

By putting the minus in front at the horizontal part, the z-axis will be negative in the back, and positive in the front. There's a few things we need to set up now. For one, the window settings. These settings should do:

Tmin=-1
Tmax=1
Tstep=0.2
Xmin=-1.5
Xmax=1.5
Ymin=-1
Ymax=1

This is nearly square. The window settings can be found by pressing the blue button with window on it. Turn of the original axes by pressing format (2nd, zoom) and clicking AxesOff. Now we can click GRAPH, and it should draw a nice set of axes which looks similar to this one::

        |
        |
        |
--,,    | ,--'
    ''--+,,
    ,--'|  ''--,,
   '    |        --
        |
        |


Functions
Imagine the line y=0 in a 2d graph. This line runs over the x-axis. If you were to plot that line now, it wouldn't run over our x-axis, but rather horizontal. If we want to have it run over our x-axis, we need to alter the function. If x was increased by one on our axis, we'd go cos(a) to the right and -sin(a)sin(b) up. For clarity, it's easier to just replace those functions with numbers, so we'll say:

When x is increased by one, we go 0.87 to the right and -0.5*0.34 up.

So to make our line run over the x-axis, we can change change the function y=0 to:

X4T=0.87*T
Y4T=-0.17*T


We replace the variable which is increased by T, so we can use the parametric graph, which is easier. You can hardly see this line if you try to enter it, because it runs over the x-axis.
For the line y=x, this works a little different. We can change it to:

X4T=0.87*T
Y4T=T-0.17*T


This line would be too high though, since we're forgetting something. y isn't as high as it used to be either. It's actually cos(b) times it's original length. cos(20)=0.94 and sin(20)=0.34. This gives us the following new rule:

When y is increased by one, we go 0 to the right and 0.94 up.

When putting this into the formula, this is what it becomes:

X4T=0.87*T
Y4T=0.94*T-0.17*T


To prevent confusion, it's easier for yourself to think of the function X4T as how many you go to the right, and of the function Y4T as how many you go up. Now, let's add depth.


Third dimension
A nice feature of the TI83/84 is that it can graph a function containing a list. If we make a list with values we want to plot for z, we can plot a number of lines at once. Our x was running from -1 to 1 with steps of 0.2, so let's do the same for the list:

{-1,-.8,-.6,-.4,-.2,0,.2,.4,.6,.8,1}->L1

You can get the curly brackets by pressing 2nd, bracket, the arrow with the STO-> button, and L1 with 2nd, STAT, L1. Now, we can make a function with z in it. A nice function is y=x2-z2. Because of the way we defined the z-axis, another rule we can state is this one:

When z is increased by one, we go -0.5 to the right and -0.87*0.34 up.

So, our new X4T becomes the original one, T, plus how much it changes because of the z, and our Y4T becomes the original function with T instead of x and L1 instead of z, times the change from the difference in y height, plus the amount of change because of the x, plus the amount of change because of the y. It may be more comprehensible if you state it mathematically:

x=T
z=L1
y=f(x,z)
X4T=0.87*x-0.5*z
Y4T=0.94*f(x,z)-0.5*0.34*x-0.87*0.34*z


Solving this for X4T(T,L1) and X4T(T,L1) gives us:

X4T=0.87*T-0.5*L1
Y4T=0.94*f(T,L1)-0.5*0.34*T-0.87*0.34*L1


Or if we want to state it exact:

X4T=cos(a)*T-sin(a)*L1
Y4T=cos(b)*f(T,L1)-sin(a)*sin(b)*T-cos(a)*sin(b)*L1


What this effectively means is that you can leave the functions in place, and just change the f(T,L1) part when you want to have a different formula. Thus, when we want to enter our formula y=x2-z2 it becomes:

X4T=0.87*T-0.5*L1
Y4T=0.94*(T2-L12)-0.5*0.34*T-0.87*0.34*L1

Once you've entered that, you can press GRAPH, and it should start drawing a series of parabolae. It will start in the back, thus, off to the right, and will make something that resembles a saddle. But we only have lines going one way. We'll want the perpendicular lines too. How do we do that? Well, we've currently got two different ranges from -1 to 1, T and L1. T is continuous, and L1 is not. But since they're the same in every other aspect, we can exchange them freely, making direction z continuous and direction x discontinuous. Thus, we can change every T to L1 and every L1 to T:

X5T=0.87*L1-0.5*T
Y5T=0.94*(L12-T2)-0.5*0.34*L1-0.87*0.34*T


Mind the 5 in X5T. We want both functions now, because that will make a grid. Pressing GRAPH should give you a nice 3d function.


Parametric functions
With the original parametric functions, we could make a circle like this:

X4T=cos(π*T)
Y4T=sin(π*T)


You need to set the calculator to radian, of course. Now, with 3 dimensions, we should be able to make a sphere. The equations for this would be:

x=cos(π*T)*cos(0.5*π*L1)
z=sin(π*T)*cos(0.5*π*L1)
y=sin(0.5*π*L1)


The x and z make circles with a radius which is defined by the vertical position we're at, and the y puts the circles in the right place. The general formula was:

X4T=0.87x-0.5*z
Y4T=0.94*y-0.5*0.34*x-0.87*0.34*z


Note the replacement of f(x,z) with the more general y. Filling it in gives us:

X4T=(0.87*cos(π*T)-0.5*sin(π*T))*cos(0.5*π*L1)
Y4T=0.94*sin(0.5*π*L1)+(-0.5*0.34*cos(π*T)-0.87*0.34*sin(π*T))*cos(0.5*π*L1)


I've put the cos(0.5*π*L1) outside of the brackets to improve calculation speed. This gives the horizontal outlines of a ball. We'll also want the vertical ones, of course, like on a globe. You can get these by switching the T and the L1 again, giving us:

X5T=(0.87*cos(π*L1)-0.5*sin(π*L1))*cos(0.5*π*T)
Y5T=0.94*cos(0.5*π*T)+(-0.5*0.34*cos(π*L1)-0.87*0.34*sin(π*L1))*cos(0.5*π*T)


This should produce a globe. Another nice parametric function is the following:

x=sin(π*(5*T+L1))*cos(0.5*π*T)
z=cos(π*(5*T+L1))*cos(0.5*π*T)
y=sin(0.5*π*T)


The first part of the equation of z and x creates a circle which is run through 2 times, changing its drawing height on the go. The second part changes the radii of these circles depending on the height. The L1 creates an offset in the starting angle of the circle. So, this should create lines spiraling around the surface of a sphere. Converting it into equations we can use:

X4T=(0.87sin(π*(2*T+L1))-0.5*cos(π*(2*T+L1)))*cos(0.5*π*T)
Y4T=0.94*sin(0.5*π*T)+(-0.5*0.34*sin(π*(2*T+L1))-0.87*0.34*cos(π*(2*T+L1)))*cos(0.5*π*T)


We do need to alter the Tstep though. The lower the value the nicer the result. 0.05 Should give a decent-looking graph. But of course, as we can change the steps in the T values, we can also change the steps in the L1 values. I made an L2 with -1, -0.6, -0.2, 0.2, 0.6, 1. This gives you less lines, meaning shorter waiting times.


Things to note

  • Instead of using the values like 0.94, I used the letters from C to F to represent the values. I stored the values in the letters with a small function which I could call from my homescreen with entry (2nd, enter). This was it:
    30/180*π→A:20/180*π→B:sin(A)→C:cos(A)→D:sin(B)→E:cos(B)→F
    Then I changed the values to the right letters. Like this I could easily change the viewpoint without the massive slowdown of calculation sines, just the small slowdown of accessing a variable. The correspondence is: 0.5=C, 0.87=D, 0.34=E, 0.94=F.
  • Somewhere along the way I turned off the axes by just deselecting the equal sign on the Y= screen. They get in the way of pretty pictures, and they need some time to draw at the start.
  • You could write a program converting your three parametric functions and the angle of view into our functions. You'd need to do some some string editing, searching for any x, y or z in the functions and replacing those, then entering the functions into the form we can use. Just keep track of what you're doing and where you're going, and you should be fine if you have some experience.


This should allow you to create 3d functions on your graphical calculator, but next to that it might also give some insight into how 3d functions are essentially shown by math programs. I hope you'll have some fun with it!

Log in or register to write something here or to contact authors.