Skip to content

Instantly share code, notes, and snippets.

View merikhimo's full-sized avatar
🤡
clowning around

Alexander Shvedov merikhimo

🤡
clowning around
View GitHub Profile
@merikhimo
merikhimo / donut.py
Created January 19, 2023 10:06 — forked from Denbergvanthijs/donut.py
3D spinning donut in Python. Based on the pseudocode from: https://www.a1k0n.net/2011/07/20/donut-math.html
import numpy as np
screen_size = 40
theta_spacing = 0.07
phi_spacing = 0.02
illumination = np.fromiter(".,-~:;=!*#$@", dtype="<U1")
A = 1
B = 1
R1 = 1