This file contains 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
print(*[chr(0x48656c6c6f2c20776f726c6421>>i*8&255)for i in range(103//8+1)][::-1],sep="") |
This file contains 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
def lerp(points: List[Point], t: float) -> Point: | |
if len(points) == 2: | |
return (1 - t) * points[0] + t * points[1] | |
return lerp([lerp(points[:-1], t), lerp(points[1:], t)]) |
This file contains 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
# Wireframe renderer by Matthias (https://github.com/Matthias1590) | |
# Inspired by Mattbatwings' 3D Renderer video (https://www.youtube.com/watch?v=hFRlnNci3Rs) | |
from lamp_display import LampDisplay # Install via `pip install lamp_display`, source code available at https://github.com/Matthias1590/LampDisplay | |
from bresenham import bresenham # Install via `pip install bresenham`, if you want to use another line drawing algorithm you can replace the draw_line function | |
from functools import cache # Builtin | |
import numpy as np # Install via `pip install numpy` | |
# Wireframe constants |