About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
  • Last update: 5 years ago
  • Total downloads: 50
  • Operating system: Linux, Mac OS X, Win All, BSD, Solaris
  • Publisher: Jasper Menger
See full specifications

scripts default iconcutpolygon (Scripts) Publisher's description

CUTPOLYGON - Split a 2D polygon by a line, and remove one of the sides

CUTPOLYGON - Split a 2D polygon by a line, and remove one of the sides

Use CUTPOLYGON to cut alias intersect alias split alias slice a polygon P
(being a series of connected X,Y coordinates) with a line L (defined by
two points), removing a specified side s. L can serve as a bottom limit
('B'), top limit ('T'), left limit ('L'), or right limit ('R').

Pc = CUTPOLYGON(P, L, s, doSplit, doPlot, doTable)

Demo (cut random regular polygon with random line):

P Polygon coordinates [X, Y]
L Line defined by two coordinates [x1, y1; x2, y2]
s What side to remove, character or integer

Optional switches:
doSplit Add intermediate NaN entries if the polygon is split into non-connected parts (default false)
doPlot Plot original and cut polygon plus line (default false)
doTable Tabulate intersection and validity per polygon segment (default false)

Side options:
1 / B = bottom remove parts Y < intersection
2 / T = top remove parts Y > intersection
3 / L = left remove parts X < intersection
4 / R = right remove parts X > intersection

Finding the intersection:

- Pc is the polygon post-cut [X, Y]
- Pc can be shorter than P (points are removed)
- Pc can contain intermediate NaN entries if doSplit is true

Version history (recent to ancient):
Jan 2010, Dominik Brands, fixed pure horizontal/vertical limit bug
Apr 2009, Jasper Menger , creation

System Requirements:

MATLAB 6.5 (R13)
Program Release Status: New Release
Program Install Support: Install and Uninstall

cutpolygon (Scripts) Tags:

Click on a tag to find related softwares

Is cutpolygon (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.