Skip to content

Commit b998c9a

Browse files
committed
Add/rename personal interpretation. Add remaining Interpretation sketches from
Whitney. Add "process" sketches from Whitney.
1 parent ca53b1c commit b998c9a

File tree

43 files changed

+3194
-15
lines changed

Some content is hidden

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

43 files changed

+3194
-15
lines changed

(Software) Structures personal interpretations/Number_003_B_02_Alkov/Number_003_B_Alkov.pyde renamed to (Software) Structures personal interpretations/Number_003_B_02_Alkov/Number_003_B_02_Alkov.pyde

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,23 @@ from disc import Disc
1717
discs = None
1818

1919
# Number of passes for SandPainters to render.
20+
# Probably best not to tamper.
2021
Passes = 11
2122
NumDiscs = 100
2223

2324
def setup():
2425
size(700, 700)
2526
ellipseMode(RADIUS)
2627
smooth(4)
27-
background(255)
28+
background(216, 233, 255)
2829
frameRate(24)
2930

3031
# Make 100 discs, arranged linearly.
3132
discs = [Disc(i) for i in range(NumDiscs)]
3233

3334

3435
def draw():
35-
fill(255, 40)
36+
fill(216, 233, 255, 40)
3637
rect(0, 0, width, height)
3738

3839
# Move discs.

(Software) Structures personal interpretations/Number_003_B_02_Alkov/disc.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
# Disc object.
66
class Disc(object):
77
# SandPainters.
8-
NumSands = 1
8+
NumSands = 2
99

1010
def __init__(self, index):
1111
self.index = index
1212
self.x = random(width)
1313
self.y = random(height)
1414
self.velocityX = random(-1.0, 1.0)
15-
# self.destRadius = 20 + random(20)
1615
self.radius = 20 + random(20)
1716

1817
# Create sand painters.
@@ -25,13 +24,13 @@ def render(self, others, passes):
2524
# Find distance to other disc.
2625
distance = dist(disc.x, disc.y, self.x, self.y)
2726

28-
# intersection test
27+
# Intersection test.
2928
if distance < (disc.radius + self.radius):
3029

31-
# complete containment test
30+
# Complete containment test.
3231
if distance > abs(disc.radius - self.radius):
3332

34-
# find circle intersection solutions
33+
# Find circle intersection solutions.
3534
a = ((self.radius**2 - disc.radius**2 + distance**2) /
3635
(2 * distance))
3736
p2x = self.x + a * (disc.x - self.x) / distance
@@ -47,10 +46,6 @@ def render(self, others, passes):
4746
sandpainter.render(p3ax, p3ay, p3bx, p3by, passes)
4847

4948
def move(self):
50-
# # Move radius towards destination radius.
51-
# if self.radius < self.destRadius:
52-
# self.radius += 0.02
53-
5449
# Add velocity to position.
5550
self.x += self.velocityX
5651
self.boundsCheck()

(Software) Structures personal interpretations/Number_003_B_02_Alkov/sandpainter.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
# SandPainter object
55
class SandPainter(object):
6+
MaxG = 0.5
7+
68
def __init__(self):
79
self.p_variable = random(1.0)
810
self.color = random(234)
@@ -13,11 +15,11 @@ def render(self, x, y, otherX, otherY, passes):
1315
tpoint(self.calc(x, otherX, self.p_variable),
1416
self.calc(y, otherY, self.p_variable),
1517
self.color, 0.11)
16-
maxg = 0.5
17-
self.g_variable += random(-0.050, 0.050)
1818
self.p_variable += random(-0.050, 0.050)
19-
self.g_variable = constrain(self.g_variable, -maxg, maxg)
19+
self.g_variable += random(-0.050, 0.050)
2020
self.p_variable = constrain(self.p_variable, 0, 1.0)
21+
self.g_variable = constrain(self.g_variable,
22+
-SandPainter.MaxG, SandPainter.MaxG)
2123
w = self.g_variable / 10.0
2224
for i in range(passes):
2325
tpoint(self.calc(x, otherX, self.p_variable + sin(i * w)),

(Software) Structures personal interpretations/Number_003_B_02_Alkov/tpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
def tpoint(x, y, sandColor, opacity):
33
noStroke()
44
fill(sandColor, opacity * 255)
5-
rect(x, y, 1, 1)
5+
rect(x, y, 2, 2)

0 commit comments

Comments
 (0)