Skip to content

Instantly share code, notes, and snippets.

View CIOSAI's full-sized avatar
🥨
PLEASE where can i find breze in Taiwan

jy CIOSAI

🥨
PLEASE where can i find breze in Taiwan
View GitHub Profile
@CIOSAI
CIOSAI / genuary2025-7.html
Created January 7, 2025 13:08
genuary 2025 day 7
<!DOCTYPE html>
<html lang="zh_TW">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta author="CIOSAI_tw">
<title>day 7</title>
<script>
//genuary 2025, day 7, "Use software that is not intended to create art or images."
window.onload = () => {
@CIOSAI
CIOSAI / heart.glsl
Created December 9, 2024 19:17
simple 2d sdf of a heart
float box(vec2 p){
vec2 q = abs(p);
return max(q.x,q.y);
}
// /.-\
// | |
// \ / <- center is here, it's a bit top-heavy
// \/
float heart(vec2 p){
@CIOSAI
CIOSAI / text2ascii.py
Created November 28, 2024 15:04
text2ascii.py
# can be ran on python REPL
text = "ABC"
",".join(list(map(str,map(ord,text))))
# returns "65,66,67"
@CIOSAI
CIOSAI / ascii2text.py
Created November 28, 2024 14:51
ascii2text.py
# can be ran on python REPL
# has to be NUMBER,NUMBER,NUMBER... with no space
# or modify the split(",") idc
# A B C
text = "65,66,67"
"".join(list(map(chr,map(int,text.split(",")))))
@CIOSAI
CIOSAI / CIOSAI_tw-20241026.glsl
Created October 26, 2024 15:39
bonzo comp-some attractor thing-26.10.2024
// by CIOSAI_tw at 26 OCT 2024
// runs on bonzo comp (wrighter)
// capture : https://imgur.com/E707RnL
#version 420 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform float fFrameTime; // duration of the last frame, in seconds
@CIOSAI
CIOSAI / nusan_mesh.comp.glsl
Created September 3, 2024 16:37
orthogonal grid constrained to an sdf with compute shader
#version 420 core
// code adapted from wrighter https://gist.github.com/wrightwriter/53395a7a50f38eb5079cce80306360e3
// runs on bonzomatic https://github.com/wrightwriter/Bonzomatic-Compute
// inspired by nusan https://demozoo.org/sceners/88839/
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform float fFrameTime; // duration of the last frame, in seconds
@CIOSAI
CIOSAI / TaipeiMetroStations.py
Created December 16, 2023 09:01
臺北捷運各線、站/All running stations of Taipei Metro and their route (Mandarin)
# id 有重複者代表有支線
# 支線交匯站如 北投 在主線跟支線重複出現
# 轉乘站如 中山 也會重複出現
raw_data = {
"delimiter": " – ",
"lines": [
{"id": "BR", "source": "動物園 – 木柵 – 萬芳社區 – 萬芳醫院 – 辛亥 – 麟光 – 六張犁 – 科技大樓 – 大安 – 忠孝復興 – 南京復興 – 中山國中 – 松山機場 – 大直 – 劍南路 – 西湖 – 港墘 – 文德 – 內湖 – 大湖公園 – 葫洲 – 東湖 – 南港軟體園區 – 南港展覽館"},
{"id": "R", "source": "淡水 – 紅樹林 – 竹圍 – 關渡 – 忠義 – 復興崗 – 北投 – 奇岩 – 唭哩岸 – 石牌 – 明德 – 芝山 – 士林 – 劍潭 – 圓山 – 民權西路 – 雙連 – 中山 – 台北車站 – 台大醫院 – 中正紀念堂 – 東門 – 大安森林公園 – 大安 – 信義安和 – 台北101/世貿 – 象山"},
{"id": "R", "source": "北投 – 新北投"},
{"id": "G", "source": "松山 – 南京三民 – 台北小巨蛋 – 南京復興 – 松江南京 – 中山 – 北門 – 西門 – 小南門 – 中正紀念堂 – 古亭 – 台電大樓 – 公館 – 萬隆 – 景美 – 大坪林 – 七張 – 新店區公所 – 新店"},
@CIOSAI
CIOSAI / TemplateProgram.kt
Created September 20, 2022 02:39
sussy video is now better organized
import kotlinx.coroutines.delay
import org.openrndr.animatable.Animatable
import org.openrndr.animatable.AnimationEvent
import org.openrndr.animatable.PropertyAnimationKey
import org.openrndr.animatable.easing.Easing
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.*
import org.openrndr.extra.color.presets.DARK_BLUE
import org.openrndr.ffmpeg.ScreenRecorder
@CIOSAI
CIOSAI / TemplateProgram.kt
Created September 19, 2022 12:24
sussy video rendered with cat lin
import kotlinx.coroutines.delay
import org.openrndr.animatable.Animatable
import org.openrndr.animatable.easing.Easing
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.*
import org.openrndr.extra.color.presets.DARK_BLUE
import org.openrndr.ffmpeg.ScreenRecorder
import org.openrndr.math.mix
import org.openrndr.shape.Circle
@CIOSAI
CIOSAI / EdgeTracingShader
Created August 20, 2022 07:11
Edge Tracing Shader in Godot
shader_type canvas_item;
uniform sampler2D tex;
uniform float intensity;
uniform vec4 color : hint_color;
uniform float speed;
float sample(in vec2 st){
return texture(tex, st).a;
}