Journal

/A/ /M/A/G/N/I/F/I/C/E/N/T/ /P/L/A/C/E/ 

May 2010

23:58 Thursday 20 May 2010

Freespace Grid

The short version: I've been working on some code, here's a video showing what it does http://www.youtube.com/watch?v=SPOQBnrUp3g

In my previous journal entry rectangular areas of free space I wrote about how I was developing an algorithm which tracked areas of free space within a 128 x 128 grid, after tests using a different algorithm (taken from the Fluxbox window manager) failed to perform for the worst-case-scenario in a real time context.

That was almost exactly a month ago. In the time since, I coded up that algorithm to a semi-working state. I had the basic cases working, but there were far more complex cases which I had not managed to appreciate the complexity of until I was at the stage where they needed to be coded. Basically, the algorithm needed to split the areas of free space when an area was requested, and it had to do so while ensuring that each area of free unused space had only one single directly adjacent area of free space per side. I made the mistake of making many assumptions about the algorithm from only giving it simple cases to work with.

However, while testing the unfinished implementation I was playing around with how I displayed what it was doing and hit upon the idea of filling the boxes with text from a file. I'm not feeling inclined to show the first text I did this with, but here's a one line text file boxed up, with the single line of text repeated.

Feel free to scroll on down past it, it's quite long, and there's more I have to tell here...

  198.                                          163. arty you'vecrashe
  y yo                                          d my party you've cras
  u've 181. u've cras  175. party you've crashe hed my party you've cr
   cra hed my party y  d my party you've crashe ashed my party you've
  shed ou've crashed   d my party you've crashe crashed my party you'v
   myp my party you'v                           e crashed my party you
  arty e crashed my p 169. ed my party you've c 've crashed myparty yo
   you arty you've cr rashed my party you'vecra u've crashed my party
                      shed my party you've cras you've crashed my part
 170. ed my party yo  hed my party you've crash y you've crashed my pa
 u've crashed my par                            rty you've crashed my
 ty you've crashed m 166. ou've crashed my part party you've crashed m
 y party you've cras y you've crashed my party  y party you'vecrashed
 hed myparty you've  you've crashed my party yo my party you've crashe
 crashed my party yo                            d my party you've cras
 u've crashed my par   161. you've crashed      hed my party you've cr
 ty you've crashed m   my party you've cras     ashed my party you've
 y party you've cras   hed my party you've
 hed my party you've   crashed my party you 160.  party you'vecrashed
  crashed my party y   've crashed my party my party you've crashed my
 ou'vecrashed my par    you've crashed my p  party you've crashed my p
 ty you've crashed m   arty you've crashed  arty you've crashed my par
 y party you've cras   my party you've cras ty you've crashed my party
 hed my party you've   hed my party  you've  you've crashed myparty yo
                        crashed my party yo u've crashed my party you'
    167. u'vecrashed m u've crashed my part ve crashed my party you've
    y party you've cra y you've crashedmy p  crashed my party you've c
    shed my party you' arty you've crashed  rashed my party you've cra
    ve crashed my part my party you've cras shed my party you'vecrashe
    y you've crashed m hed my party you've  d my party you've crashed
    y party you've cra crashed my party you my party you've crashed my
    shed my party you' 've crashed my party  party you've crashed my p
                                            arty you've crashed my par
        158.  you've crashed my       201.  ty you've crashed myparty
   179. party you've crashed my       my pa
   part party you've crashed my       rty y   159. ty you've crashed m
   y yo party you've crashed my               y party you've crashed m
   u've party you've crashed my  177. you've  y party you've crashed m
    cra party you'vecrashed my p crashed my p y party you've crashed m
   shed arty you've crashed my p arty you've  y party you've crashed m
    my  arty you've crashed my p crashed my p yparty you've crashed my
   part arty you've crashed my p arty you've   party you've crashed my
   y yo arty you've crashed my p crashed my p  party you've crashed my
   u've arty you've crashed mypa arty you've   party you've crashed my
    cra rty you've crashed my pa crashed my p  party you've crashed my
   shed rty you've crashed my pa
    my  rty you've crashed my pa 157. ou've crashed my 186.  party  yo
   part rty you've crashed my pa  party you've crashed u've crashed my
        rty you've crashed my pa  my party you've cras  party you've c
  178.  rty you'vecrashed my par hed myparty you've cr rashed my party
  arty                           ashed my party you've
  you'v    172.156. shed my part  crashed my party you  171.  crashed
  ecras    y y y you've crashed  've crashed my party   my party you'v
  hed m    ou' my party you've c you've crashed my par  e crashed my p
  y par    ve  rashed my party y ty you've crashed my   arty you've cr
  ty yo    cra ou've crashed my  party you'vecrashed m  ashed myparty
  u've     she party you've cras y party you've crashe  you've crashed
  crash    d m hed myparty you'v d my party you've cra   my party you'
  ed my    y p e crashed my part shed my party you've   ve crashed my
   part    art y you've crashed  crashed my party you'  party you've c
  y you    y y my party you've c ve crashed my party y  rashed my part
  've c    ou' rashed my party y ou've crashed myparty
  rashe    ve  ou've crashed my                        155.  you've cr
  d my     cra party you've cras 152. ashed my party y ashed my party
           she hed my party you' ou've crashed my part you've crashed
   168. v  d m vecrashed my part y you've crashed my p my party you've
   e cras  y p y you've crashed  arty you'vecrashed my  crashed my par
   hed my  art my party you've c  party you've crashed ty you've crash
   party   y y rashed my party y  my party you've cras ed my party you
   you've                        hed my party you've c 'vecrashed my p
    crash 149.  my party you'    rashed my party you'v arty you've cra
   ed my  ve crashed my party    e crashed my party yo
   party   you've crashed my     u've crashed myparty  148. rashed my
   you've party you've crashe    you've crashed my par party you've cr
    crash d my party you've c    ty you've crashed my  ashed my party
   ed my  rashed my party you    party you've crashed  you've crashed
   party  'vecrashed my party    my party you've crash my party you've
   you've  you've crashed my     ed my party you've cr crashed my part
    crash party you've crashe    ashed my party you've y you've crashe
   ed my  d my party you've c     crashed my party you d my party you'
   party  rashed my party you    've crashed my party  ve crashed my p
   you've 've crashed my part                          arty you've cra
    crash y you've crashed my 147. ashed my party y    shed my party y
                              ou've crashed my part    ou've crashed m
      144. d my party you'v   y you've crashed my p    y party you've
      e crashed my party yo   arty you've crashed m    crashed myparty
      u've crashed my party   yparty you've crashed     you've crashed
 190.  you've crashed my pa    my party you've cras
 ve c rty you'vecrashed my    hed my party you've c 146. crashed my pa
 rash party you've crashed                          rty you've crashed
 ed m my party you've crash 143. u've crashed my pa  my party you've c
 y pa ed my party you've cr rty you've crashed my p rashed my party yo
 rty  ashed my party you've arty you'vecrashed my p u'vecrashed my par
 you'  crashed my party you arty you've crashed my  ty you've crashed
 ve c 've crashed myparty y party you've crashed my my party you've cr
 rash ou've crashed my part  party you've crashed m
                            y party you've crashed  142.  crashed my p
 140. e crashedm 196. ashed my party you've crashed arty you've crashe
 y party you've   my party   myparty you've crashed d my party you've
 crashed my part you've cra  my party you've crashe crashed myparty yo
 y you've crashe                                    u've crashed my pa
 d my party you' 139. u've crashed my               rty you've crashed
 ve crashed my p party you've crashed  138. ty yo    my party you've c
 arty you've cra my party  you've cras u've crash   rashed my party yo
 shed my party y hed my party you've c ed my part
 ou've crashed m rashed my party you'v y you've c 137. ty yo
                                       rashed my  u've crash
   141. y 133. ashed my party y        party you' ed my part 136. cras
    party ou've crashed my part        ve crashed y you've c hed my pa
    you'v y you've crashed my p  192.   my party  rashed my  rty you'v
   ecrash arty you've crashed m  ou've you've cra party you' e crashed
   ed my  y party you'vecrashed  crash shed my pa ve crashed  my party
   party   my party you've cras  ed my rty you've  my party   you've c
   you've hed my party you've c   part  crashed m you've cra rashed my
    crash rashed my party you'v  y you y party yo shed mypar  party yo
   ed my  e crashed my party yo                              u've cras
   party  u've crashed my party 132. ed my party you've      hed my pa
   you've  you've crashed mypar crashed my party you've      rty you'v
    crash ty you've crashed my  crashed my party you've  200.e crashed
   ed my  party you've crashed  crashed my party you'vec ty   my party
   party  my party you've crash rashed my party you've c you  you'vecr
   you've ed my party you've cr rashed my party you've c 've ashed my
                                rashed my party you've c  cr party you
 135. e 130.  cras 187.  you've rashed my party you've c ash 've crash
  crash hed my par  crashedmy p rashed my party you've c ed  ed my par
 ed my  ty you've  arty you've  rashed myparty you've cr
 party  crashed my crashed my p ashed my party you've cr 131. ve
 you've  party you                                        crashe 127.
  crash 've crashe 126. my party you'v     176. d mypart d my pa you'v
 ed my  d my party e crashed my party      y you've cras rty you e cra
 party   you'vecra you've crashed mypa     hed my party  've cra shed
 you've shed my pa rty you've crashed                    shed my my pa
  crash rty you've my party you've cra  134. ashed my pa party y rty y
 ed my   crashed m shed my party you'v  rty you've crash ou've c ou've
 party  y party yo e crashed my party   ed my party you' rashed   cras
 you've u've crash you've crashed my p  vecrashed my par my part hed m
  crash ed my part arty you've crashed  ty you've crashe y you'v y par
 ed myp y you've c  my party you'vecra  d my party you'v e crash ty yo
 arty y rashed my  shed my party you'v                           u've
 ou've  party you' e crashed my party  125.  crashed my party    crash
                                       you've crashed my party   ed my
    122. y party you've 119.   180.     you've crashedmy party    part
     crashed my party y y yo   y y 174. you've crashed my part   y you
    ou've crashed my pa u've   ou' par y you've crashed my par   've c
    rty you've crashed   cra   ve  ty  ty you've crashed my pa   rashe
    myparty you've cras shed   cra you rty you've crashed my p
    hed my party you've  my    she 've arty you've crashed my  121. ra
     crashed my party y part   d m  cr party you'vecrashed my  shed my
    ou've crashed my pa y yo   ypa ash party you've crashed my  party
    rty you've crashed  u've   rty ed   party you've crashed m you'vec
    my party you've cra  cra    yo my  y party you've crashed  rashed
    shed my party you'v shed                                   my part
                         my  116. crashed my party 164. crashe y you'v
    120. arty you've cr part  you've crashed my pa d my party  e crash
    ashed my party you' y yo rty you've crashed my you've cras ed my p
    ve crashed my party u've  party you've crashed hed myparty arty yo
     you've crashed my   cra  my party you've cras  you've cra u've cr
    party you've crashe shed hed my party you've c shed my par ashed m
    d my party you've c  myp rashed myparty you've
                              crashed my party you 114. party you've c
   118. party you've crashed 've crashed my party  rashed my party you
    my party you've crashed  you've crashed my par 'vecrashed my party
   my party you've crashed m ty you've crashed my   you've crashed my
   y party you've crashed my party you've crashed  party you've crashe
    party you've crashed my  my party you'vecrashe d my party you've c
   party you'vecrashed my pa d my party you've cra rashed my party you
   rty you've crashed my par shed my party you've  've crashed my part
   ty you've crashed my part crashed my party you' y you've crashed my
                             ve crashed my party y party you've crashe
 128.113.  my party  195.  p ou've crashed my part d my party you've c
 d m  you've crashe  arty yo                       rashed my party you
 ypa d my party you  u've cr          112. e cra   've crashed my part
 rty 've crashed my                   shed my pa
  yo  party you've    173. ou'vecrash rty you've   109. hed my party y
 u'v crashed my par   ed my party you  crashed m   ou've crashed my pa
 e c ty you've cras   've crashed my  yparty you   rty you've crashed
 ras hed my party y                   've crashe   my party you've cra
 hed ou've crashed  110. par   191. e d my party   shed my party you'v
  my myparty you've ty you'v   d my p  you've cr   e crashed my party
  pa  crashed my pa e crashe   arty y ashed my p    you've crashed my
 rty rty you've cra d my par          arty you'v   party you've crashe
  yo shed my party  ty you'v 107. ou  e crashed    d my party you've c
 u'v you've crashed e crashe 'vecras  my party y   rashedmy party you'
 e c  my party you' d my par hed my   ou've cras   ve crashed my party
 ras ve crashed my  ty you'v party y  hed my par    you've crashed my
                    e crashe ou've c  ty you've
   106. e crash 199.d my par rashed   crashed my 108. ashed my party y
   ed my party  've ty you'v my part   party you ou've crashed my part
   you've crash  cr ecrashed y you'v  'vecrashed y you've crashed mypa
   ed my party  ash  my part e crash             rty you've crashed my
   you've crash ed  y you've ed my p 104. hed my  party you've crashed
   ed myparty y my   crashed arty yo  party you'  my party you've cras
   ou've crashe par  my part u've cr ve crashed
   d my party y                      my party yo 103.  you've crashed
   ou've crashe 105.  party you've c u've crashe my party you've crash
   d my party y rashed my party you' d my party  ed my party you've cr
   ou've crashe ve crashed my party  you've cras ashed myparty you've
   d my party y you've crashed my pa hed my part crashed my party you'
   ou've crashe rty you'vecrashed my y you've cr ve crashed my party y
   d my party y  party you've crashe ashed mypar ou've crashed my part
   ou've crashe d my party you've cr ty you've c y you've crashed my p
   d my party y ashed my party you'v rashed my p arty you've crashed m
                                     arty you've y party you'vecrashed
   185. 102. ed myparty you've cra    crashed my  my party you've cras
   d my shed my party you've crash
    par ed my party you've crashed 101. rty you've crashed m  189.  pa
   ty y  my party you've crashed m y party you've crashed my  rty you'
   ou'v y party you've crashed my   party you'vecrashed my p  ve crash
   e cr party you'vecrashed my par arty you've crashed my pa  ed my pa
   ashe ty you've crashed my party rty you've crashed my par  rty you'
   d my  you've crashed my party y ty you've crashed my part
        ou've crashed my party you y you've crashed my party 98. my pa
 115.   've crashed my party you'v  you've crashed myparty y rty you'v
 y yo   e crashed myparty you've c ou've crashed my party yo e crashed
 u've   rashed my party you've cra u've crashed my party you  my party
  cra   shed my party you've crash 've crashed my party you'  you've c
 shed   ed my party you've crashed ve crashed my party you'v rashed my
  my     my party you've crashed m e crashed my party you've  party yo
 part   y party you'vecrashed my p crashed my party you've c u've cras
 y yo   arty you've crashed my par rashed my party you've cr hed my pa
 u've   ty you've crashed my party ashed my party you've cra rty  you'
  cra                              shed my party you've cras ve crashe
 shed 97. ashed myparty you        hed my party you've crash d my part
  my  've crashed my party
 part you've crashed my par 93. party you've c 91. y party you've cras
 y yo ty you've crashed my  rashed my party yo hed my party you've cra
 u've party you've crashed  u've crashed my pa shed my party you've cr
                            rty you've crashed ashed my party you've c
   95. shed my party you've  my party you'vecr rashed my party you've
    crashed my party you've ashed my party you crashed myparty you've
   crashed my party you've  've crashed my par crashed my party you've
   crashed my party you've  ty you've crashed   crashed my party you'v
   crashed my party you've  my party you've cr e crashed my party you'
   crashed my party you've  ashed my party you ve crashed my party you
                                               've crashed my party yo
       94. 've cr 87. my part                  u'vecrashed my party yo
       ashed my p y you've cr 153.  you've cra u've crashed my party y
       arty you'v ashed my pa shed my party yo ou've crashed my party
  154. e crashed  rty you'vec u've crashed my  you've crashed my party
  shed myparty yo rashed my p party you've cra  you've crashed my part
  my p u've crash arty you've                  y you've crashed mypart
  arty ed my part  crashed my 111. y you've c  y you've crashed my par
   you y you've c  party you' rashed my party
  've  rashed my  ve crashed   you've crashed 84.  party you've crashe
  cras party you' my party yo  my party you'v d my party you've crashe
  hed  ve crashed u've crashe                 d my party you've crashe
  my p  my party  d my party  86. ed my party d my party you've crashe
  arty you've cra you've cras  you've crashed d my party you've crashe
                               my party you'v d my party you'vecrashed
   90. rty  85. my party      e crashed mypar  my party you've crashed
    you've   you've cras      ty you've crash  my party you've crashed
    crashe  hed my party      ed my party you  my party you've crashed
   d my pa   you've cras 197. 've crashed my   my party you've crashed
   rty you  hed my party shed party you've cr  my party you've crashed
   've cra   you've cras  my  ashed my party   myparty you've crashed
   shed my  hed my party part you've crashed  my party you've crashed
    party    you'vecrash
   you've   ed my party  80. d my party you've c
   crashed  you've crash rashed my party you've
    my par  ed my party  crashed my party you've
   ty you'  you've crash  crashed my party you'v 79. party you've cras
   ve cras  ed my party  e crashed myparty you'v hed myparty you've cr
   hed my   you've crash e crashed my party you' ashed my party you've
   party y               ve crashed my party you  crashed my party you
   ou'vecr 81.  yo 193.  've crashed my party yo 've crashed my party
   ashed m u've cr 've c u've crashed my party y you've crashed my par
           ashed m rashe ou've crashed my party  ty you've crashed my
 82. u've  y party d my  you'vecrashed my party  party you'vecrashed m
 crashed m  you've party you've crashed my party y party you've crashe
 y party y  crashe
 ou've cra d my pa    78. hed my party you'vecra 76. y you've crashed
 shed my p rty you    shed my party you've crash my party you've crash
 arty you' 've cra    ed my party you've crashed ed my party you've cr
 ve crashe shed my     my party you've crashed m ashed my party you've
 d my part  party     y party you've crashed my   crashed my party you
 y you've  you've
 crashed m crashed 69. e crashed            74. y party you've crashed
 y party y  mypart my party you'v            my party you've crashed m
 ou've cra y you'v ecrashed my pa           y party you'vecrashed my p
 shed my p e crash rty you've cra 188. arty arty you've crashed my par
 arty you' ed my p shed my party   you've c ty you've crashed my party
 ve crashe arty yo you've crashed rashed my  you've crashed my party y
                    my party you'
 71. ou'vecrashed  ve crashed my  68. arty you've crashed m
 my party you've c party you've c y party you've crashed my 83. d my p
 rashed my party y rashed my part  party you'vecrashed my p arty  you'
 ou've crashed my  y you've crash arty you've crashed my pa ve crashed
 party you've cras ed myparty you rty you've crashed my par  my party
 hed my party you' 've crashed my ty you've crashed my part you've cra
 ve crashed my par  party you've  y you've crashed my party shed my pa
 ty you've crashed crashed my par  you've crashed myparty y rty you've
                                  ou've crashed my party yo  crashedmy
    65. my party you'v   184. par u've crashed my party you
    e crashed my party   ty you'v 've crashed my party you' 67. party
     you've crashed my   e crashe ve crashed my party you'v you've cra
     party you'vecrash                                      shedmy par
    ed my party you've 64.  myparty you've crashe           ty you've
     crashed my party  d my party you've crashed            crashed my
    you've crashed my  my party you've crashed my    124.    party you
    party you've crash  party you've crashed my p    crashe 've crashe
    ed my party you've arty you've crashed my par    d my p d my party
     crashed my party  ty you'vecrashed my party     arty    you've cr
    you've crashed myp you've crashed my party yo    you've ashed my p
    arty you've crashe u've crashed my party you'
    d my party you've  ve crashed my party you've 63. ty you've crashe
    crashed my party y  crashed my party you've c d my party you've cr
    ou've crashed my p rashed myparty you've cras ashed my party you'v
    arty you've crashe hed my party you've crashe e crashed my party y
    d my party you've  d my party you've crashed  ou've crashed my par
                                                  ty you've crashed my
   66. crashed my 61. ou've crashed my par         party you'vecrashed
    party you've  ty you've crashed my par  123.   my party you've cra
   crashed my par ty you've crashed my par  e cra shed my party you've
   ty you've cras ty you'vecrashed my part  shed   crashed my party yo
   hed my party   y you've crashed my part  my pa u've crashed my part
   you've crashed y you've crashed my part  rty y y you've crashed my
    my party you' y you've crashed my part  ou've party you've crashed
   ve crashed my  y you've crashed my part
                  y you've crashed myparty 57. shed mypart  99. y you'
 100. c 62. you'v  you've crashed my party y you've crashe  ve crashed
 rashed e crashed  you've crashed my party d my party you'   my party
  my pa  my party  you've crashed my party ve crashed my p  you've cra
 rty yo  you've c  you've crashed my party arty you've cra  shedmy par
 u've c rashed my  you've crashed my party shed my party y  ty you've
 rashed  party yo  you'vecrashed my party  ou've crashed m
  my pa u've cras you've crashed my party  y party you've  56. y party
 rty yo hed mypar you've crashed my party  crashed my part  you've cra
 u've c                                    y you'vecrashed shed my par
 rashed  55. u've crashed m   89.  you've   my party you'v ty you'vecr
  my pa  y party you've cra   crashed mypa e crashed my pa ashed my pa
         shed my party you'   rty you've c rty you've cras rty you've
  60. yp ve crashed my part   rashed my pa hed my party yo crashed my
  arty y y  you've crashed                                 party you'v
  ou've  my party you've cr 54. vecrashed my 194.          e crashed m
  crashe ashed my party you  party you've cr  yo           y party you
  d my p 've crashedmy part ashed my party y u'v 72.  mypa 've crashed
  arty y y you've crashed m ou've crashed my e c rty you'v  my party y
  ou've  y party you've cra  party you've cr ras e crashed ou've crash
  crashe shed my party you' ashed my party y hed  my party ed my party
  d my p ve crashed my part ou've crashed my  my  you've c  you've cra
  arty y y you've crashed m  party you've cr
                            ashed myparty yo 51.  my party you've cras
 150.53.  party yo 75. ou'v u've crashed my  hed my party you'vecrashe
 par u've crashed  e crashe party you've cra d my party you've crashed
 ty  my party you' d my par shed my party yo  my party you've crashed
 you ve crashed my ty you'v u've crashed my  my party you've crashed m
 've party you've  e crashe party you've cra y party you've crashed my
  cr crashed my pa d mypart shed my party yo  party you've crashed myp
 ash rty you've cr                           arty you've crashed my pa
 ed  ashed my part   52. you'vecrashed my pa rty you've crashed my par
 my  y you've cras   rty you've crashed my p ty you've crashed my part
 par hed my party    arty you've crashed my  y you've crashed my party
 ty  you've crashe   party you've crashed my  you've crashed my party
 you d my party yo
 've u've crashed  49. ashed my 46. you've cr   182. ashed 165. ty you
  cr my party you'  party you'v ashed my part    my party  've crashed
                   e crashed my y you've cras   you've cra  my party y
  50. e cra 96. cr  party you'v hed my party
  shed mypa ashed  e crashed my you've crashe 45. you'vecrashed my par
  rty you'v my par  party you'v d my party yo ty you've crashed my par
  e crashed ty you e crashed my u've crashed  ty you've crashed my par
   my party 've cr  party you'v my party you' ty you've crashed my par
   you've c                     ve crashed my ty you've crashed my par
  rashed my 47. u've crashed my  party you've ty you've crashed mypart
   party yo  party you've crash crashed my pa y you've crashed my part
  u've cras ed myparty you've c rty you've cr y you've crashed my part
  hed my pa rashed my party you ashed my part y you've crashed my part
  rty you'v 've crashed my part y you've cras y you've crashed my part
  e crashed y you've crashed my hed my party  y you've crashed my part
                                you've crashe y you'vecrashed my party
  42. u've crashed my pa        d my party yo  you've crashed my party
  rty you've crashed myp                       you've crashed my party
  arty you've crashed my  151.59.   44. arty   you've crashed my party
   party you've crashed   ash you'v you've cr  you've crashed my party
  my party you've crashe  ed  e cra ashed my   you've crashed myparty
  d my party you've cras  my  shed  party you
  hed my party you've cr  par my pa 've crash 41. e crashed my party y
  ashed my party you've   ty  rty y ed my par ou'vecrashed my party yo
  crashed my party you'v  you ou've ty you've u've crashed my party yo
  e crashed my party  yo  've  cras  crashed  u've crashed my party yo
  u've crashed my party    cr hed m my party  u've crashed my party yo
  you've crashed my part
  y you've crashedmy par 40. my party you've cra
  ty you've crashed my p shed my party you've cr 39. ed my party you'v
                         ashed myparty you've cr e crashed my party yo
 48.  pa 36. y party yo  ashed my party you've c u'vecrashed my party
 rty you u've crashed m  rashed my party you've  you've crashed my par
 've cra y party you've  crashed my party you've ty you've crashed my
 shed my  crashed my pa   crashed my party you'v party you've crashed
  party  rty you've cra
 you've  shed my party      70. ty you've cr 29. my party you've crash
 crashed you'vecrashed      ashed my party y ed my party you've crashe
  my par my party you'v     ou've crashed my d my party you've crashed
 ty you' e crashed my p      party you've cr  my party you've crashed
 vecrash arty you've cr     ashed my party y my party you'vecrashed my
 ed my p ashed my party                       party you've crashed my
 arty yo  you've crashe 34.  my party you've party you've crashed my p
 u've cr d my party you  crashed my party yo arty you've crashed my pa
                        u've crashed my part rty you've crashed my par
    30. rashed my party y you've crashed my  ty you've crashed myparty
     you've crashed my  party you've crashed  you've crashed my party
    party you've crashe  myparty you've cras you've crashed my party y
    d myparty you've cr hed my party you've  ou've crashed my party yo
    ashed my party you'                      u've crashed my party you
    ve crashed my party 31. 've crashed my p 've crashed my party you'
     you've crashed my  arty you've crashed  vecrashed my party you've
    party you've crashe myparty you've crash  crashed my party you've
    d my party you've c ed my party you've c crashed my party you've c
    rashed my party you
    'vecrashed my party 22. ed my party you've c 145.
     you've crashed my  rashed myparty you've cr y y
    party you've crashe ashed my party you've cr ou'
    d my party you've c ashed my party you've cr ve  27. u've crashed
    rashed my party you ashed my party you've cr cra my party you've c
                        ashed my party you've cr she rashed my party y
      26. 've crashed m ashed my party you'vecra d m ou've crashed my
      y party you've cr shed my party you've cra y p party you've cras
 162. ashed my party yo shed my party you've cra art hed my party  you
  you u've crashed my p shed my party you've cra y y 've crashed my pa
 've  arty you've crash shed my party you've cra ou' rty you've crashe
 cras ed myparty you've shed my party you've cra ve  d my party you've
 hed   crashed my party shed myparty you've cras
 my p  you've crashed m hed my party you've cras 21. e crashed my part
      y party you've cr hed my party you've cras y you've crashed mypa
 73.  ashed my party yo hed my party you've cras rty you've crashed my
 rash                                             party you've crashed
 ed m  117. y 20. shed my party y                 my party you've cras
 y pa   you'v ou've crashed my pa 92.            hed my party you've c
 rty   e cras rty you've crashed  ty  38. party  rashed my party you'v
 you'  hed my my party you've cra you you've cra e crashed my party yo
 ve c         shed my party you'v 've shed my pa u'vecrashed my party
 rash  37. 'v ecrashed my party y  cr rty you've you've crashed my par
 ed m  e cras ou've crashed my pa ash  crashed m ty you've crashed my
       hed my rty you've crashed  ed  y party yo party you've crashed
   58.  party my party you've cra my  u've crash my party you've crash
   u'v  you'v shed my party you'v
   e c e cras                     19. y party you've c   183. 129. hed
   ras hed my  18. shed my part   rashed my party you'   shed  my part
   hed party   y you've crashed   ve crashed my party     my  y you've
    my you've   my party you've   you've crashed my pa
    pa  crash  crashed my party   rty you'vecrashed my 17. ou've crash
   rty ed my    you've crashed     party you've crashe ed my party you
               my party you've    d my party you've cr 've crashed my
   32. rashed  crashed my party   ashed my party you'v party you've cr
   my party yo  you've crashed    e crashed my party y ashed my party
   u've crashe my party you've    ou've crashed my par you've crashed
   d my party  crashed my party   ty you've crashed my myparty you've
   you've cras  you've crashed    party you've crashed crashed my part
   hed my part myparty you've c    my party you've cra y you've crashe
   y you've cr rashed my party                         d my party you'
   ashed my pa you've crashed m 16. y party            ve crashed my p
                                you've crash           arty you've cra
           14. hed my part      ed my party
 43. 33. r y you've crashe 88.  you'vecrashe 15. crashed my party you'
 art ty yo d my party you' hed  d my party y ve crashed my party you'v
 y y u'vec ve crashed my p my p ou've crashe e crashed my party you've
 ou' rashe arty you've cra arty d my party y  crashed my party you've
 ve  d my  shed my party y                   crashed my party you've c
 cra party ou've crashed m 13.  you          rashed my party you've cr
 she  you' y party you've  've cras          ashed my party  you've cr
 d m ve cr crashed my part hed my p          ashed my party you've cra
 y p ashed y you've crashe arty you   28.  c shed my party you've cras
           d my party you' 've cras   rashed hedmy party you've crashe
   25. d   ve crashed my p hed my p   my par d my party you've crashed
    my p   arty you've cra arty you   ty you  my party you've crashed
   arty    shed my party y 've cras   've cr my party you've crashed m
   you'v   ou've crashed m hed my p   ashed
   ecras   y party you've  arty you                  10.  party you've
   hed m                   've cras 11. ty you've cr  crashed my party
   y par 12. ashed m                ashed my party y  you've crashed m
   ty yo y party you 7. ty you've c ou've crashed my y party you've cr
   u've  've crashed rashed my part  party you've cr ashed my party yo
   crash  my party y y you've crash ashed my party y u've crashed my p
   ed my ou've crash ed my party yo ou've crashed my arty you've crash
    part ed my party u've crashed m  party you've cr ed my party you'v
   y you             y party you've                  e crashed my part
         9. arty you  crashed my pa 5.  crashed my p y you've crashed
 24. rty 've crashed rty you've cra arty you've cras my party you've c
  you've  my party y shed my party  hed my party you rashed my party y
  crashe ou've crash you've crashed 've crashed my p ou've crashed my
         ed my party  my party you' arty you've cras party you've cras
 8. y pa  you've cra ve crashed my  hed my party you hed my party you'
 rty you shed my par party you've c 've crashed my p ve crashed my par
 've cra ty you've c rashed my part arty you've cras
 shed my rashed my p y you've crash hed my party you 35. 6. 've crashe
  party  arty you've ed my party yo 've crashed my p cra d my party yo
 you've   crashed my u've crashed m arty you've cras she u've crashed
 crashed                            hed my party you d m my party you'
  my par 4. ashed my party you've   've crashed my p     ve crashed my
 ty you'  crashed my party you've   arty you've cras 23.  party you've
 ve cras  crashed my party you've   hed my party you hed  crashed my p
 hed my   crashed my party you've   've crashed my p  my arty you've c
 party y  crashed my party you've   arty you've cras  pa rashed my par
 ou've c  crashed my party you've   hed my party you
 rashed   crashed my party you've                    1. you've crashed
 my part                          2. ashed my party   my party you've
 y you'v  77.  3.  crashed my par you've crashed my  crashed my party
 e crash  've  ty you've crashed  party you've crash you've crashed my
 ed my p  cras my party you've cr ed my party you've  party  you've cr
  

