mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Random.
|
||||
*
|
||||
* Random numbers create the basis of this image.
|
||||
* Each time the program is loaded the result is different.
|
||||
*/
|
||||
|
||||
size(200, 200);
|
||||
smooth();
|
||||
background(0);
|
||||
strokeWeight(10);
|
||||
|
||||
for(int i = 0; i < width; i++) {
|
||||
float r = random(255);
|
||||
float x = random(0, width);
|
||||
stroke(r, 100);
|
||||
line(i, 0, x, height);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
import processing.core.*;
|
||||
|
||||
import java.applet.*;
|
||||
import java.awt.*;
|
||||
import java.awt.image.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
import java.text.*;
|
||||
import java.util.*;
|
||||
import java.util.zip.*;
|
||||
import java.util.regex.*;
|
||||
|
||||
public class Random extends PApplet {
|
||||
public void setup() {/**
|
||||
* Random.
|
||||
*
|
||||
* Random numbers create the basis of this image.
|
||||
* Each time the program is loaded the result is different.
|
||||
*/
|
||||
|
||||
size(200, 200);
|
||||
smooth();
|
||||
background(0);
|
||||
strokeWeight(10);
|
||||
|
||||
for(int i = 0; i < width; i++) {
|
||||
float r = random(255);
|
||||
float x = random(0, width);
|
||||
stroke(r, 100);
|
||||
line(i, 0, x, height);
|
||||
}
|
||||
|
||||
|
||||
noLoop();
|
||||
}
|
||||
static public void main(String args[]) {
|
||||
PApplet.main(new String[] { "Random" });
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Random.
|
||||
*
|
||||
* Random numbers create the basis of this image.
|
||||
* Each time the program is loaded the result is different.
|
||||
*/
|
||||
|
||||
size(200, 200);
|
||||
smooth();
|
||||
background(0);
|
||||
strokeWeight(10);
|
||||
|
||||
for(int i = 0; i < width; i++) {
|
||||
float r = random(255);
|
||||
float x = random(0, width);
|
||||
stroke(r, 100);
|
||||
line(i, 0, x, height);
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
Reference in New Issue
Block a user