Geometry package: Difference between revisions

Jump to navigation Jump to search
Line 20: Line 20:
<!-- <syntaxhighlight lang="matlab"> -->
<!-- <syntaxhighlight lang="matlab"> -->
<pre>
<pre>
octavepoly = svg('octave.svg');
octavesvg = svg('octave.svg');
ids = dc.pathid();
ids = octavesvg.pathid();
P = dc.path2polygon(ids{1},12)(1:end-1,:);
P = octavesvg.path2polygon(ids{1},12)(1:end-1,:);
P = bsxfun(@minus, P, centroid(P));
P = bsxfun(@minus, P, centroid(P));
</pre>
</pre>
657

edits

Navigation menu