Rank: 6090 based on 12 downloads (last 30 days) and 1 file submitted
photo

John Anderson

E-mail
Company/University
sussex university

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by John
Updated   File Tags Downloads
(last 30 days)
Comments Rating
14 Dec 2005 Figure Window Always on Top Avoid obscuring figure windows by ensuring they always remain on top. Author: John Anderson annotation, customization, window on top, mex, floating, graphics 12 10
  • 4.0
4.0 | 8 ratings
Comments and Ratings by John
Updated File Comments Rating
24 Feb 2014 geom3d Library to handle 3D geometric primitives: create, intersect, display, and make basic computations Author: David Legland

Hi David, great submission,

I think I have noticed a slight problem with calls to intersectPlaneMesh.m and wasn't sure if this had previously been flagged.

When I exectue the following to calculate the intersection of a plane with a sphere I find that when N = 10 I get the error

Error using horzcat
Dimensions of matrices being concatenated are not consistent.

Error in intersectPlaneMesh (line 85)
polyEdgeInds = [polyEdgeInds currentEdgeIndex]; %#ok<AGROW>

Error in testIntersectingMesh1 (line 27)
polys = intersectPlaneMesh( plane, vertices, faces );

However, when N=15 there are no exectuion problems

Code:

% create a plane
plane = createPlane( [ 0 0 0 ], [ 0 1 1 ] );

% create sphere
N = 10;
[ x, y, z ] = sphere( N );

% triangulation
tri = DelaunayTri( x(:), y(:), z(:) );

%vertices
vertices = tri.X;

%faces forming convex hull
faces = convexHull( tri );

cla;
% draw solid
patch( 'Vertices', vertices, 'Faces', faces, 'facecolor', 'y', 'edgecolor', 'y', 'facealpha', 0.1 );
hold on;

% intersecting polygon
polys = intersectPlaneMesh( plane, vertices, faces );

% draw polygon
drawPolygon3d(polys, 'color', 'b', 'LineWidth', 2);

% fill polygon
fillPolygon3d( polys, 'r', 'faceAlpha', 0.2 );

Best wishes,

Comments and Ratings on John's Files View all
Updated File Comment by Comments Rating
18 Jun 2013 Figure Window Always on Top Avoid obscuring figure windows by ensuring they always remain on top. Author: John Anderson Igor

I've just uploaded another submission to do the same job, but based on java calls. (See "Acknowledgements" section above.)

07 Mar 2011 Figure Window Always on Top Avoid obscuring figure windows by ensuring they always remain on top. Author: John Anderson Lehmann, Eckhard

Great way to make windows always visible! I wish this was built into core MATLAB and available on other platforms too.

I've created a small patch to the file that allows to use other window names than "Figure X", i.e. for GUIDE windows or named figures. The original Author might want to incorporate it into his version:

14c14,15
< char *windowName, n = 1;
---
> char *windowName, *ntSwitch, n = 1;
> mxArray *windowNameProp, *numberTitleProp; /* for getting the window name */
26,27d26
< windowName = mxCalloc(1, sizeof(figureHandle)+8);
< sprintf(windowName, "Figure %d", figureHandle);
30c29
< if( mexGet(figureHandle, "Visible") == NULL )
---
> if( mexGet(figureHandle, "Visible") == NULL ) {
32a32,48
> }
>
> windowNameProp = mexGet(figureHandle, "Name");
> windowName = mxArrayToString(windowNameProp);
>
> numberTitleProp = mexGet(figureHandle, "NumberTitle");
> ntSwitch = mxArrayToString(numberTitleProp);
> if (strcmp(ntSwitch, "on") == 0) {
> if (strlen(windowName) == 0) {
> windowName = mxCalloc(1, sizeof(figureHandle)+8);
> sprintf(windowName, "Figure %d", figureHandle);
> } else {
> char *wBuf = windowName;
> windowName = mxCalloc(1, sizeof(figureHandle)+10+strlen(windowName));
> sprintf(windowName, "Figure %d: %s", figureHandle, wBuf);
> }
> }

14 Sep 2010 Figure Window Always on Top Avoid obscuring figure windows by ensuring they always remain on top. Author: John Anderson Jesse

A better way is to use Actual Title Buttons in Windows!

http://www.actualtools.com/titlebuttons/download/

works for all windows and is free... :)

26 May 2010 Figure Window Always on Top Avoid obscuring figure windows by ensuring they always remain on top. Author: John Anderson Burgel, Joseph

Tried the example given above in:
MATLAB Version 7.5.0.342 (R2007b) windows XP and got:
figure(1);
winontop('figure 1');
??? Error using ==> winontop
First input argument must be a figure handle

21 Nov 2007 Figure Window Always on Top Avoid obscuring figure windows by ensuring they always remain on top. Author: John Anderson Tagliasacchi, Andrea

Would be nice to see a multiplatform version.
As a matter of fact, they should include a stay on top command as figure property directly.

Contact us