Skip to content

Commit d23c8a3

Browse files
committed
made some changes to comments regarding future plans
1 parent b53d07c commit d23c8a3

File tree

4 files changed

+51
-12
lines changed

4 files changed

+51
-12
lines changed

index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ <h1 class="title">Processing Projects</h1>
4141
these generative sketches towards a goal with some sort of genetic
4242
algorithm.
4343
<dt>
44+
<a href="sunset">sunset behind mountains</a>
45+
<dd>a still picture of the sun setting behind some mountains. I had the
46+
cascades in mind when i made this. it takes a second to load. alternate
47+
title: fun with gradients.
48+
<dt>
4449
<a href="riding">riding for the feeling</a>
4550
<dd> I was just watching
4651
<a href="https://www.youtube.com/watch?v=yYg6eIH7qR8&list=RD6gRheCFcllA">this video</a> and i realized that 1) it looked similar to the
@@ -49,10 +54,6 @@ <h1 class="title">Processing Projects</h1>
4954
what the best practices are for animating the triangles onto and
5055
off of the canvas, but I can think of a couple ways off hand..
5156

52-
53-
54-
55-
5657
</dl>
5758
</body>
5859
</html>

riding/riding.pde

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
/* NOTE FOR FUTURE CHANGES!:
22
*
3-
* I was thinking about how to draw the mountains incorrectly.
4-
* mountains can be basically described as equilateral or isoceles.
5-
* so all you need to do is randomly place points throughout a horizontal
6-
* band and then evenly balance the base coordinates.
3+
* Made those changes but it still doesnt exactly match the video
4+
* that I based this off of. This is because when people paint
5+
* mountains they dont allow the peaks to be very close. the
6+
* mountains are also oddly pointy.
77
*
8-
* Then you can get them to overlap by having a variance of about +/-100
9-
* pixels as you add them to the mountain arraylist.
10-
*
11-
* but now i am going to bed.
8+
* I can probably address these things, but I'm not sure if i care
9+
* that much.
1210
*
11+
* options for rounding mountains:
12+
* 1. create new shape
13+
* 2. rotate a rectangle with curved edges. tricky!
1314
*/
1415

1516

@@ -54,6 +55,7 @@ void setup() {
5455

5556
void draw() {
5657
background(255);
58+
5759
/*
5860
for (int i=0; i<4; i++) {
5961
mountainList.get(i).moveMountain();

sunset/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<script src="../js/processing-1.4.1.js"></script>
2+
<canvas data-processing-sources="sunset.pde"></canvas>
3+
4+
<br>
5+
<a href="sunset.pde">source code</a>

sunset/sunset.pde

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
size(600,430);
2+
colorMode(HSB, 360,100,100);
3+
noStroke();
4+
5+
for (int i=0; i<250; i++) {
6+
for (int j=0; j<600; j++) {
7+
stroke(227, 100-(i/2.6), 98); //gradient for blue sky
8+
point(j,i);
9+
}
10+
}
11+
12+
for (int i=250; i<410; i++) {
13+
for (int j=0; j<600; j++) {
14+
stroke(56-((i-250)/5.0), 0+(i-250), 95); //gradient for orange/yellow
15+
point(j,i);
16+
}
17+
}
18+
noStroke();
19+
fill(52, 58, 100);
20+
arc(300,410, 100,60, PI,TWO_PI); //the sun!
21+
22+
//20 fancy mountains.
23+
for (int i=0; i<20; i++) {
24+
fill(0);
25+
int space = int(random(20)); //add random spacing between mountains
26+
triangle(i*30-30+space, 410, (i*30)+space, 375, (i*30+30)+space, 410);
27+
}
28+
29+
rect(0,410, 600, 20); //just a little extra fill
30+
31+

0 commit comments

Comments
 (0)