Skip to content

Instantly share code, notes, and snippets.

@butchi
Created December 22, 2015 15:30
Show Gist options
  • Save butchi/1c6c4e44ae1c999cd02d to your computer and use it in GitHub Desktop.
Save butchi/1c6c4e44ae1c999cd02d to your computer and use it in GitHub Desktop.
JavaScript本に書いてあった簡単な図形描画をMathematicaで ref: http://qiita.com/butchi_y/items/0c8a1ef9508531569ccf
var res = '\n', i, j;
for(i = 1; i <= 7; i++) {
for(j = 1; j < 15; j++) {
res += (i * j) % 8 ? ' ' : '*';
}
res+= '\n';
}
ArrayPlot[Table[Boole[Divisible[i j, 128]], {i, 1, 255}, {j, 1, 255}], PixelConstrained -> True, Frame -> False]
"
*
* * *
*
* * * * * * *
*
* * *
*
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment