Created
January 31, 2025 14:38
-
-
Save Siss3l/e60b0b06ee23cc094317aaafcb0bd97a to your computer and use it in GitHub Desktop.
Genuary Art 2025 #genuary10 #genuary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""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.