Skip to content

Commit

Permalink
scattered begginings
Browse files Browse the repository at this point in the history
  • Loading branch information
athoug committed Dec 31, 2024
1 parent 37c9d19 commit f131e9a
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
36 changes: 36 additions & 0 deletions art/day-109/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>beginnings</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js"></script>

<style>
body {
padding: 0;
margin: 0;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

nav {
margin-bottom: 2rem;
}

nav a {
padding: 0.5rem;
}

canvas {
box-shadow: 0 3px 10px rgb(0 0 0 / 0.2);
}
</style>
</head>
<body>
<h1>scattered beginnings</h1>
<script src="./sketch.js"></script>
</body>
</html>
30 changes: 30 additions & 0 deletions art/day-109/sketch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const width = 400;
const height = 400;
const halfW = width / 2;
const halfH = height / 2;
let x;
let y;
let r = 100;
let theta = 45;
let s = 10;

function setup() {
createCanvas(width, height);
background(250);
// frameRate(30);
angleMode(DEGREES);
}

function draw() {
translate(halfW, halfH);
x = cos(theta) * r;
y = sin(theta) * r;
// the point of origin
// ellipse(0, 0, 5, 5);
ellipse(x, y, s, s);
// point(x, y);

theta += 1;
r = random(50, 150);
s = random(5, 20);
}
Binary file added art/day-109/thumbnail.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions scripts/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,14 @@
"format": "gif",
"blendMode": "color-dodge",
"year": 2023
},
{
"number": "109",
"title": "scattered beginnings",
"source": "./art/day-109",
"format": "gif",
"blendMode": "multiply",
"year": 2024
}
]
}

0 comments on commit f131e9a

Please sign in to comment.