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
Inertia Rails: The One-Person Framework with React & Friends
skryukov
0
380
Vapor Mode でアクセシビリティは 壊れないか検証した話
fuqda
1
320
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
16
8.5k
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
100
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
4
3.1k
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
410
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.6k
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
350
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.8k
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
350
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
870
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.7k
Fireside Chat
paigeccino
43
4.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
550
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
The SEO Collaboration Effect
kristinabergwall1
1
620
Utilizing Notion as your number one productivity tool
mfonobong
4
640
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
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