Skip to content

Instantly share code, notes, and snippets.

View vishrutkmr7's full-sized avatar
¡Visca El Barça!🔵🔴

Vishrut Jha vishrutkmr7

¡Visca El Barça!🔵🔴
View GitHub Profile
@vishrutkmr7
vishrutkmr7 / donut.py
Created March 3, 2024 09:53
Python implementation of the classic spinning donut rendering algorithm, inspired by the C/C++ code and explanation on a1k0n.net (https://www.a1k0n.net/2011/07/20/donut-math.html)
import math
import numpy as np
# Constants and screen setup
theta_spacing = 0.07
phi_spacing = 0.02
R1 = 1
R2 = 2
K2 = 5
screen_width = 80 # Example screen width
@vishrutkmr7
vishrutkmr7 / keybase.md
Created September 5, 2023 00:26
Keybase: Prove your GitHub identity

Keybase proof

I hereby claim:

  • I am vishrutkmr7 on github.
  • I am vishrutjha (https://keybase.io/vishrutjha) on keybase.
  • I have a public key whose fingerprint is 55FF 3ED1 D768 16A8 A1D9 9809 65C0 7A95 023F 2CA4

To claim this, I am signing this object: