Graphs of equations with one variable missing

The graph of the equation x + y = 4 is a straight line in two-space, and can be plotted parametrically by using x = s as the parameter, and writing y = 4 - x = 4 - s as follows:

> plot([s,4-s,s=-5..5]);

[Maple Plot]

Other parts of the line can be viewed by just letting the parameter s range over different values, and theoretically every point of the line can be obtained by letting s vary over all real numbers.

> plot([s,4-s,s=0..10]);

[Maple Plot]

Now in three-space, the graph of x + y = 4 is a plane, and all we have seen so far is part of the graph in which z = 0. We can see a finite portion of this plane, by using a second parameter to allow z to vary over any desired interval

> plot3d([s,4-s,t],s=-5..5,t=-5..5,axes=boxed,labels=["x","y","z"]);

[Maple Plot]

Note that in the above graph, y varies from -5 to 10 while x varies from -5 to 5. To obtain a more symmetric graph in all variables, you can use more symmetric parametrization. For example x = 2 + s/2 and y = 2 - s/2 still satisfies x + y = 4 for all s, and using this parametrization, we obtain:

> plot3d([2+s/2,2-s/2,t],s=-5..5,t=-5..5,axes=boxed,labels=["x","y","z"]);

[Maple Plot]

If we plot a curve like x^2 + y^2 = 4 in two-space, we get a circle. In three-space, we get a cylinder. Here, we use x = s as our parameter, but when we solve for y, we get a positive square root and a negative square root. To get the full picture, we need to plot both of these as follows. Note that the parameter s must be restricted to the domain of sqrt(4 - s^2) which is the interval [-2..2].

> plot3d({[s,sqrt(4-s^2),t],[s,-sqrt(4-s^2),t]},s=-2..2,t=-5..5,axes=boxed,labels=["x","y","z"]);

[Maple Plot]

Note that we still seem to be missing a piece of this surface. In this case, this is evidently caused by an unlucky sampling of points that can be solved by specifying that more points be used in the graph than the 625 used by default. We ask for at least a 1000 points.

> plot3d({[s,sqrt(4-s^2),t],[s,-sqrt(4-s^2),t]},s=-2..2, t=-5..5,axes=boxed,labels=["x","y","z"],numpoints=1000);

[Maple Plot]

>

Actually, specifying any reasonable value for numpoints (whether larger or smaller than 625) seems to fill the gap left when numpoints is not specified. I don't know why. Try it yourself and see.