0
$\begingroup$

this time I write to share my doubt, a friend of mine shared the following video Matrix Raining Code Animation and asked me, is it possible to do this effect in mathematica ?, the first thing that came to mind was to use RANDOMINTEGER [9, {10,10 }] But I do not know how to do the number rain and the color change. Any help to make the effect is welcome, thanks in advance.

$\endgroup$
1
1
$\begingroup$

Yes, it could be done.

You could use Graphics[Text[FromLetterNumber[c],{x,y}]] to place random letters c at x,y locations. Indeed you could use RandomInteger[26] to pick random letter codes for c. The FromLetterNumber function can generate different alphabets, including greek, etc. You'd need to decide what range of the xy-plane you'd want to cover with random letters, and how to space them. Use RandomReal or RandomInteger to pick the starting xy locations. Use Table to create a table of random letters distributed over the plane. Use RGBColor to set the color. You'll want to print the same set of letters again, with slightly lower brighness above the first printing of the letter. And so on, several times, to create the trail of letters increasing in brightness downward. Create a frame in this manner, then a sequence of frames. Then use Export to export the sequence of frames as a movie.

It's a bit of work, but I think you can do it.

$\endgroup$
1
  • $\begingroup$ Many thanks Chris for your suggestions, they are working great, the code that I share is my first attempt, I am trying to improve it to obtain a result more like the video that I show, any advice is very useful. Do not mention that I am using mathematica 10.0 and do not have the FromLetterNumber command. Table[num = Table[Text[ Style[RandomInteger[{1, 9}], RandomChoice[{Green, White}]], {RandomInteger[{1, 9}], RandomInteger[{1, 9}]}], {200}]; Graphics[{Rectangle[{0, 0}, {10, 10}], num}], {30}]; ListAnimate[%] $\endgroup$ Jul 4 '17 at 5:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.