in reply to Sinusoidal japh
The column index is treated as degree / 4.5, which yields 360 degrees
for 80 columns.
Radian = Column * 4.5 * pi / 180. The coordinate system is very
coarse, so not much precision is needed. Reduced as follows:
radian = column * 4.5 * 3.14 / 180 radian = column * 0.0785 radian = column * 0.1To golf a bit I keep track of the current column by pushing another value onto @$a in each column, and using $#$a for the current column index. Easier and more efficient to just use the value of $_... but it amused me.
Using the sin * 6, and subtracting 6 from the current row ($b) is done to provide a +-6 vertical range for the sin wave.
|
|---|