Plotting r = r(theta)
The following code is extracted from program simdem64 in the
Simdem package,
and it illustrates how easy it is to plot a curve in the parametric form
r = r(theta), where r and theta are double precision arrays.
c
c calculate r = sin(4*theta)
c
delta = two*pi/dble(n  1)
theta(1) = zero
do i = 2, n  1
theta(i) = theta(i  1) + delta
enddo
theta(n) = two*pi
do i = 1, n
r(i) = sin(four*theta(i))
enddo
c
c plot the 8 leaved rose
c
call rtplot (n,
+ r, theta)
end
The following plot is then displayed and can be edited to add further
features, printed, or archived as a graphics file.
