source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/lightspeed/graphics/mobile_points.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 459 bytes
Line 
1function h = mobile_points(n, linespec)
2% Places n random points in the style given by linespec (e.g. 'bo').
3% Points can be dragged with the mouse.
4
5if nargin < 2
6  linespec = 'o';
7end
8ax = axis;
9% random placement
10x = rand(1,n)*(ax(2)-ax(1)) + ax(1);
11y = rand(1,n)*(ax(4)-ax(3)) + ax(3);
12h = [];
13for i = 1:n
14  h = [h line(x(i), y(i), 'linestyle', 'none')];
15end
16set_linespec(h,linespec);
17set(h, 'ButtonDownFcn', 'move_obj(1)');
18if nargout < 1
19  clear h;
20end
Note: See TracBrowser for help on using the repository browser.