Created
December 22, 2015 15:30
-
-
Save butchi/1c6c4e44ae1c999cd02d to your computer and use it in GitHub Desktop.
JavaScript本に書いてあった簡単な図形描画をMathematicaで ref: http://qiita.com/butchi_y/items/0c8a1ef9508531569ccf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var res = '\n', i, j; | |
for(i = 1; i <= 7; i++) { | |
for(j = 1; j < 15; j++) { | |
res += (i * j) % 8 ? ' ' : '*'; | |
} | |
res+= '\n'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ArrayPlot[Table[Boole[Divisible[i j, 128]], {i, 1, 255}, {j, 1, 255}], PixelConstrained -> True, Frame -> False] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
* | |
* * * | |
* | |
* * * * * * * | |
* | |
* * * | |
* | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment