Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Baku 麦 baku89

🎯
Focusing
View GitHub Profile
View render-timelapse-video-in-a-directory.sh
for i in *.mp4; \
do ffmpeg -i "$i" \
-c:v prores_ks -profile:v 3 -vendor apl0 -bits_per_mb 8000 -pix_fmt yuv422p10le \
-vf select='not(mod(n\,900))',setpts=N/FRAME_RATE/TB \
-an \
"${i%.*}".mov; \
done
View polyline-plus-arc.js
/*
{
"id": "9cwrv2kxip",
"label": "Polyline + Arc",
"icon": "【",
"parameters": [
{
"name": "strokeColor",
"type": "color",
"default": "#282a2e"
View cmd-pen-tool.js
/*
{
"id": "9mpi7vhkir",
"label": "Cmd Pen Tool",
"icon": "⌘",
"parameters": [
{
"name": "strokeColor",
"type": "color",
"default": "#282a2e"
View Arc pen
/*
{
"id": "hreyajl6hh",
"label": "Arc Pen",
"icon": "ノ",
"parameters": [
{
"name": "strokeColor",
"type": "color",
"default": "#282a2e"
View ram_preview.py
# Requires to place Viewport Preview ROP (https://github.com/baku89/nops/blob/main/otls/viewport_preview.hdalc)
# on the OBJ context
def getCurrentNetworkEditorPane():
editors = [pane for pane in hou.ui.paneTabs() if isinstance(pane, hou.NetworkEditor) and pane.isCurrentTab() and pane.pwd().path().startswith("/obj")]
if len(editors):
return editors[0]
pane = getCurrentNetworkEditorPane()
@baku89
baku89 / blue-circle.clj
Last active May 19, 2021
future_sketches
View blue-circle.clj
(background "#E9EDF4")
(style (fill "royalblue")
(circle [50 50] 50)
(text "Code as Data" [150 50]))
@baku89
baku89 / principles_ja.md
Last active May 14, 2021
Principles for Unclichéd Generative Arts
View principles_ja.md

Don't show off what can be realized with the tool

スペック的にやれることを生かしきらない

  • 3DCGツールで2Dグラフィックスをつくる
  • 動画ソフトで静止画をつくる
  • GPU処理で本当は100万パーティクル出せるところを、あえて5個だけでめっちゃ良い感じに動かす

Try tiresome (but not impossible) expressions

View manhattan.vex
removeprim(0, 0, 0);
vector p0 = point(0, "P", 0);
vector p1 = point(0, "P", 1);
vector mid;
mid.x = p1.x;
mid.y = p0.y;
View generate_circumcircle
vector2 calc_angle_range(vector c; vector p0; vector p1) {
vector2 p = set(p0.x, p0.y) - set(c.x, c.y);
vector2 q = set(p1.x, p1.y) - set(c.x, c.y);
float start = atan(p.y, p.x);vector2 calc_angle_range(vector c; vector p0; vector p1) {
vector2 p = set(p0.x, p0.y) - set(c.x, c.y);
vector2 q = set(p1.x, p1.y) - set(c.x, c.y);
float start = atan(p.y, p.x);
View eslitrc.js
module.exports = {
root: true,
env: {
node: true,
commonjs: true,
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-essential',
'@vue/typescript/recommended',