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
from typing import List, Tuple | |
from colors import hsl_to_rgb | |
import pygame as pg | |
import glm | |
from perlin_noise import PerlinNoise | |
import moviepy.editor as mp | |
import numpy as np | |
import csv |
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 hsl_to_rgb(h: float, s: float, l: float): | |
r, g, b = 0.0, 0.0, 0.0 | |
h = h / 256.0 | |
s = s / 256.0 | |
l = l / 256.0 | |
if s == 0: | |
r = g = b = l |
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
import taichi as ti | |
import taichi.math as tm | |
import pygame as pg | |
ti.init(arch=ti.gpu, default_fp=ti.f64, fast_math=False) | |
pg.init() | |
clock = pg.time.Clock() |
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
.......#..............................................#.#..#.#..#.....#.........#.....#............. | |
......................#..........................#.#.....................##......................... | |
......#...#.#...........#...#..........#...........#.........................#..........#..#........ | |
..........#.....#.....##..#..#..............#....#..........................##.#..#......#.....##... | |
.......#....#...#.......#..#......#...#..........#...........................####................... | |
...#.....#....#............#..#.#.....#.#................#..#........#.........#.................... | |
..............#...#....#....................#.#....#.##....#...#.#.# |
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
from typing import List, Tuple | |
import pygame as pg | |
pg.init() | |
pg.font.init() | |
clock = pg.time.Clock() | |
SCREEN = (720, 1280) |
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
package pong; | |
import processing.core.PGraphics; | |
import processing.core.PVector; | |
public class Ball extends GameObject { | |
private PVector vel; | |
private int mag; | |
public Ball(PVector pos, int mag) { |
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
package pong; | |
import processing.core.PGraphics; | |
import processing.core.PVector; | |
public class Ball { | |
private PVector pos; | |
private PVector vel; | |
private int mag; |
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
import java.io.IOException; | |
import java.net.InetSocketAddress; | |
import java.net.ProxySelector; | |
import java.net.URI; | |
import java.net.http.HttpClient; | |
import java.net.http.HttpRequest; | |
import java.net.http.HttpResponse; | |
public class App { | |
public static void main(String[] args) { |
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
package pianocartesiano; | |
public class App { | |
public static void main(String[] args) { | |
var piano = new PianoCartesiano(); | |
piano.add(new Punto()); | |
piano.add(new Triangolo()); | |
piano.add(new Cerchio()); | |
piano.add(new Vettore2D(new Punto(),new Punto())); | |
piano.draw(); |
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
package fileio; | |
import java.io.BufferedReader; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
public class FileTest { | |
public static final String FILENAME = "pippo.txt"; |