Function Line Displayed in 3D Graphics
by Ian Reynolds
from Popular Computing Weekly 16th September 1982

Ian Reynolds gives a three dimensional view of plotting.


This program runs on a 16K or 48K Spectrum. It produces a three
dimensional view of the function held at line 1010. You can input any
function at line 1010 to produce stunning effects on the screen.

There is a simple, but very effective, "hidden line removal" routine
comprised of lines 5, 10, 1022, 1023, 1026, 1050 and 1060.

When run, the program will request "resolution", which determines the
spacing between the points plotted. A value of four gives a detailed
plot, 10 gives a reasonable plot and 20 produces a fast but crude
display. A resolution of four takes between 15 and 25 minutes,
depending on the function at line 1010.

Experimenting with different functions and resolutions will give you
some idea of the Spectrum's graphics capabilities. The following
examples produce interesting displays:

Resolution	Line 1010
	4	LET t=-EXP t/80
	10	LET t=(SIN (t*3)+COS t)/4
	5	LET t=LN ABS COS t/10
	10	LET t=SGN COS (4*t)/10
	5	LET t=-SIN t*(1-COS t)/2


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

