开源最前线(ID:OpenSourceTop) 猿妹综合整理
![4e0c0607d649c525e1c90bffee55da34.png](https://img-blog.csdnimg.cn/img_convert/4e0c0607d649c525e1c90bffee55da34.png)
看过《黑客帝国》的伙伴们相信都对里面的代码雨印象深刻,这种特效经常用在黑客攻击时的电脑动画,其实要实现这样一个特效并不难,不懂代码的小白按照说明操作也很容易实现。
最近猿妹也在Github上发现了类似的项目,不仅可以实现《黑客帝国》的代码雨,还可以实现《康威生命游戏》(Conway’s Game of Life)的特效。
![f96868649b99bbdbc9d5dc6c4f030357.png](https://img-blog.csdnimg.cn/img_convert/f96868649b99bbdbc9d5dc6c4f030357.png)
该项目是由akinomyoga,根据介绍是一名北京大学博士后研究员,cxxmatrix在Github上标星372。(Github地址:https://github.com/akinomyoga/cxxmatrix)
先来一段实现效果,你体会一下:
![348c56ca8a3d69fa071d59eeeed1efa3.gif](https://img-blog.csdnimg.cn/img_convert/348c56ca8a3d69fa071d59eeeed1efa3.gif)
想要实现以上效果,首先你需要:
- git、C++编译器、GNU Maker和GNU AWK;
- 系统支持UTF-8;
- 支持256色和UTF-8的终端。
$ git clone https://github.com/akinomyoga/cxxmatrix.git$ cd cxxmatrix$ make$ ./cxxmatrix 'The Matrix' 'Reloaded'
安装
默认本地安装地址为 /usr/local. /usr/local/bin/cxxmatrix, 然后创建一个 /usr/local/share/man/man1/cxxmatrix.1.gz
$ sudo make install
你也可以更改前缀:
# Example 1sudo make PREFIX=/opt/cxxmatrix install# Example 2make PREFIX=~/.local install
此外,还有多种编程语言演示,如C语言、Python、Objective-C、Go等:
![d2fc6eeb5ba72e086329542ec0fea96f.png](https://img-blog.csdnimg.cn/img_convert/d2fc6eeb5ba72e086329542ec0fea96f.png)
还有网页版效果演示,如果你只想发个抖音,酷炫一波也可以直接在这里面挑选自己想要的效果。
![9ee4b698954058130379ce2113a00d98.png](https://img-blog.csdnimg.cn/img_convert/9ee4b698954058130379ce2113a00d98.png)
最后我们来看几个特效吧,首先是《康威生命游戏》的特效
![c37a0d571fb195032cac56f74f79d9eb.gif](https://img-blog.csdnimg.cn/img_convert/c37a0d571fb195032cac56f74f79d9eb.gif)
曼德布洛特集合
![07c044d888b9e8dc378261751e4212c7.gif](https://img-blog.csdnimg.cn/img_convert/07c044d888b9e8dc378261751e4212c7.gif)