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
Distance field of Julia set
Search
kinakomoti-321
November 07, 2026
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Distance field of Julia set
ゆるゆるシェーダー交流会 #2 で発表した
kinakomoti-321
November 07, 2026
More Decks by kinakomoti-321
See All by kinakomoti-321
Introduction for Fur, Hair Rendering
kinakomoti321
0
690
RT Camp 11 Renderer
kinakomoti321
0
110
Introduction for Projective Geometric Algebra
kinakomoti321
3
740
RT Camp 10 Renderer
kinakomoti321
0
270
How were Quaternion discovered
kinakomoti321
2
1.4k
SH,MonoSH Lightmap Shader
kinakomoti321
1
1.2k
Henjou-Renderer
kinakomoti321
0
500
Volume Expression GGX(Microfacet)
kinakomoti321
1
4.4k
thin film interference BSDF and Bismuth Growing Algorithm
kinakomoti321
1
1.5k
Other Decks in Programming
See All in Programming
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
180
Kotlinの15年とServer-Side Kotlin
n_takehata
1
200
はじめてのPLATEAU
nokonoko1203
1
370
AI Augmentation Techniques with Liberty
ivargrimstad
1
350
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
5.1k
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
2
240
ChromeでローカルLLM
ryu1013
0
190
AI-Powered Domain-Driven Design
ziobrando
0
390
Performance Optimization With LLMs
xleitix
0
240
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
220
Getting Started with Vibe Coding
miccheng
0
180
Modernizing iOS Apps
seyfoyun
0
150
Featured
See All Featured
Test your architecture with Archunit
thirion
2
2.5k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
320
Un-Boring Meetings
codingconduct
0
490
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
830
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.6k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
420
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
730
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The Curse of the Amulet
leimatthew05
3
16k
Transcript
ジュリア集合の距離場 ゆるゆるシェーダー交流会 #2 kinankomoti
自己紹介 • kinankomoti • 読み: きなこもち • Shader とか書いています
ジュリア集合 • ある複素数 𝑐 ∈ ℂ に対して、複素数 𝑧0 ∈ ℂ
について次のような漸化式を考える 𝑧𝑖+1 = 𝑧𝑛2 + 𝑐 • 𝑖 → ∞ の時、発散しない 𝑧0 の集合を 𝑐 のジュリア集合という • 指数が 2 じゃなくてもよかったりする
ジュリア集合 • 複素平面でジュリア集合を塗りつぶすとこんな感じ • 𝑐 ∈ ℂ ごとにジュリア集合がある • 発散の判定までにかかった時間使うといい感じの色になる
マンデルブロ集合 • 𝑐 に対して、原点がそのジュリア集合に含まれている 𝑐 の集合をマンデルブロ集合という • ジュリア集合の一部分を集めたもの、というような関係 (断面図と表現されることも) •
どちらかというと、ジュリア集合の方が研究対象になる
ジュリア集合の距離場 • なんとジュリア集合の距離場(distance field) が考えられている • しかも、3D で • どうやって?
distance to fractals – 2004 by iq
ジュリア集合の距離場 • 3つぐらいの要素に分かれている 1. 距離場の推定 2. ジュリア集合の距離場 3. 四元数によるジュリア集合
距離場の推定 • 実は陰関数によって表現される任意の形状は近似的に距離場が推定できる • 位置 𝑝 に対して定義される関数 𝑓 𝑝 について、
𝑓 𝑝 = 0 で作られる形状を考える 𝑓 𝑝 =0
距離場の推定 • 形状近くの点 𝑝について、形状までの最短距離のベクトルを 𝜖 とするとこんな式が書ける • |𝜖| が我々が欲しい距離の値 𝑓
𝑝+𝜖 =0 𝜖 𝑓 𝑝+𝜖 =0 𝑝
距離場の推定 • これをテイラー展開してみると 𝑓 𝑝 + 𝜖 ⋅ ∇𝑓 𝑝
+ 𝑂(𝜖 2 ) = 0 • 絶対値について、一次近似すれば 0= 𝑓 𝑝+𝜖 ≈ |𝑓 𝑝 + 𝜖 ⋅ ∇𝑓 𝑝 | • ここから三角不等式で 0 ≥ 𝑓 𝑝 − ∇𝑓 𝑝 ⋅ 𝜖 ≥ |𝑓 𝑝 − ∇𝑓 𝑝 ⋅ |𝜖|
距離場の推定 • 結果として距離 |𝜖| に対する近似的な最低値が求められる 𝑓(𝑝) 𝜖 ≥ |∇𝑓(𝑝)| •
これは一次近似に基づいているので、形状に近い位置ほど正しい距離場に近づく • 遠くに行くほど距離場としておかしくなるかも • とにかく距離場っぽいものが得られる
距離場の推定 • 距離場の推定には関数値 𝑓(𝑝′ ) と微分値 ∇𝑓(𝑝′ ) だけで良い •
微分値は数値計算とかで求められる • 綺麗なグラフの線を書けたりする • GraphToy はこれ使ってるらしい
ジュリア集合の距離場 • ジュリア集合にはいい感じのポテンシャル関数が定義されている • Hubbard-Douady potential 𝐺𝑐 (𝑧) log |𝑧𝑛
| 𝐺𝑐 𝑧 = lim 𝑛→∞ 2𝑛 • 𝐺𝑐 はジュリア集合に近づくほど 0 になっていく性質 • ジュリア集合は 𝑮𝒄 𝒛 = 𝟎 で定義できる! 𝐺𝑐 𝑧 = log 𝑧 + const + 𝑜(1) • 元々は boettcher map という写像から来ている、色々便利らしい
ジュリア集合の距離場 • 実際には極限は計算できないので、どっかで打ち切る 𝑑 𝑧 ≈ 𝑧𝑛 log |𝑧𝑛 |
|𝑧𝑛′ | • 𝑧𝑛′ の計算は結構簡単、ジュリア集合の漸化式を微分すればよい ′ 𝑧𝑛+1 = 2 𝑧𝑛 𝑧𝑛′ , with 𝑧0′ = 1 • 計算を軽くするため、漸化式を以下のように計算する場合もある ′ 2 = 4 𝑧 2 𝑧′ 2 𝑧𝑛+1 𝑛 𝑛
ジュリア集合の距離場 • これでジュリア集合の距離場ができる!
ジュリア集合の距離場 • なんかこういう式もある(The Science of Fractal Images) 𝑑 𝑧 ≤
2 sinh 𝐺 𝑧 |𝐺′(𝑧)|
3 次元ジュリア集合 • 複素数 𝑧 ∈ ℂ ではなく四元数 𝒒 ∈
ℂ𝟒 を使うだけ • 3次元座標(𝑥, 𝑦, 𝑧) に対して 𝑞 = 𝑥 + 𝑦𝑖 + 𝑧𝑗 として以下の漸化式を考えて、ジュリア集合を構成する 𝑞𝑖+1 = 𝑞𝑛2 + 𝑐 • 4次元ジュリア集合の 𝑤 = 0 の断面を見ている感じ、どう座標を扱うかはある程度自由
3 次元ジュリア集合 • これ計算すればOK! 𝑞𝑛 log |𝑞𝑛 | 𝑑 𝑞
= |𝑞𝑛′ | ′ 𝑞𝑛+1 = 2𝑞𝑛 𝑞𝑛′
3 次元ジュリア集合
参考文献 • distance to fractals • 3D Julia sets •
distance estimation • The science of fractal images • Distance estimation method for drawing Mandelbrot and Julia sets