Build the idea, one step at a time一步步建立理解
Need a math refresher?需要补一点数学基础?
Open only the tool you need; return here to use it in the next step.按需打开一个小工具,再回到本课把它用起来。
Exponentials & logarithms指数与对数Matrices & covariance矩阵与协方差STEP步骤 1 / 5
Measure distance in brush widths用“几倍宽度”测距离
Subtract the center μ from a location x. Divide by scale s: now the distance has no unit. At x = μ + s, the normalized distance is 1, regardless of whether the brush is one centimeter or one meter wide. Square it so the left and right sides receive the same value.位置 x 减去中心 μ,再除以尺度 s,距离就变成没有单位的“几倍宽度”。无论画笔宽一厘米还是一米,x = μ + s 处都是 1。平方让左右两侧得到相同的值。
STEP步骤 2 / 5
Turn distance into a fading weight把距离变成递减权重
The exponential e raised to a negative number gets smaller as that number becomes more negative. At the center, e⁰ = 1. The factor one half is the conventional Gaussian shape. At one, two and three scales, the weights are about 0.607, 0.135 and 0.011. These are pointwise weights, not percentages of probability inside a radius.e 的指数越负,结果越小。中心处 e⁰ = 1;前面的二分之一是高斯常用的尺度约定。离中心 1、2、3 倍尺度时,权重约为 0.607、0.135、0.011。这些是该位置的权重,不是某半径内的概率百分比。
STEP步骤 3 / 5
Stretch in three directions沿三个方向分别拉伸
In the brush’s own axes, use three widths and add three squared distances. A wide axis penalizes displacement less, so the shape extends farther there. Multiplying by opacity changes strength; changing scale changes spatial reach. Our kernel has peak one and is not a probability density normalized to integrate to one.在画笔自己的三个轴上,分别用三个宽度计算距离平方,再相加。宽的轴对偏移惩罚较小,因此延伸得更远。乘 opacity 改强度,改 scale 改空间范围。这里核的峰值是 1,并不要求像概率密度一样积分为 1。
STEP步骤 4 / 5
A matrix is a compact recipe矩阵是把配方写紧凑
Rotate a world displacement into the brush’s axes with Rᵀ, divide by the widths, square and sum. The matrix Σ packages the rotated squared widths; its inverse undoes them. This explains the quadratic form instead of asking you to memorize it. Covariance here has units of length squared.用 Rᵀ 把世界坐标中的偏移转回画笔自己的轴,除以宽度,再平方求和。Σ 把旋转后的宽度平方打包起来,Σ 的逆矩阵负责把它们除回去。这样就能理解二次型,而不只背公式。协方差的单位是长度平方。
STEP步骤 5 / 5
Store unconstrained numbers safely存储方便训练的数字
Learning a raw width could make it negative. Store ℓ instead and evaluate s = exp(ℓ). Store β and evaluate opacity with sigmoid. Store a quaternion for orientation and normalize it before constructing R. These activation steps are part of the model contract, not optional display effects.直接学习宽度可能把它改成负数。改为存 ℓ,使用时算 s = exp(ℓ)。存 β,使用 sigmoid 得到 opacity。方向用四元数存储,构造 R 前先归一化。这些激活步骤属于模型契约,不是可选的显示特效。
PUT NUMBERS IN代入数字
At x − μ = 2, scale 2 gives G = exp(−0.5) ≈ 0.6065. Scale 1 gives exp(−2) ≈ 0.1353. With opacity 0.8, their uncapped alphas are 0.4852 and 0.1083.偏移 x − μ = 2 时,尺度 2 得到 G = exp(−0.5) ≈ 0.6065;尺度 1 得到 exp(−2) ≈ 0.1353。若 opacity = 0.8,未截断 alpha 分别是 0.4852 和 0.1083。