Sketching with Math and Quasi Physics
This is a collection of physics- and math-related sketches and snippets intended as references for creating code-based artworks and animations. Rather than trying to understand the world perfectly or solve real-world problems, the goal here is to sketch things that feel interesting—even if they’re not perfectly accurate—hence “quasi physics.”
コードを使った作品やアニメーション制作の参考用に物理や数学関連サンプルなどをまとめたもの。世の中を正しく理解したり、問題を解決したりすることが目的ではなく、正確さにはあまり構わず面白そうなものをスケッチすることが目的なので、「quasi=擬似」物理学と呼んでいます。
- Many intros for Sketching with Code
- Newton and Vectors ニュートンとベクトル
- Distance 距離
- Rotation 回転
- Wave 波
- Light 光
- Projection and 3D Rendering プロジェクションと3Dレンダリング
- Colors and Numbers 色と数値
- Image Processing 画像処理
- 2D Feedback Systems 2次元フィードバックシステム
- Calculus for Makers 作るための微積分
- Patterns パターン
- Curves 曲線
- Mapping 写像
- Chaos Theory カオス理論
- Reading “Attention Is All You Need”
- Math Snippets
- Bowls and Pringles お椀とプリングルス
- Complex Exponentiation 複素数の累乗
- Complex Mappings 複素数のマッピング
- Complex Multiplication 複素数の掛け算
- Galton Pegboards ガルトン・ボード
- Gift Wrapping ギフトラッピング
- Non-Euclidean Spaces 非ユークリッド空間
- Principal Component Analysis 主成分分析
- Riemann Circle Projection リーマン円周への射影
- Visualizing Graphs グラフの可視化
- Zeta Function ゼータ関数
- Geometric Drawings 幾何学ドローイング
- Fourier Series フーリエ級数
- Taming Randomness ランダムさを手なづける
- Interpolation and Animation 補間とアニメーション
- Vector Operations ベクトルの操作
- Detecting Collision 衝突判定
- Kinematics キネマティクス
- Numbers and Intervals 数と音程
- Mixing Colors 色を混ぜる
- Pencils, Brushes and Paints 鉛筆、筆、絵の具
- Physical values and human perception 物理的な値と人間の知覚
- Resolution 解像度
- Dimensions 次元
- Camera in Action 働くカメラ
- Reading “Raymarching - Primitives”
- Drawing Landscape
- Reading a Noise Function
- Filling Space with Colors 空間を色で満たす
- Neural Network ニューラルネットワーク
- FAQs
アイデアの種的なものが多いので解説は雑ですが、詳しい解説や参考サイトの翻訳などはリクエストがあればどうぞ。
Most of the contents are from Sketching with Math and Quasi Physics (2019), and the other workshop materials or self-educational notes. The majority of them were originally in English, but some were in Japanese first. The translations were done with the help of AI in both directions.
ほとんどの内容やSketching with Math and Quasi Physics(2019)や、ワークショップのための資料、自分の勉強のためのノートなどをもとにしています。主に英語がオリジナルですが、日本語が先のものもあります。翻訳はどちら向きにもAIの手助けを借りました。
I used p5.js for most of the code samples, unless otherwise noted. However, I tried to write them in a way that can be applied to any environment as much as possible. Most of the examples are quite old, so the quality is not guaranteed .
コードのサンプルは特に断りがない場合はp5.jsを用いていますが、できるだけどんな環境でも応用できるように書きました。古いサンプルも多く、クオリティの保証はしません。
I am not a mathematician or computer engineer. This is simply a compilation of ideas that I have found useful from the perspective of a visually oriented person. If you notice any mistakes, have better examples, or know of links that would aid in learning, please share them with me. In this context, I am less interested in show-off demos, so please refrain from providing tweet-length shaders or similar content.
私は数学者でもコンピュータエンジニアでもありません。これはあくまで、ビジュアル畑の人間から見て便利だと思ったアイデアをまとめたものです。間違いの指摘や、学習に役だつもっと良い例やリンクなどあれば、ぜひ送ってください。