Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ソースコードを読もう
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Sigma
October 10, 2022
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ソースコードを読もう
Blenderのプラグインのソースコード読んだ話の触り
Sigma
October 10, 2022
Transcript
13 slides
ソースコードを読もう Blenderのプラグインの場合
読むプラグイン 「add_curve_ivygen.py」 • Ivy(つた)を生やすプラグイン • つたの写真→
どういう風に使えるか • 動画を作ってみました
None
ソースコードを眺める
None
ガウスの名前が出てきた • 読めないかも… ◦ 19世紀の大数学者 ◦ 複雑な理論に基づいている可能性 • 業績が多くて名前だけでは絞れない
ヒントを探す • 数値積分っぽいコードを発見 ◦ パラメータを乗じて総和取ってる ◦ idxとかあるし多分数値積分 (ガウス求積)やろ • 完全に数値積分だと勘違いしてハマった
◦ ガウス求積の変形を調べても合うパラメータが無い ◦ ノードを求めるアルゴリズムが書いてない ◦ そもそも何を積分してるんや
もっとヒントを探す • 「うんたらvector」が「smoothうんたらvector」に ◦ 滑らかにするアルゴリズムか … • filterって書いてある ◦ ガウシアンフィルターは平滑化処理
… • idxはこれなんだろう ◦ indexをidxって略すことがあるらしい、しらないよ … ◦ 0以上 numnode-1 以下ならI+k-5 ◦ forループは11回まわる ◦ つまり、現在のノードを中心に手前のノード 5個と後ろのノード 5個を 合わせた11ノードに対しての処理 • ガウシアンフィルターとは ◦ ガウス関数(ガウシアン)を元にした主に画像などに使われる平滑化 フィルター ◦ 「ガウシアンぼかし」とも ◦ GIMPにも実装されてる
ガウシアンフィルター(GIMP: ぼかし半径10)
一次元のガウシアンフィルターx3 • 一次元のガウシアンフィルターが実装されていた ◦ つたがガタつかないように、 x軸のバラつき、y軸のバラつき、z軸のバラつきをそれぞれ平滑化してい る。
こんな感じの処理をxyz軸それぞれに
まとめ • 便利なプラグインのソースコードを覗いたら色んな数学が使われてた ◦ ガウシアンフィルターの応用 ◦ スプライン補間 ◦ ベクトル関連色々 ◦
行列
More Decks by Sigma
See All by Sigma
Proxmox_VE.pdf
seiyasugimoto
0
250
Stable Diffusionで遊んでみた
seiyasugimoto
1
160
EVAフレームワーク
seiyasugimoto
0
130
SSR+SPA
seiyasugimoto
0
170
Nuxtにおける設計
seiyasugimoto
0
110
Atomic Designを ディレクトリ以外で表現
seiyasugimoto
0
100
throttleすげぇぇぇ
seiyasugimoto
0
95
スマホでPythonしたい
seiyasugimoto
0
83
平文で保存するな!
seiyasugimoto
0
110
Other Decks in Programming
See All in Programming
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
610
protojson における文字化けの扱い
kazuki1023
0
460
AIコーディング時代のKotest ユニットテストから APIレベルの仕様固定化テストへ
ooga04
0
340
将来の標準フォーマッター?ktfmtを深堀る
t45k
0
250
SONY CISC-NEWS NWS-1750 + NWB-225 ハードウェアメンテとフレームバッファカラー対応 / KOF2026
tsutsui
0
140
あなたはMCPの機能を、まだ知らない。
4geru
1
740
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
190
はじめてのKubernetesコントリビューション
nasa9084
0
320
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
210
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
520
AIエージェントの「テストは通るのに本番で壊れる」を減らす
shibuiwilliam
3
120
Featured
See All Featured
A Soul's Torment
seathinner
9
4k
Scaling GitHub
holman
464
140k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
620
A Tale of Four Properties
chriscoyier
163
24k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The untapped power of vector embeddings
frankvandijk
2
2k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k