Code the tiles by giving per axis the boxed starting points and their lengths.
In your case that is
(0 4 2,: 3 1 2) ; 1 4,: 4 2

Now, with a small adaptation you produce the index tiling 

    t=:<@,:"1/ >,."0 1 L:0/(0 4 2,: 3 1 2) ; 1 4,: 4 2  NB. the open (>) is 
moved to the left, so ,."0 1 needs a L:0 (or &.>).
+---+---+
|0 1|0 4|
|3 4|3 2|
+---+---+
|4 1|4 4|
|1 4|1 2|
+---+---+
|2 1|2 4|
|2 4|2 2|
+---+---+
And we are done
   T ];.0~L:0 t
+-----------+-----+
| 1  2  3  4| 4  5|
| 8  9 10 11|11 12|
|15 16 17 18|18 19|
+-----------+-----+
|29 30 31 32|32 33|
+-----------+-----+
|15 16 17 18|18 19|
|22 23 24 25|25 26|
+-----------+-----+

The next level of irregularity is that you have different number of columns per 
row, or different number of rows per column.


R.E. Boss


-----Original Message-----
From: Programming <[email protected]> On Behalf Of 
'Michael Day' via Programming
Sent: zondag 26 september 2021 13:04
To: [email protected]
Subject: Re: [Jprogramming] irregular tillings

Still trying to understand L: - it looks so useful, but meanwhile,  how do you 
get an even more irregular tiling such as:

+-----------+-----+
| 1  2  3  4| 4  5|
| 8  9 10 11|11 12|
|15 16 17 18|18 19|
+-----------+-----+
|29 30 31 32|32 33|
+-----------+-----+
|15 16 17 18|18 19|
|22 23 24 25|25 26|
+-----------+-----+

NB. ie a 3 x 2 tiling ?

This almost does the job:
    [t1 =. <@,:"1/ ,"0"0 1"1/ >(0 3,.4 1,. 2 2);1 4,:4 2
+---+---+---+
|0 1|0 4|0 0|
|3 4|3 2|3 0|
+---+---+---+
|4 1|4 4|4 0|
|1 4|1 2|1 0|
+---+---+---+
|2 1|2 4|2 0|
|2 4|2 2|2 0|
+---+---+---+
NB. or use Raul's latest posting as for t NB. ?

    T ];.0~L:0 t1
+-----------+-----++
| 1  2  3  4| 4  5||
| 8  9 10 11|11 12||
|15 16 17 18|18 19||
+-----------+-----++
|29 30 31 32|32 33||
+-----------+-----++
|15 16 17 18|18 19||
|22 23 24 25|25 26||
+-----------+-----++

So the current approach is fine for equal numbers of across and down tiles,  
less good for unequal ones.  I suppose we can prune t1 to remove columns and/or 
rows having all zero lengths,  or remove all empty tiles.  In this case, the 
fact that there are 3 columns and two columns in the specification might be 
used to filter the result.

Cheers,

Mike

On 24/09/2021 17:54, R.E. Boss wrote:
> This is the way to go for even very irregular tiling.
> Let the starting points and their lengths be given per axis, like in
>     (0 4,:3 1);1 4,:4 2
> +---+---+
> |0 4|1 4|
> |3 1|4 2|
> +---+---+
> and
>   [ T=.i.7 7
>   0  1  2  3  4  5  6
>   7  8  9 10 11 12 13
> 14 15 16 17 18 19 20
> 21 22 23 24 25 26 27
> 28 29 30 31 32 33 34
> 35 36 37 38 39 40 41
> 42 43 44 45 46 47 48
>
> First make de tiling by indices
>     t=.<@,:"1/ ,"0"0 1"1/ >(0 4,:3 1);1 4,:4 2
> +---+---+
> |0 1|0 4|
> |3 4|3 2|
> +---+---+
> |4 1|4 4|
> |1 4|1 2|
> +---+---+
> then
>     T ];.0~L:0 t
> +-----------+-----+
> | 1  2  3  4| 4  5|
> | 8  9 10 11|11 12|
> |15 16 17 18|18 19|
> +-----------+-----+
> |29 30 31 32|32 33|
> +-----------+-----+
>
> All credits to Miller.
>
>
> R.E. Boss
>
>
> -----Original Message-----
> From: Programming <[email protected]> On Behalf 
> Of R.E. Boss
> Sent: vrijdag 24 september 2021 16:02
> To: [email protected]
> Subject: Re: [Jprogramming] irregular tillings
>
> This is probably the closest one could get, building the irregular tiling 
> first in indices and then applying ;.0 Thanks.
>
>
> R.E. Boss
>
>
> -----Original Message-----
> From: Programming 
> <[email protected]<mailto:programming-bounces@f
> orums.jsoftware.com>> On Behalf Of Raul Miller
> Sent: vrijdag 24 september 2021 11:36
> To: Programming forum 
> <[email protected]<mailto:[email protected]>>
> Subject: Re: [Jprogramming] irregular tillings
>
> Not easily (you could produce a larger result and discard the unwanted 
> content).
>
> However, you could do this:
>
>     t=: 0 2 5 e.~i.7
>     T=: i.7 7
>     T];.0~L:0<@,."1/~(}:,.2-~/\])I.t,1
> +-----+--------+-----+
> |0 1  |2  3  4 | 5  6|
> |7 8  |9 10 11 |12 13|
> +-----+--------+-----+
> |14 15|16 17 18|19 20|
> |21 22|23 24 25|26 27|
> |28 29|30 31 32|33 34|
> +-----+--------+-----+
> |35 36|37 38 39|40 41|
> |42 43|44 45 46|47 48|
> +-----+--------+-----+
>
> I hope this helps,
>
> --
> Raul
>
> On Fri, Sep 24, 2021 at 4:32 AM R.E. Boss 
> <[email protected]<mailto:[email protected]>> wrote:
>> see https://code.jsoftware.com/wiki/Vocabulary/semidot3#dyadic
>>
>> Let
>>     [t=.;2 3 2<@{."(0)1
>> 1 0 1 0 0 1 0
>>     T=:i.7 7
>>
>> then what I want is produced with
>>
>>     >,.&,.&.>/('';~t)<;.1 L:_ 0 ('';t)<;.1 T
>> +-----+--------+-----+
>> |0 1  |2  3  4 | 5  6|
>> |7 8  |9 10 11 |12 13|
>> +-----+--------+-----+
>> |14 15|16 17 18|19 20|
>> |21 22|23 24 25|26 27|
>> |28 29|30 31 32|33 34|
>> +-----+--------+-----+
>> |35 36|37 38 39|40 41|
>> |42 43|44 45 46|47 48|
>> +-----+--------+-----+
>>
>> Is this (also) possible with <;.3  ?
>>
>>
>> R.E. Boss
>> ---------------------------------------------------------------------
>> - For information about J forums see 
>> http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm


--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to