Skip to content

Instantly share code, notes, and snippets.

@Siss3l
Created January 31, 2025 14:38
Show Gist options
  • Save Siss3l/e60b0b06ee23cc094317aaafcb0bd97a to your computer and use it in GitHub Desktop.
Save Siss3l/e60b0b06ee23cc094317aaafcb0bd97a to your computer and use it in GitHub Desktop.
Genuary Art 2025 #genuary10 #genuary
"""JAN Ten (credit: Darien Brito) | You can only use TAU in your code, no other number allowed."""
from flask import Flask, Response, request
app = Flask(__name__)
@app.route("/", methods=["GET"])
def start() -> Response:
return Response("""
<!DOCTYPE html>
<html>
<head>
<script src="./p.js"></script>
</head>
<body>
<script>
function setup() {
const canvas = TAU * TAU * TAU;
createCanvas(canvas, canvas);
background(TAU * TAU);
noStroke();
fill(TAU * TAU * TAU);
circle(TAU * TAU, TAU * TAU, TAU * TAU);
stroke(TAU * TAU * TAU);
translate(width/TAU, height/TAU);
for(let a = TAU; a < TAU * TAU; a += TAU) {
rotate(TAU/(TAU * TAU));
line(TAU, TAU, TAU * TAU, TAU);
}
}
</script>
</body>
</html>
""".strip(), content_type="text/html") # https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js
if __name__ == "__main__":
app.run(debug=False, host="localhost") # port=8e3

Comments are disabled for this gist.