Processing 练习(10) - 条形码
2015-09-11 20:25
211 查看
float x = 0; void setup() { size(400, 400); background(255); stroke(255); } void draw() { line(x, 200, x, 100); x = x + 1; if (x > width) { x = 0; } // sometimes we decide to change the line color if (random(100) > 70) { // now we decide if to use black or white if (random(100) > 50) { stroke(0); } else { stroke(255); } } }这段代码复制自fun programming. 用来让初学者理解随机数的使用。
相关文章推荐
- 新的征程
- yum ftp源搭建
- 使用GnuPG(PGP)加密信息及数字签名教程
- 矩阵模板
- 获取日期
- 权限(Permission denied)问题如何确认是Selinux 约束引起?
- 野生程序员成长记(一) Android系统特性与环境配置
- arm平台裸机程序下载-linux下的dnw工具解决方案
- 利用zxing识别图片二维码
- 如何设置SELinux 策略规则 ? 在Kernel Log 中出现"avc: denied" 要如何处理?
- IOS_UI_数据库
- linux iptables SNAT NAT 【原创】
- 《代码整洁之道》学习计划
- HBase相关概念
- 崔莺莺到宋楚瑜,张你怎么看待?
- 重载操作符
- rsync+inotify配置
- nyoj 27 水池数目 【dfs(模板题)】
- bzoj1611:流星雨
- <Chapter 2>2-2.开发应用(developing the Application)