Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlettekk authored Nov 9, 2024
1 parent dc78c8a commit 101f94e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions art/jitter-scarlettekk/jitter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
@title: Jitter (The Downward Spiral)
@author: scarlettekk
@snapshot: jitter.png
*/


/* VARIABLES */
const spiralTightness = 0.00025;
const spiralSize = 1;
const jitterIterationDampener = 0.0001;
const jitterLengthDampener = 0.0005;
const jitterMaxAngle = 360;

setDocDimensions(125, 125); // center is 63, 63
const t = new bt.Turtle();
const tt = new bt.Turtle(); //used for tracking the pure spiral

t.jump([63,63]);
tt.jump([63,63]);
tt.up();
t.down();

for (var i = 0; i <= 4000; i++) {
tt.forward(i * spiralTightness); // track the
tt.right(spiralSize); // pure spiral
for (var z = 0; z < bt.randIntInRange(0, 50) * i * jitterIterationDampener; z++) {
t.right(bt.randInRange(0, jitterMaxAngle)); // introduce the jitter to the
t.forward(bt.rand() * i * jitterLengthDampener); // drawing turtle
}
t.goTo(tt.pos); // reset jitter for the next step
}

drawLines(t.lines());
drawLines(bt.text("the downward spiral", [3,10], 0.5));
drawLines(bt.text("coraline shuryn", [3,5], 0.5));
Binary file added art/jitter-scarlettekk/screenshots/jitter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/jitter-scarlettekk/screenshots/jitter2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/jitter-scarlettekk/screenshots/jitter3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 101f94e

Please sign in to comment.