|
From: Karl R. <ra...@un...> - 2014-11-28 19:38:40
|
Am 28.11.2014 um 19:38 schrieb Philipp K. Janert: > Am 28.11.2014 um 18:58 schrieb Philipp K. Janert: >> set object 1 polygon from -0.9,0.9 rto 0.8,0 rto 0,-0.8 rto -0.8,0 >> rto 0,0.8 set object 2 polygon from 0.1,0.9 rto 0.8,0 rto 0,-0.8 rto >> -0.8,0 rto 0,0.8 Why not leave out the last step? The polygon closes itself by itself. >> then gnuplot complains that the second polygon is not closed (and >> that gnuplot is adding a vertex). > .... > PKJ: I disagree. If the warning is in fact due > to round-off (which I don't know - it might be > due to a bug in the code, for instance; I did It´s rounding : gnuplot> print 0.1 + 0.8 - 0.8 - 0.1 -2.77555756156289e-017 > After all, using straight equality in floating > point arithmetic is rarely the right thing to do. True. That´s why a polygon should get closed by returning to the origin, not to a place that would be the origin if we had infinite precision. So i´d say there´s nothing to be done about this, except that "set object polygon" could get an additional "close it" option, that suppresses the extra-vertex warning. Karl |