Rank: 1910 based on 39 downloads (last 30 days) and 5 files submitted
photo

Jasper Menger

E-mail

Personal Profile:

Professional Interests:

 

Watch this Author's files

 

Files Posted by Jasper View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
07 Jan 2010 Screenshot cutpolygon Cut alias slice alias split a 2D surface polygon by a line, and remove the specified part. Author: Jasper Menger polygon surface line ... 15 2
  • 4.0
4.0 | 1 rating
15 Nov 2006 xLOGy Generalized logarithm Author: Jasper Menger log logarithm general... 3 4
  • 3.0
3.0 | 1 rating
12 Dec 2005 Screenshot codecount Counts the total number of code lines of all the M-files in a directory Author: Jasper Menger directories, count, mfiles, code, directory, path 5 1
  • 3.0
3.0 | 1 rating
30 Nov 2005 Screenshot Showroom Revolves a 3D plot showroom-style Author: Jasper Menger fly, plot, revolve, 3d, showroom, turn around 5 6
  • 5.0
5.0 | 4 ratings
23 Nov 2005 Screenshot Waitbar2 Modification of standard waitbar function; neater code, and a fancy color shift effect added Author: Jasper Menger color gradient, waitbar, color shift, for loop 11 2
  • 3.66667
3.7 | 3 ratings
Comments and Ratings on Jasper's Files View all
Updated File Comment by Comments Rating
07 Jan 2010 cutpolygon Cut alias slice alias split a 2D surface polygon by a line, and remove the specified part. Author: Jasper Menger Brands, Dominik

Sorry, I made a mistake during the copy/paste of the code
The second part must be:
                elseif xx3 > xx1
% modified/add lines
% compute intersection point
                    X3(i) = xx1; xp = xx1;
                    yp = interp1([xx3, xx4], [yy3, yy4], xx1, 'linear', 'extrap');
                    Y3(i) = yp;
% Original code
% X3(i) = xx1; xp = xx1; yp = yy3;
                elseif xx4 > xx1
% modified/add lines
% compute intersection point
                    X4(i) = xx1; xp = xx1;
                    yp = interp1([xx3, xx4], [yy3, yy4], xx1, 'linear', 'extrap');
                    Y4(i) = yp;
% Original code
% X4(i) = xx1; xp = xx1; yp = yy4;

I think, a similar code must be add to the part for horizontal cut-lines.

06 Jan 2010 cutpolygon Cut alias slice alias split a 2D surface polygon by a line, and remove the specified part. Author: Jasper Menger Brands, Dominik

Hi,
cutpolygon is a very helpful tool,
but I found one thing I do not understand.
If I cut a polygon by a vertical line, the intersection points
will not be computed correct. The value for the y-coordinate
will be taken from the first point which will be cut-out.

I modify your code at the following lines:
                elseif xx3 < xx1
% modified/add lines
% compute intersection point
                    X3(i) = xx1; xp = xx1;
                    yp = interp1([xx3, xx4], [yy3, yy4], xx1, 'linear', 'extrap');
                    Y3(i) = yp;
%r Original code
% X3(i) = xx1; xp = xx1; yp = yy3;
                elseif xx4 < xx1
% modified/add lines
% compute intersection point
                    X4(i) = xx1; xp = xx1;
                    yp = interp1([xx3, xx4], [yy3, yy4], xx1, 'linear', 'extrap');
                    Y4(i) = yp;
% Original code
% X4(i) = xx1; xp = xx1; yp = yy4;

and:
                elseif xx3 > xx1
% modified/add lines
% compute intersection point
                    xp = interp1([yy3, yy4], [xx3, xx4], yy1, 'linear', 'extrap');
                    X3(i) = xp; yp = yy3;
% Original code
% X3(i) = xx1; xp = xx1; yp = yy3;
                elseif xx4 > xx1
% modified/add lines
% compute intersection point
                    xp = interp1([yy3, yy4], [xx3, xx4], yy1, 'linear', 'extrap');
                    X4(i) = xp; yp = yy4;
% Original code
% X4(i) = xx1; xp = xx1; yp = yy4;

I hope that this would be a helpful comment for you.

06 May 2008 Showroom Revolves a 3D plot showroom-style Author: Jasper Menger V, A

Nice, Clean and Simple !

09 Nov 2006 xLOGy Generalized logarithm Author: Jasper Menger D'Errico, John

The documentation and the help both suggest that xlogy(1,y) is defined as 1. This makes no sense, and it is also inconsistent with the code itself, since xlogy(1,y) actually returns 0 in this code.

Perhaps a better choice for xlogy(1,y) should be +/- inf., depending on the magnitude of y, with xlogy(1,1) == 0.

15 Oct 2006 Showroom Revolves a 3D plot showroom-style Author: Jasper Menger Roering, J

nice, simple, works perfectly!
Thanks!

Top Tags Applied by Jasper
3d, data exploration, directories, files, fly
Files Tagged by Jasper View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
07 Jan 2010 Screenshot cutpolygon Cut alias slice alias split a 2D surface polygon by a line, and remove the specified part. Author: Jasper Menger polygon surface line ... 15 2
  • 4.0
4.0 | 1 rating
15 Nov 2006 xLOGy Generalized logarithm Author: Jasper Menger log logarithm general... 3 4
  • 3.0
3.0 | 1 rating
12 Dec 2005 Screenshot codecount Counts the total number of code lines of all the M-files in a directory Author: Jasper Menger directories, count, mfiles, code, directory, path 5 1
  • 3.0
3.0 | 1 rating
30 Nov 2005 Screenshot Showroom Revolves a 3D plot showroom-style Author: Jasper Menger fly, plot, revolve, 3d, showroom, turn around 5 6
  • 5.0
5.0 | 4 ratings
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com