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
| #include "pico/stdlib.h" | |
| #include "pico_graphics.hpp" | |
| /* | |
| # RASTERIZATION OF BÉZIER CURVES WITH WIDTH | |
| Bézier curves follow a generic formula `B(t) = SUM(binomial(i, n) (1 - t)^(n - i) t^i P_i)` | |
| In our case, we are interested in Bézier curves of order 2 and 3. | |
| To draw the curve, we simply compute a large amount of points along the curve. |
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
| #include "pico/stdlib.h" | |
| #include "pico_graphics.hpp" | |
| /* | |
| # RASTERIZATION OF ELLIPSES | |
| We start from the equation of a rotated ellipse: | |
| `(x cosθ - y sinθ)² / a² + (x sinθ + y cosθ)² / b² = 1` | |
| with | |
| - `a` the major radius, |
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
| #!/bin/env python | |
| import sys | |
| import os | |
| import os.path | |
| import argparse | |
| import PIL.Image | |
| # write the selected tile to the output | |
| def write_chr_square (data, tile_x, tile_y, output): |
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
| // | |
| // | |
| // | |
| // | |
| // Specify that the target system is the NES | |
| config { | |
| format = "nes", | |
| } |
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
| // title: Bunny catch stuff | |
| // author: Acekid, Harraps | |
| // desc: the bunny must catch stuff | |
| // script: wren | |
| import "random" for Random | |
| class World { | |
| // GETTERS |
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
| """ | |
| Given three textures, generate an index texture | |
| that can be used in godot with the object shader | |
| parameters: | |
| 1 - input indexes texture (just saturated colors) | |
| 2 - input gradient (grayscale) | |
| 3 - input unlit (grayscale) | |
| 4 - output name (without extension) | |
| """ |
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
| #!/usr/bin/fish | |
| set -l us (env TZ="America/Los_Angeles" date +%R) | |
| set -l eu (env TZ="Europe/Brussels" date +%R) | |
| set -l jp (env TZ="Asia/Tokyo" date +%R) | |
| #echo $us | |
| #echo $eu | |
| #echo $jp |
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
| #!/usr/bin/coffee | |
| # | |
| # Display an array of pandas holding signs | |
| # | |
| # args: | |
| # -b / --bold : display the pandas as bold text | |
| # -C / --centered : display the pandas in the center of the terminal | |
| # -c / --colored : prepend each text by the color to use |
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
| #!/usr/bin/coffee | |
| # | |
| # Display a single bunny displaying japanese text vertically | |
| # | |
| # args: | |
| # -b / --bold : display the bunnies as bold text | |
| # -C / --centered : display the bunnies in the center of the terminal | |
| # -c / --colored : prepend each text by the color to use |
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
| #!/usr/bin/coffee | |
| # dependencies | |
| os = require "os" | |
| bunny = require "./bunny-sign.coffee" # my bunny-sign.coffee script | |
| util = require "util" | |
| exec = require("child_process").exec | |
| # and also ncmpcpp | |
| # display current song information |
NewerOlder