Deutsch   English   Français   Italiano  
<utci9v$ulip$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bart <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: Re: filling area by color atack safety
Date: Tue, 19 Mar 2024 17:33:56 +0000
Organization: A noiseless patient Spider
Lines: 68
Message-ID: <utci9v$ulip$2@dont-email.me>
References: <ut3669$21eur$1@i2pn2.org> <ut4020$2s8ov$1@dont-email.me>
 <87wmq2jn7s.fsf@bsb.me.uk> <ut4b3c$2ugk7$1@dont-email.me>
 <86ttl3oo5b.fsf@linuxsc.com> <20240318142351.00001849@yahoo.com>
 <utc9kb$2d06e$1@i2pn2.org> <utch9m$ulip$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 19 Mar 2024 17:33:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="476cbb70b59e552cddbf69eebbcfa758";
	logging-data="1005145"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19kca7XvXBg+cKl8o54lXdf"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:SEpTKwRQwOcR7LDNcqhvXQN3QPw=
In-Reply-To: <utch9m$ulip$1@dont-email.me>
Content-Language: en-GB
Bytes: 5104

On 19/03/2024 17:16, bart wrote:
> On 19/03/2024 15:05, fir wrote:

>> if this is 100x 100 square and i put the initioation
>> in middle it would go 50x right then at depth 50
>> it would go one up than i guess 100 times left
>>
>> then just about this line up until up edge of picture
>> - then it probably revert back (with a lot
>> of false is) to first line and then go down
> 
> That's what I thought until I tried it.
> 
> If I start with an 18x18 image of all zeros, then fill starting from the 
> centre with a 'colour' that is an incrementing value, then the final 
> image displayed as a table of integers looks like this:
> 
> 
> 171 170 169 168 167 166 165 164 163 162 161 160 159 158 157 156 155 154
> 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
> 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118
> 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
>   99  98  97  96  95  94  93  92  91  90  89  88  87  86  85  84  83  82
>   64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81
>   63  62  61  60  59  58  57  56  55  54  53  52  51  50  49  48  47  46
>   28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45
>   27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11  10
> 172 173 174 175 176 177 178 179 180   1   2   3   4   5   6   7   8   9
> 209 210 211 212 213 214 215 216 181 182 183 184 185 186 187 188 189 190
> 208 207 206 205 204 203 202 201 200 199 198 197 196 195 194 193 192 191
> 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
> 252 251 250 249 248 247 246 245 244 243 242 241 240 239 238 237 236 235
> 253 254 255 325 257 258 259 260 261 262 263 264 265 266 267 268 269 270
> 288 287 286 285 284 283 282 281 280 279 278 277 276 275 274 273 272 271
> 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
> 324 323 322 321 320 319 318 317 316 315 314 313 312 311 310 309 308 307

> It's not clear how it gets from 171 at top left to 172 half-way down the 
> left edge.

Actually, a more revealing picture is produced when storing the 
calldepth in each cell rather than sequence number (these images are now 
16-bits/cell rather than 8):

171 170 169 168 167 166 165 164 163 162 161 160 159 158 157 156 155 154
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
  99  98  97  96  95  94  93  92  91  90  89  88  87  86  85  84  83  82
  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81
  63  62  61  60  59  58  57  56  55  54  53  52  51  50  49  48  47  46
  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45
  27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11  10
  28  29  30  31  32  33  34  35  36   1   2   3   4   5   6   7   8   9
  65  66  67  68  69  70  71  72  37  38  39  40  41  42  43  44  45  46
  64  63  62  61  60  59  58  57  56  55  54  53  52  51  50  49  48  47
  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82
100  99  98  97  96  95  94  93  92  91  90  89  88  87  86  85  84  83
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
172 171 170 169 168 167 166 165 164 163 162 161 160 159 158 157 156 155

At least now I know how it gets from the top left to the 172 in the top 
image: it must do a cascade of Returns until it gets back to call-depthe 
27 in this second chart, then it does the cell immediately below.