28 lines
459 B
Plaintext
28 lines
459 B
Plaintext
# Kyler Olsen
|
|
# Apr 2024
|
|
# Hypotrochoid Example
|
|
|
|
SCREEN {
|
|
Width Scale: 100,
|
|
Height Scale: 100,
|
|
|
|
FPS: 60,
|
|
}
|
|
|
|
const R = 7;
|
|
const r = 4;
|
|
const d = 1;
|
|
|
|
const s = 0;
|
|
const e = 8*pi;
|
|
const m = cos(π/32);
|
|
|
|
ANIM offset {R:s <= x <= e,S:π/128,D:INCREASE}
|
|
|
|
GRAPH {
|
|
X: (R - r) * cos(t) + d * cos(((R - r) / r) * t),
|
|
Y: (R - r) * sin(t) - d * sin(((R - r) / r) * t),
|
|
T: ANIM {R:s+offset <= x <= e+offset,S:π/32},
|
|
C_w: ((t - s) / (e - s))
|
|
}
|