2.7 PROBLEMS
1. To learn more about how to use gnuplot and some of the concepts from the previous chapter, try
to make the following figures in gnuplot. You will have to write the programs to generate and save
the data files for these figures and then plot those data files in gnuplot
(a) A right angled triangle with vertices at (0,0),(4,0) and (4,3).
(b) A circle of radius 3 centered at (5,5).
(c) A box with vertices at (1, 1), (5, 1), (5,5) and (1,5).
2. You are familiar with Lissajous figures. These are plots that one obtains when one superimposes
two perpendicular harmonic motions of different phases and amplitudes. Thus, for instance,
Page 63 of 121
Graphics Using GNUPLOT. COMPUTER PROGRAMMING-2017
Asin(n9 + 5)
Plot the following functions for @ in the range 0 < 0 < 4x and the parameters A,1 and 6 given by
(a) 6=3,A=1andn 3 (n = 1 gives an ellipse. Check.)
(b) 6=4,n=2and A 2
(c) n=2,A= land d= 3, 5,7.
3. The periodic funetion y(:r) with period 2x is defined as:
Plot this function from x = —6x to x