Prev: Random matrix with boundaries
Next: bar plots
From: mins alaa on 12 Apr 2010 06:51 I am stuck in a part of a project I'm doing I need some matlab code to allow the user to click any number of points mean while drawing a triangle after any three clicked points. i.e. the clicked points should be the corners of the triangle. Also to allow the user to keep clicking so for each three points clicked a different triangle should be plotted. i.e. if the user clicks nine points, three triangles should be plotted
From: Luca Balbi on 12 Apr 2010 07:45 I'm not sure if that was what you meant, in my opinion with 9 points more than 3 triangles should come out... Is this what you expect with 9 points? [x,y] = ginput(9); TRI = delaunay(x,y); triplot(TRI,x,y,'red');
From: abdullah on 13 Apr 2010 11:18 use this : while 1 [x,y] = ginput(3); TRI = delaunay(x,y); triplot(TRI,x,y,'-'); hold all end P.S. i hope u r not a GUC student ;)
|
Pages: 1 Prev: Random matrix with boundaries Next: bar plots |