- Enter a function of one variable in the regular Google search box to generate a plot of it:
- Enter a function of two variables, x and y, to make a 3D plot. The variables have to be called x and y, and each of them has to appear at least once. This feature may not be available on mobile phones and older computers.
- The plot automatically rotates. Click/drag the plot or use the controls in the upper left corner to manually rotate or zoom.
- To adjust the x, y, z ranges, click on them in the lower right corner.
- The peaks in this graph are cut off:
The problem is that the z range (-0.0124833 to 0.0124833) is too small. To fix it, click on the z range (in the lower right corner) and change it to a bigger range (-.4 to .4 works; this can be shown by finding the maximum/minimum or by just trying larger ranges).
- You can also specify the ranges when entering a formula:
cos(x)*sin(y)*exp(-x^2-y^2), x is from -2*pi to 2*pi, y is from -2*pi to 2*pi, z is from -.4 to .4
- It will not make a 3D graph if x or y is completely missing in the formula, so you are out of luck with making a 3D graph of z = f(x,y) = cos(y); instead of a 3D plot, it will make a 2D plot whose axes are called y and z:
Here is a workaround, though:
- The surface is colored with a checkered pattern. You can see the vertical traces x=constant or y=constant on it by following along the edge of a row or column of the checkered squares. But it does not currently show horizontal traces z=constant (besides the xy plane, z=0) or make contour plots; see other tools below that do.
- Wolfram Alpha can do many types of plots, including functions of one variable, two variables, contour plots, and parametric plots. The basic plots are free, but they require a paid subscription for essential features like zooming, rotating, customizing, etc.
- Info and examples of the types of plots available.
- This generates both a 3D plot and a contour plot:
In the first panel, use the button "Show contour lines" to show the horizontal traces (z=constant) on the surface. Then use "Show mesh" to switch back to the vertical traces (simultaneously showing x=constant and y=constant). The second panel shows the contour plot.
- Same function with a custom range:
plot sin(x)*sin(y), x=0 to 2*pi, y=-pi to 3*pi
- To make a 3D plot z=f(x,y) when only one variable is in the formula, use
Using plot instead of plot3d would give a 2D plot y=f(x).
- 3D parametric curve:
parametric plot (cos(t), sin(t), t), t=0 to 2*pi
- 2D polar coordinates r=f(θ):
polar plot r=sin(3*theta)
- Commercial products: Matlab, Maple, Mathematica.
- Free products: R, SAGE, Gnuplot.
- These products can do 2D, 3D, contour, parametric, and other types of plots.
- They are harder to use than the websites listed above, and are too advanced for general use in Math 20C, but may be of interest to some students. They require experience in computer programming, matrices, and linear algebra (covered later, in Math 18).
- Matlab is available for student use on some ACMS lab machines and online through the ACMS Virtual Computing Lab. Matlab will be used in Math 20D and Math 18.
- Vector field: WindMapper
- Color coding: Temperature Map (weatherchannel.com)
- Contour map: Barometric Pressure (National Weather Service) in millibars
- Topographic map: Google Maps, GISsurfer
- The sites/software below may not work on all computers, devices, or web browsers. See more info on these and other programs earlier on this page.
- Google, Example 1: 3D plots of z=f(x,y). Note the rotation, controls, and checkerboard mesh (grid of x=constant and y=constant).
sqrt(1-x^2-y^2) x*y^2 x^2+4*y^2
Example 2: Look at the mesh (grid lines) on xy^2. For constant x=a and varying y, we get z=ay^2, which traces a parabola in the plane x=a. For constant y=b and varying x, we get z=xb^2, which traces a line in plane y=b.
Example 3: The peaks are cut off:
Fix by changing the range to -1≤z≤1. This can be done by typing new limits in the field in the lower right corner of the graph, or by including them with the formula as follows:
sin(y)*exp(-x^2), x is from -10 to 10, y is from -10 to 10, z is from -1 to 1
Example 4: It will not make a 3D graph if x or y is completely missing in the formula. If you enter z=cos(y), it will make a 2D graph with axes called y and z, instead of a 3D plot:
Here's a workaround:
- Wolfram Alpha: It shows a 3D plot of z=f(x,y) with a mesh (grid of x=constant, y=constant) and a contour plot. On the 3D plot, click "Show contour lines" to see the horizontal traces (z=constant) on the surface and "Show mesh" to switch back. Other useful features require a paid subscription.
- Wolfram Alpha: Parametric curves in 2D and 3D. Example in 3D:
parametric plot (cos(t), sin(t), t)
parametric plot (cos(t), sin(t), t), t=0 to 3pi
- Desmos: Parametric curves in 2D only
- Go to desmos.com and select Start Graphing
- Use the notation (cos(t),sin(t))
- It prompts you to enter lower and upper limits for t.
- For superscripts and fractions, use arrow keys to move in and out of them to the right level.
- Lissajous curve: (sin(5t),sin(7t)) for 0≤t≤2π (enter that as 2pi).
- 3D parametric curves (Flash & Math - Motion in 3D)
This site makes 3D parametric plots of x=f(t), y=g(t), z=h(t), and shows the velocity and acceleration vectors. Click and drag on the plot to rotate it. Click on the arrows to move along it. This requires Flash. You may need to enable Flash for this website for it to work, and it is not available on most mobile phones.
- The site starts out with a plot of a helix (like a slinky):
(cos(t), sin(t), t)
- For the trajectory of throwing a ball, enter x, y, z components of r⃗(t) = r⃗0 + v⃗0(t-t0) - (g/2)(t-t0)2k̂, where
t0 is the initial time,
r⃗0 is the initial position vector,
v⃗0 is the initial velocity vector,
and r⃗''(t)=-gk̂ is acceleration due to gravity.
Split the vector equation into three scalar equations x=..., y=..., z=...
- Demo values for initial position (6,8,12) ft and initial velocity (0,10,0) ft/sec at time t=1 sec (note t=1 is the top of the parabola, since the initial velocity is horizontal: its z component is 0):
x = 10*t - 4 y = 8 z = 12 - 16*(t-1)^2 (using g≈32 ft/sec2) tmin = 0 (set range of t to see the parabola) tmax = 2
Enter those formulas/values and hit the GRAPH button.