Sampling & distribution · 9 / 10

Alias Method

前処理した表から重み付き抽選を高速に繰り返す。

Compare in motion

重み付きの粒子種

Synchronized comparison
AReference
種類を同じ確率で選ぶ

種類を同じ確率で選ぶ

BAlias Method100%
多くの粒子を高速に重み付き選択できる

多くの粒子を高速に重み付き選択できる

Loading demo…

Scrub to pause and inspect. At 0%, B matches A; at 100%, B shows the effect. The scene repeats every 8 seconds.

Look for: エイリアス表から抽選 → 偏りに応じた種類が出る。

This model simplifies the technique to show its use case and effect. Operation counts describe the model; they are not performance measurements.

Read the storyboard

例: 重み付きの粒子種

  1. 1. Start

    種類ごとの確率

  2. 2. Change

    エイリアス表から抽選

  3. 3. Result

    偏りに応じた種類が出る

多くの粒子を高速に重み付き選択できる。時間変化を示す模式図です。実際の描画結果や処理速度を再現したものではありません。

How it works

  1. 1. Input

    離散分布の重み

  2. 2. Process

    エイリアス表を前処理

  3. 3. Result

    定数時間の重み付き抽選

A schematic of Alias Method. It shows the relationship between input, process, and result; exact values and rendering depend on the implementation.

Further reading

Fast Poisson Disk Sampling in Arbitrary Dimensions ↗

A general reference for this subcategory.