Changes

Jump to navigation Jump to search

Geometry package

181 bytes added, 08:35, 8 March 2012
We are going to reduce the amount of points of the polygon in a drastic and destructive way (i.e. the shape may be considerably damaged). The codes to do so follows, in the future a better procedure will be published here.
{{Code|Symplification of a polygon compatible with geometry package|<pre>
Ps = P; n = 1e6;thrsd = 0.38; while n>size (Ps,1) n = size (Ps,1); ds = sqrt (sumsq (Ps(1:end,:) - Ps([2:end 1],:),2)); Ps = Ps(ds>mean (ds)*(1-thrsd),:); endwhos P Ps
</pre>}}
651

edits

Navigation menu