657

edits

Jump to navigation
Jump to search

→Meshing Octave

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>}}

657

edits

Retrieved from "https://wiki.octave.org/Special:MobileDiff/853"

- Not logged in
- Talk
- Contributions
- Create account
- Log in