| I'm having some trouble getting consistent results. A minor change
to either the "start", "finish", or "n_points" seems to have a major
unexpected effect on the drawing. For example,
$ flower 500*t*log(tan(t*t)),0,400,1000
is nice, but an increase in the number of points plotted
$ flower 500*t*log(tan(t*t)),0,400,10000
also makes the drawing smaller. A change to the starting value doesn't
seem to include the 'end' of the earlier drawing:
$ flower 500*t*log(tan(t*t)),200,400,1000
|
| Perhaps an explanation of how the program does its scaling will
make it more clear.
The program makes a silent pass, evaluating the function at each
point to be plotted. The results are min/maxed in order to determine
scaling.
However, the actual drawing is done by telling Regis to draw a smooth
spline curve between the points. Hence Regis might draw the curve
outside the screen boundary!
However, when you increase the number of points, there are more
now available for the program to sample for its scaling computation.
Hence if less points were causing the picture to leave the edge
of the tube, then more points will definitely cause the picture
to be smaller. How much smaller depends on how wild the curve is.
What I'd really like, is if my scaling could be according to what's
really going to be drawn, so that nothing gets cut off. But that
seems very difficult.
/Eric
|