Keywords: Extreme points illustration.png en wikipedia Maksim page en wikipedia Extreme points svg Created with MATLAB Source code in MATLAB <syntaxhighlight lang matlab > function main clf; hold on; axis equal; axis off; prepare the screen linewidth 3; i sqrt -1 ; N 50; height 0 3; V ; M ; initialize variables white 0 99 1 1 1; red 1 0 0; lightblue 135 206 250/256; Z 0 1 0 5+i sqrt 3 /2 0; L length Z ; V M corner N V M Z L Z 1 Z 2 height ; for k 2 L-1 V M corner N V M Z k-1 Z k Z k+1 height ; end V M corner N V M Z L-1 Z L Z 1 height ; H fill real V imag V lightblue ; set H 'LineWidth' linewidth/2 'EdgeColor' lightblue for k 1 L W M k ; plot W 'color' red 'linewidth' linewidth end force the window to be a bit bigger than the picture Winxmin min real V ; Winxmax max real V ; Winymin min imag V ; Winymax max imag V ; bd 0 1; plot Winxmin-bd Winymin-bd 'color' white ; plot Winxmax+bd Winymax+bd 'color' white ; saveas gcf 'Extreme_points_illustration eps' 'psc2' make a rounded corner at b with edges going towards a and c all complex numbers function V M corner N V M a b c height i sqrt -1 ; v -i height b-a /abs b-a ; w -i height c-b /abs c-b ; theta1 atan2 imag v real v ; theta2 theta1+atan2 imag w/v real w/v ; Theta linspace theta1 theta2 N ; C b+height exp i Theta ; M M' C; V V C; </syntaxhighlight> 1 date/time username edit summary ---- 06 32 21 November 2005 en User Oleg Alexandrov <nowiki> <span class autocomment ><a href /wiki/Image Extreme_points_illustration png Source_code_in_MATLAB title Image Extreme points illustration png > †’</a>Source code in <a href /wiki/MATLAB title MATLAB >MATLAB</a></span> </nowiki> ---- 01 33 21 November 2005 en User Oleg Alexandrov <nowiki> +source code </nowiki> ---- 01 30 21 November 2005 en User Oleg Alexandrov <nowiki /> Original upload log Legend cur this is the current file del delete this old version rev revert to this old version Click on date to download the file or see the image uploaded on that date del cur 01 30 21 November 2005 en User Oleg Alexandrov Oleg Alexandrov en User talk Oleg Alexandrov Talk 427x396 10734 bytes Convex hull Files by User Oleg Alexandrov from en wikipedia Images with Matlab source code |