I posted that to a certain mailing list on which I convince myself that anything I post - which might have the slightest interest to just one other subscriber - is worth posting.

Afterwards I thought well, perhaps I should clean up the code a bit, remove all the stuff which is irrelevant to boxing up text like that, and release the code so others may use it if for some obscure reason they're into that kind of thing.

So now you too can box up text using text_boxer-0.0.2.tar.bz2. Please though, don't ask me for instructions on how to use it, you'll have to figure it out. Tell you what, why don't you search google for text_boxer-0.0.2?

So after realizing what I thought was going to be the perfect solution to my problems was infact a bit of a nightmare, I went running to stack overflow and asked the following question: Fast block placement algorithm, advice needed?. After some comments left by other members, the edited the question, and more comments came, and an answer which I never really investigated because I was not entirely convinced by it, thought I did appreciate it for it's difference to anything I had thought of.

As you can see by my own answers to that question, I settled on using an algorithm which worked using a two dimensional array for tracking used and unused space. The final version of this uses a lot of bit-twiddling and bit-manipulation to make more efficient use of memory, and as an added bonus, is faster too.

Basically, the point I've been leading up to is that today I finally got all the different placement options working, along with multiple boundaries within the grid in which free space may be taken from (and outside of the boundaries it must remain untouched).

There's an interesting video I'd like you to watch: http://www.youtube.com/watch?v=SPOQBnrUp3g

Information

"Journal"

A page detailing new stuff and other random noise.

The journal is a general place for writing about what I am doing, or for making more official announcements concerning the things I do. It's also a place where I can write freely about my ideas, or just play with words and language.

DISCLAIMER: The opinions and attitudes of James W. Morris as expressed here in the past may or may not accurately reflect the opinions and attitudes of James W. Morris at present, moreover, they may never have.

this page last updated:29th April 2013 jwm-art.net (C) 2003 - 2017 James W. Morris

script time:0.0725