Skip to content

Commit c9ad9f1

Browse files
committed
General repository updates
1 parent 9b3fd3c commit c9ad9f1

File tree

92 files changed

+199
-187
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+199
-187
lines changed

Animated_Circle_Grid/Animated_Circle_Grid.pde

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Carla de Beer
2-
// Created November 2010; updated January 2014.
2+
// Created: November 2010; updated: January 2014.
33
// Animated circle grid.
44

55
Circle [][] grid;
@@ -23,7 +23,7 @@ void setup() {
2323
}
2424

2525
void draw() {
26-
background(55);
26+
background(128);
2727
pushMatrix();
2828
translate((width - (SPACING*(COLS-1)))/2, (height - (SPACING*(ROWS-1)))/2);
2929
for (int i = 0; i < COLS; ++i) {

Animated_Circle_Grid/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
Animated Circle Grid
2-
====================
1+
# Animated Circle Grid
32

3+
Animating a set of circles within a fixed grid pattern. This sketch was one of my first Processing projects.
4+
5+
</br>
46
<p align="center">
57
<img src="gif/animated circle grid.gif"/>
68
</p>
248 KB
Loading

Animated_Circle_Grid/screen-0056.tif

1.55 MB
Binary file not shown.

Animated_Circle_Grid/screen-0274.tif

1.55 MB
Binary file not shown.

Animated_Circle_Grid/screen-0394.tif

1.55 MB
Binary file not shown.

Animated_NURBS_Surface/Animated_NURBS_Surface.pde

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Carla de Beer
2-
// January 2014
2+
// Created: January 2014.
33
// An animated NURBS surface imbued with movement through the addition of a particle spring system.
44
// NURBS algorithm based on that of Alasdair Turner's: http://www.openprocessing.org/sketch/8101
55

CA_1D/CA_1D.pde

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Carla de Beer
2-
// January 2015
3-
// 1D Cellular Automata played out on a 2D lozenge-shaped grid
2+
// Created: January 2015.
3+
// 1D Cellular Automata played out on a 2D lozenge-shaped grid.
44

55
// Rule set
66
// Modify the input values here:
@@ -32,7 +32,6 @@ void draw() {
3232
pushMatrix();
3333
translate(0, width/n *sin(radians(60)));
3434

35-
3635
// Modify the input values here:
3736
for (int i = 0; i < num; ++i) {
3837
for (int j = 0; j < jVal; ++j) {

CA_1D/Cell.pde

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
class Cell {
2-
32
float x, y;
43
float w;
54
float xoff;
65
float yoff;
76
boolean value;
87

9-
Cell(float x_, float y_, float w_) {
10-
x = x_;
11-
y = y_;
12-
w = w_;
8+
Cell(float x, float y, float w) {
9+
this.x = x;
10+
this.y = y;
11+
this.w = w;
1312

1413
xoff = cos(radians(60))*w;
1514
yoff = sin(radians(60))*w;
@@ -32,5 +31,4 @@ class Cell {
3231
endShape();
3332
popMatrix();
3433
}
35-
}
36-
34+
}

Circle_Grid_With_Mouse_Repel/Circle.pde

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ class Circle {
66
int originalxpos;
77
int originalypos;
88

9-
Circle (int _xpos, int _ypos, int _rad) {
10-
xpos = _xpos;
11-
ypos = _ypos;
12-
rad = _rad;
9+
Circle (int xpos, int ypos, int rad) {
10+
this.xpos = xpos;
11+
this.ypos = ypos;
12+
this.rad = rad;
1313
originalxpos = xpos;
1414
originalypos = ypos;
1515
sp = 1;

Circle_Grid_With_Mouse_Repel/Circle_Grid_With_Mouse_Repel.pde

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Carla de Beer
2-
// November 2010
2+
// Created: November 2010.
33

44
final int RADIUS = 20;
55

Circle_Packing_Image/Circle_Packing_Image.pde

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
// Carla de Beer
2+
// Created: January 2017.
13
// Pointillated image creation with circle packing algorithm.
24
// Based on Daniel Shiffman's Coding Train video series on animated circle packing:
35
// https://www.youtube.com/watch?v=QHEQuoIKgNE
46
// Image: Scheveningen Museum Beelden aan Zee
5-
// https://freewallpaperspictures.com/tag/images-photos/
6-
// Created: January 2017
7+
// https://freewallpaperspictures.com/tag/images-photos
78

89
import java.util.*;
910
import java.text.*;

DoublePendulum/DoublePendulum.pde

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Carla de Beer
2-
// February 2018
2+
// Created: February 2018.
33
// Four double pendula with various settings.
44
// Based on Daniel Shiffman's Coding Train coding challenge:
55
// https://www.youtube.com/watch?v=uWzPe_S-RVE

GOL_3D/Cell.pde

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
// The Nature of Code
2-
// Daniel Shiffman
3-
// http://natureofcode.com
4-
51
class Cell {
6-
72
float x, y, z, h;
83
float w;
94
float check = 0.5;
@@ -12,10 +7,10 @@ class Cell {
127
int previous;
138
int cap;
149

15-
Cell(float x_, float y_, float w_) {
16-
x = x_;
17-
y = y_;
18-
w = w_;
10+
Cell(float x, float y, float w) {
11+
this.x = x;
12+
this.y = y;
13+
this.w = w;
1914
z = 0;
2015
h = 20;
2116
cap = 60;
@@ -70,7 +65,7 @@ class Cell {
7065
z = -20;
7166
}
7267
} else fill((1.8*h)%255);
73-
68+
7469
stroke(10);
7570
strokeWeight(0.5);
7671
pushMatrix();

GOL_3D/GOL.pde

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
// The Nature of Code
2-
// Daniel Shiffman
3-
// http://natureofcode.com
4-
51
class GOL {
6-
72
int w = 10;
83
int columns, rows;
94
boolean colorOn = true;
@@ -73,5 +68,4 @@ class GOL {
7368
}
7469
}
7570
}
76-
}
77-
71+
}

GOL_3D/GOL_3D.pde

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
// Carla de Beer
2-
// January 2014
3-
// 3D Implementation of John Conway's Game of Life CA,
4-
// based on Daniel Shiffman's Nature of Code 2D CA example
5-
6-
// The Nature of Code
7-
// Daniel Shiffman
2+
// Created: January 2014.
3+
// 3D Implementation of John Conway's Game of Life CA.
4+
// Based on Daniel Shiffman's 2D CA example in "The Nature of Code":
85
// http://natureofcode.com
96

10-
PVector eye;
11-
PVector center;
12-
PVector up;
13-
147
import processing.opengl.*;
158

169
GOL gol;
10+
PVector eye;
11+
PVector center;
12+
PVector up;
1713

1814
boolean noPause = true;
1915
import processing.dxf.*;

GOL_HexPattern/Cell.pde

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
// Hexagonal implementation of Daniel Shiffman's 2D CA
2-
3-
// The Nature of Code
4-
// Daniel Shiffman
5-
// http://natureofcode.com
6-
7-
// A basic implementation of John Conway's Game of Life CA
8-
91
class Cell {
10-
112
float x, y;
123
float w;
134
float xoff;
@@ -16,10 +7,10 @@ class Cell {
167
int state;
178
int previous;
189

19-
Cell(float x_, float y_, float w_) {
20-
x = x_;
21-
y = y_;
22-
w = w_;
10+
Cell(float x, float y, float w) {
11+
this.x = x;
12+
this.y = y;
13+
this.w = w;
2314

2415
xoff = w/2;
2516
yoff = sin(radians(60))*w;

GOL_HexPattern/GOL.pde

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
// Hexagonal implementation of Daniel Shiffman's 2D CA
2-
3-
// The Nature of Code
4-
// Daniel Shiffman
5-
// http://natureofcode.com
6-
7-
// A basic implementation of John Conway's Game of Life CA
8-
91
class GOL {
10-
112
float w = 10;
123
float h = sin(radians(60))*w;
134
int columns, rows;
@@ -81,5 +72,4 @@ class GOL {
8172
}
8273
}
8374
}
84-
}
85-
75+
}

GOL_HexPattern/GOL_HexPattern.pde

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
// Carla de Beer
2-
// January 2014
3-
// Hexagonal implementation of Daniel Shiffman's 2D CA
4-
5-
// The Nature of Code
6-
// Daniel Shiffman
2+
// Created: January 2014.
3+
// A basic implementation of John Conway's Game of Life CA on a hexagonal grid.
4+
// Based on Daniel Shiffman's 2D CA implementation in "The Nature of Code":
75
// http://natureofcode.com
86

9-
// A basic implementation of John Conway's Game of Life CA
10-
117
GOL gol;
128

139
void setup() {

Image Processing/FloydSteinbergDithering/FloydSteinbergDithering.pde

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
// Carla de Beer
2+
// Created: January 2018.
13
// Floyd-Steinberg dithering.
24
// A dithering technique using error diffusion, meaning it pushes (adds) the residual quantisation error of a pixel onto its neighbouring pixels, to be dealt with later.
35
// Based on Daniel Shiffman's Coding Train video:
46
// https://www.youtube.com/watch?v=0L2n8Tg2FwI
5-
// Created: January 2018
67

78
PImage img;
89
static int FACTOR = 2;

Image Processing/ImageDotScreen/ImageDotScreen.pde

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
// Carla de Beer
2+
// Created: January 2018.
13
// Images with a dot screen.
24
// A simple form of resolution reduction by increasing the effective pixel size.
35
// The size of each dot relates to the brightness level of the corresponding image spot.
4-
// Created: January 2018
56

67
PImage img;
7-
88
static int DIVISON = 6;
99

1010
void setup() {

Image Processing/ImageSegmentationKNN/ImageSegmentationKNN.pde

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// December 2017 //<>//
1+
// Carla de Beer //<>//
2+
// Created: December 2017.
23
// Image segmentation using the k-nearest neighbour algorithm.
34
// Algorithm adapted from: https://en.wikipedia.org/wiki/Image_segmentation.
45
// Press 'R' or 'r' to restart the sketch. A single mouse press halts the centroid recalculation.
5-
// Carla de Beer
66

77
import processing.core.PFont;
88
import java.util.*;

Image Processing/ImageThresholding/ImageThresholding.pde

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
// Carla de Beer
2+
// Created: January 2018.
13
// Image thresholding.
24
// Algorithm adapted from: https://en.wikipedia.org/wiki/Thresholding_(image_processing)
3-
// Created: January 2018
45

56
PImage img;
67

Image Processing/ImageVoronoi/ImageVoronoi.pde

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// December 2017 //<>//
1+
// Carla de Beer //<>//
2+
// Created: December 2017.
23
// Using the k-nearest neighbour algorithm to break an image up into Voronoi colour fields.
34
// Press 'R' or 'r' to restart the sketch.
4-
// Carla de Beer
55

66
import processing.core.PFont;
77
import processing.data.FloatList;

Minimum_Spanning_Tree_Cities/City.pde

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class City {
2-
32
private float lon, lat;
43
private String name;
54

Minimum_Spanning_Tree_Cities/Minimum_Spanning_Tree_Cities.pde

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Carla de Beer
2-
// November 2016; updated October 2017
2+
// Created: November 2016; updated October 2017.
33
// Minimum Spanning Tree (Prim's Algorithm) connecting the 50 largest cities in the US.
44

55
// Based on Daniel Shiffman's Minimum Spanning Tree solution from the Coding Train coding challenges series:

Parametric Curves/ParametricGrid/Curve.pde ParametricCurves/ParametricCurveGrid/Curve.pde

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ class Curve {
33
float theta;
44
PVector vecPos;
55

6-
Curve(PVector _vecPos) {
7-
vecPos = _vecPos;
6+
Curve(PVector vecPos) {
7+
this.vecPos = vecPos;
88
theta = 0.0;
99
}
1010

Parametric Curves/ParametricGrid/ParametricGrid.pde ParametricCurves/ParametricCurveGrid/ParametricCurveGrid.pde

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Carla de Beer
2-
// January 2015
3-
// Parametric curve sketches on a 4 x 4 grid
2+
// Created: January 2015.
3+
// Parametric curve sketches on a 4 x 4 grid.
44

5-
public static final int STOP = 90;
65
Curve [][] curves;
76
int rows = 4;
87
int cols = 4;

Parametric Curves/ParametricCurves/ParametricCurves.pde ParametricCurves/ParametricCurves/ParametricCurves.pde

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Carla de Beer
2-
// Created: January 2014
3-
// Updated: March 2018
4-
// Lissajous and parametric curve equations that generate geometric patterns.
2+
// Created: January 2014; updated: March 2018.
3+
// Parametric and Lissajous curve equations.
54
// Inspiration taken from: "Chapter 10: Paramteric Equations and Polar Coordinates" in:
65
// STEWART, J., 2012. "Calculus Early Transcendentals". 7th Edition, p636 - 641.
76

8-
// Run the bash script executable from the terminal with the command `./runSketch <num>` where <num> in an integer value between 1 and 15.
7+
// Run the bash script executable from the terminal with the command `./runSketch <num>`
8+
// where <num> in an integer value between 1 and 15.
99

1010
int choice;
1111
float r = 165.0;
@@ -98,12 +98,12 @@ PVector getCoordinates(int choice) {
9898
y = 1.5*r*sin(10*theta);
9999
break;
100100
case 6:
101-
// 6. Parametric curve equation (heart)
101+
// 6. Parametric curve equation
102102
x = 1.5*r*pow(cos(5*theta*PI), 3);
103103
y = 1.5*r*pow(sin(4*theta*PI), 3);
104104
break;
105105
case 7:
106-
// 7. Parametric curve equation
106+
// 7. Parametric curve equation (heart)
107107
x = 60*5*pow(sin(theta), 3);
108108
y = 60*(4*cos(theta) - 1.3*cos(2*theta) - 0.6*cos(3*theta) - 0.2*cos(4*theta)) + 25;
109109
break;

0 commit comments

Comments
 (0)