Peripheral drift illusion: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→{{header|Raku}}: clean up some stray white space) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: Reduce image file size; remove a bunch of redundant information) |
||
Line 270: | Line 270: | ||
my @blocks = (1..15 X 1..10).map: -> ($X, $Y) { |
my @blocks = (1..15 X 1..10).map: -> ($X, $Y) { |
||
my $r = (($X + $Y) div 2) % 4 * 90; |
|||
my $x = $X * 75; |
my $x = $X * 75; |
||
my $y = $Y * 75; |
my $y = $Y * 75; |
||
my $a = (my $r = ($X + $Y) div 2 % 4 * 90) > 0 ?? "rotate($r,$x,$y) " !! ''; |
|||
:use['xlink:href'=>'#block', 'transform'=>"{$a}translate($x,$y)"] |
|||
} |
} |
||
Line 283: | Line 283: | ||
:g[ |
:g[ |
||
:id<block>, |
:id<block>, |
||
:polygon[:points<-25,-25,-25,25,25,25>, : |
:polygon[:points<-25,-25,-25,25,25,25>, :fill<white>], |
||
:polygon[:points<25,25,25,-25,-25,-25>, : |
:polygon[:points<25,25,25,-25,-25,-25>, :fill<black>], |
||
:rect[:x<-20>, :y<-20>, :width<40>, :height<40>, :fill<#3250ff>] |
:rect[:x<-20>, :y<-20>, :width<40>, :height<40>, :fill<#3250ff>] |
||
] |
] |