APL Wiki logo: Difference between revisions
Jump to navigation
Jump to search
(→Code) |
|||
Line 203: | Line 203: | ||
4 1 | 4 1 | ||
</source> | </source> | ||
Since we want the offsets | Since we want the offsets paired up with themselves, we can use <source lang=apl inline>⍨</source> again: | ||
<source lang=apl> | <source lang=apl> | ||
,⍤0⍤0 1⍨⍳3 | ,⍤0⍤0 1⍨⍳3 | ||
Line 219: | Line 219: | ||
</source> | </source> | ||
The offset pairs form our circle locations: | The offset pairs form our circle locations: | ||
⍴locs←,⍤0⍤0 1⍨offsets | |||
5 5 2 | 5 5 2 | ||
</source> | </source> | ||
that is, it is a 3D array with 5 layers, 5 rows in each layer, and 2 columns in each row | that is, it is a 3D array with 5 layers, 5 rows in each layer, and 2 columns in each row. Each row of our result represents an <math>(x,y)</math> value. The first and last layers, which represents the leftmost and rightmost columns of the logo, are: | ||
<source lang=apl> | <source lang=apl> | ||
(1↑locs) (¯1↑locs) | (1↑locs) (¯1↑locs) |