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
""" | |
A fading effect created by manipulating a bytearray that underlies a Surface object | |
""" | |
import math, pygame | |
def main(): | |
pygame.init() | |
size = width, height = 320, 240 | |
screen = pygame.display.set_mode(size) |
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
""" | |
Ray tracing demo with BVH structure | |
Based on https://raytracing.github.io/books/RayTracingTheNextWeek.html | |
""" | |
from __future__ import annotations | |
import random | |
from timeit import default_timer as timer |
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
package main | |
import ( | |
"fmt" | |
"image" | |
"image/color" | |
"image/gif" | |
"math" | |
"os" | |
) |