OpenProcessing代码收集1
来源:互联网 发布:大数据hadoop 编辑:程序博客网 时间:2024/05/21 10:11
/* OpenProcessing Tweak of *@*http://www.openprocessing.org/sketch/173463*@* *//* !do not delete the line above, required for linking your tweak if you upload again */float theta, step;int num=5, frames = 1200;Layer[] layers = new Layer[num]; void setup() { size(600, 400); step = (height-120)/num; for (int i=0; i<num; i++) { layers[i] = new Layer(-20+i*step, random(1000), i+1); }} void draw() { background(#ffffff); for (int i=0; i<layers.length; i++) { color col = lerpColor(#4A14C1,#ffffff,0.8-0.8/num*i); fill(col); layers[i].display(); } theta += TWO_PI/frames; //if (frameCount%2==0 && frameCount<=frames) saveFrame("image-###.gif");} class Layer { float start, noize, speed; float yOff, yOff2; Layer(float _start, float _noize, float _speed) { start = _start; noize = _noize; speed = _speed; } void display() { yOff = yOff2; noStroke(); for (int x=0; x<width; x+=1) { float y = start + noise(noize+sin(yOff)*3)*step*3.5; rect(x,height,1,-height+y); yOff+=TWO_PI/(width); } yOff2=theta*speed; }}
0 0
- OpenProcessing代码收集1
- js常用代码收集1
- cocos2dx代码收集 (1)
- 代码收集
- 代码收集
- 代码收集
- 代码收集
- javascript的代码实现收集1
- SQL经典短小代码收集1
- SQL经典短小代码收集 1
- 收集的一些网址,小代码1
- 【收集】常用的一些代码块<1>
- JavaScript代码收集
- csdn代码收集
- JavaScript代码收集
- 精华ASP代码收集
- 精华ASP代码收集
- [转贴]javascript 代码收集
- 发送IP封包到高层协议
- 多元线性回归、梯度下降法、正规方程法简单实验
- 洛谷P1629 邮递员送信
- 第三章 例题三 阿格斯(自定义优先队列)
- 通过keepalived搭建LVS高可用集群
- OpenProcessing代码收集1
- python的hash模块
- Collection与Collections的区别?
- android程序开发——侧滑的实现
- nginx依赖库安装
- 如何用ModelsimSE仿真IP核-以PLL为例
- iOS:storyBoard、xib布局,AutoLayout、sizeClass技术
- Runable和thread的区别(多线程必须用Runable)
- LeetCode刷题笔记