ë 12 ‡ 'î … î … ‡:î:ï4:ñ ö$;" at line ";ž:à  <ô Graphical display of iterative image alignment in HTML +ô by Jon Ribbens . +ô This program is in the Public Domain.  6ô Set the height and depth of the text in the line  textmin%=0 textmax%=32  obmax%=8:ob%=0 2Þ ob$(obmax%),obmin%(obmax%),obheight%(obmax%) ã i%=1 ¸ obmax% - ob$(i%)="":obmin%(i%)=0:obheight%(i%)=0 í i%  Aô Add some objects - T is top, B is absbottom, M is absmiddle  òaddob("M",160) òaddob("T",128) òaddob("T",96) òaddob("T",64) òaddob("T",48) òaddob("T",32)  õ  Û  % ô Display the current situation ! "2 æ1:È“ È 0,textmin%+512,56,textmax%-textmin% # ï5 $ ã i%=1 ¸ ob% %: æ7:È“ È i%*128-64,obmin%(i%)+512,56,obheight%(i%) &9 æ1:È“ È i%*128,textmin%+512,56,textmax%-textmin% '7 æ0:ì i%*128-64+20,obmin%(i%)+512+32:ñ ;ob$(i%); (2 ì i%*128-64,obmin%(i%)+obheight%(i%)2+512 )8 ð 21,i%*128-64+56,obmin%(i%)+obheight%(i%)2+512 * í i% + ï4:‡ , -3 ô Show the top, middle and bottom of the line . // æ7:ì 0,¤min(0)+512-8:ß 1280,¤min(0)+512-8 0, ì 0,¤max(0)+512+8:ß 1280,¤max(0)+512+8 1* ì ob%*128+64,(¤min(0)+¤max(0))2+512 2' ð 21,1280,(¤min(0)+¤max(0))2+512 3 41 ô Display the current situation numerically 5 6& ñ "min=";¤min(0);" max=";¤max(0) 7 ã i%=1 ¸ ob% 89 ñ ;i%;" ";obmin%(i%);" ";obmin%(i%)+obheight%(i%) 9 í i% : K%=¥ ; <( ô Recalculate the object positions = > done%=¹ ? ã i%=1 ¸ ob% @6 newmin%=obmin%(i%):min%=¤min(i%):max%=¤max(i%) A ÈŽ ob$(i%) Ê B É "B" : ô absbottom C newmin%=min% D É "M" : ô absmiddle E4 newmin%=min%+(max%-min%)2-obheight%(i%)2 F É "T" : ô top G$ newmin%=max%-obheight%(i%) H Ë I: ç newmin%<>obmin%(i%) Œ obmin%(i%)=newmin%:done%=£ J í i% K ý done% L ñ "Done" Mî Nà O PCô min returns the minimum Y coordinate, not counting object ig% Q RÝ ¤min(ig%) Sê i%,min%,max% T min%=textmin% U max%=textmax% V ã i%=1 ¸ ob% W ç i%<>ig% Œ X- ç obmin%(i%)max% Œ max%=obmin%(i%)+obheight%(i%) Z Í [ í i% \ =min% ] ^Cô max returns the maximum Y coordinate, not counting object ig% _ `Ý ¤max(ig%) aê i%,min%,max% b min%=textmin% c max%=textmax% d ã i%=1 ¸ ob% e ç i%<>ig% Œ f- ç obmin%(i%)max% Œ max%=obmin%(i%)+obheight%(i%) h Í i í i% j =max% k l9ô addob adds an object, alignment ob$, height height% m nÝ òaddob(ob$,height%) oê min%,max% p+ ç ob%=obmax% Œ … 1,"Too many objects" q min%=¤min(0):max%=¤max(0) r ob%+=1 s ob$(ob%)=ob$ t obheight%(ob%)=height% u obmin%(ob%)=0 v ÈŽ ob$ Ê w É "B" : ô absbottom x obmin%(ob%)=min% y É "M" : ô absmiddle z0 obmin%(ob%)=min%+(max%-min%)2-height%2 { É "T" : ô top | obmin%(ob%)=max%-height% } Ë ~á ÿ