Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mgl:functionreferencedrawing [2009/06/11 01:21]
127.0.0.1 external edit
mgl:functionreferencedrawing [2010/07/24 23:15] (current)
Line 24: Line 24:
 ===== mglPoints2: 2D points ===== ===== mglPoints2: 2D points =====
  
-**purpose:​** plot 2D points on an OpenGL screen opened with mglOpen\\ **usage:** mglPoints2(x,​y,​size,​color)+**purpose:​** plot 2D points on an OpenGL screen opened with mglOpen. For round dots, use mglGluDisk.\\ **usage:** mglPoints2(x,​y,​size,​color)
  
 ^ argument ^ value ^ ^ argument ^ value ^
 | x,y | position of dots on screen | | x,y | position of dots on screen |
-| size | size of dots (in pixels) |+| size | size of dots (height of square ​in pixels) |
 | color | color of dots | | color | color of dots |
  
Line 38: Line 38:
 ===== mglPoints3: 3D points ===== ===== mglPoints3: 3D points =====
  
-**purpose:​** plot 2D points on an OpenGL screen opened with mglOpen\\ **usage:** mglPoints2(x,​y,​z,​size,​color)+**purpose:​** plot 3D points on an OpenGL screen opened with mglOpen\\ **usage:** mglPoints2(x,​y,​z,​size,​color)
  
 ^ argument ^ value ^ ^ argument ^ value ^
Line 51: Line 51:
  
 \\ \\
- 
 ===== mglLines2: 2D lines ===== ===== mglLines2: 2D lines =====
  
-**purpose:​** mex function to plot lines on an OpenGL screen opened with glopen\\ **usage:** mglLines(x0,​ y0, x1, y1,​size,​color,<​bgcolor>​)+**purpose:​** mex function to plot lines on an OpenGL screen opened with glopen\\ **usage:** mglLines(x0,​ y0, x1, y1,​size,​color)
  
 ^ argument ^ value ^ ^ argument ^ value ^
 | x0,y0 | initial position of line | | x0,y0 | initial position of line |
-x0,y0 | end position of line |+x1,y1 | end position of line |
 | size | size of line (in pixels) | | size | size of line (in pixels) |
 | color | color of line | | color | color of line |
-| bgcolor | background color of line | 
  
   mglOpen   mglOpen
Line 74: Line 72:
 ^ argument ^ value ^ ^ argument ^ value ^
 | x,y | center position of oval | | x,y | center position of oval |
-| size | [width height] of oval |+| size  | [width height] of oval |
 | color | color of oval | | color | color of oval |
  
Line 106: Line 104:
 ===== mglFixationCross:​ Cross ===== ===== mglFixationCross:​ Cross =====
  
-**purpose:​** draws a fixation cross with no arguments, draws a fixation cross at origin (default width 0.2 with linewidth 1 in white at [0,0])\\ **usage:** mglFixationCross([width],​ [linewidth],​ [color], [origin]);​\\ **alternate usage:** mglFixationCross( params )+**purpose:​** draws a fixation cross. With no arguments, draws a fixation cross at origin (default width 0.2 with linewidth 1 in white at [0,0])\\ **usage:** mglFixationCross([width],​ [linewidth],​ [color], [origin]);​\\ **alternate usage:** mglFixationCross( params )
  
 ^ argument ^ value ^ ^ argument ^ value ^
Line 132: Line 130:
 | nloops | number of annuli used in polygon->​circle approximation [default 1] | | nloops | number of annuli used in polygon->​circle approximation [default 1] |
  
-  ​mglOpen(0);​ +   mglOpen(0);​ 
-  mglVisualAngleCoordinates(57,​[16 12]); +   ​mglVisualAngleCoordinates(57,​[16 12]); 
-  x = zeros(10, 1); +   ​x = zeros(4, 1); 
-  y = zeros(10, 1); +   ​y = zeros(4, 1); 
-  isize = ones(10,1+   ​isize = linspace(1, 8, 4); 
-  osize = 3*ones(10,1); +   osize isize+linspace(0.124); 
-  ​startAngles ​= linspace(0,18010) +   ​colors = jet(4)'; 
-  sweepAngles = ones(1,​10).*10+   mglGluAnnulus(x, y, isize, osize,​colors , 60, 2); 
-  colors = jet(10)'; ​% nb! transpose +   ​mglFlush(); 
-  ​mglGluPartialDisk(x, y, isize, osize, startAngles,​ sweepAngles, colors, 60, 2); + 
-  mglFlush();+\\
  
 ===== mglGluDisk: Circular dots ===== ===== mglGluDisk: Circular dots =====
Line 150: Line 148:
 ^ argument ^ value ^ ^ argument ^ value ^
 | x,y | position of dots | | x,y | position of dots |
-| size | size of dots |+| size | size of dots (radius) ​|
 | color | color of dots | | color | color of dots |
 | nslices | number of wedges used in polygon->​circle approximation [default 8] | | nslices | number of wedges used in polygon->​circle approximation [default 8] |
Line 221: Line 219:
   mglQuad([100;​ 600; 600; 100], [100; 200; 600; 100], [1; 1; 1], 1);   mglQuad([100;​ 600; 600; 100], [100; 200; 600; 100], [1; 1; 1], 1);
   mglFlush();   mglFlush();
- 
-