mesh_displace_spectrum — 3D terrain op

데이터 종류: meshmesh

호출: import fullseye as fs; fs.ledger.mesh_displace_spectrum(V, F, wavelengths=(0.06, 0.03, 0.015, 0.0075, 0.00375), amplitudes=(0.003, 0.00176, 0.00103, 0.0006, 0.00035), *, seed: 'int' = 0, nyquist: 'float' = 2.0, fade: 'float' = 1.0, weights=None, local_edge=None)(구현을 직접 호출하려면 import render3d; render3d.mesh_displace_spectrum(V, F, wavelengths=(0.06, 0.03, 0.015, 0.0075, 0.00375), amplitudes=(0.003, 0.00176, 0.00103, 0.0006, 0.00035), *, seed: 'int' = 0, nyquist: 'float' = 2.0, fade: 'float' = 1.0, weights=None, local_edge=None), 원장에서 가져오려면 ops3d.get("mesh_displace_spectrum"))

사용법

진폭 스펙트럼을 명시해 대역 제한하면서 정점을 법선 방향으로 변위시킵니다.

> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.

per vertex → `(V, F)`.

`displacement_i = Σ_k A_k · n_k(x_i) · gate_k(i) · w_k(i)` with one seeded value-noise

octave `n_k ∈ [−1, 1] per (wavelength_k, amplitude_k)` pair (mesh units — the

Itokawa STL is in km, so the default is 3 m at 60 m falling as `A ∝ λ^0.77` to

0.35 m at 3.75 m), `gate = :func:displacement_band_weights` on *this* mesh

(an octave shorter than `nyquist × local edge` is not applied — it would alias into

facet noise; route it to :func:bump_normals_fbm instead) and `weights` = optional

`(N,) per-vertex or (K, N)` per-octave-per-vertex factor in [0,1] (e.g. the

synthetic-relief weight `1 − gate` of the source model). The peak displacement at a

vertex is at most `Σ_k A_k (tests pin it). Unlike :func:mesh_displace_fbm` (one

amplitude, octave ratio 2, no band limit) every octave's amplitude is explicit.

Deterministic under `seed`. Fail-closed on shapes / non-finite / negative values.

手順: (1) :func:displacement_band_weights で `gate (K,N) を作る、(2) weights` が

あれば掛ける、(3) オクターブ `k` ごとに seed 固定の value noise

`n_k(x) ∈ [-1,1](波長 λ_k`、格子オフセットはオクターブ番号で変える)を評価し

`Σ_k A_k · gate_k · n_k` を法線方向の変位にする、(4) 面積重み付き頂点法線に沿って

頂点を動かす。返り値 `(V' (N,3) float64, F のコピー)`。

• `wavelengths / amplitudes`: 同じ長さ(1〜32 個)の正の列。メッシュ単位。

個数不一致・空・33 個以上・負の振幅・`amplitudes=NoneValueError`。振幅 0 の

オクターブは評価を飛ばす。

• `nyquist / fade / local_edge: 帯域ゲートの設定(displacement_band_weights`

と同じ)。

• `weights: (N,) なら全オクターブ共通、(K,N)` ならオクターブ別の係数。値は

[0, 1] に限り、範囲外・形不一致は `ValueError`。

• `seed: 同じ seed なら bump_normals_fbm` と同じ格子を共有する(幾何で担えない

オクターブを陰影側へ連続して渡せる)。

`mesh_displace_fbm` との違いは、振幅をオクターブごとに明示すること、頂点ごとに

辺長で帯域を切ること。粗いメッシュに短波長を与えても折り返さず、単に無視される。

참고(샘플 데이터·문헌)

• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.

• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.

실행 가능한 예제(이 연산자를 실제로 호출하는 검증된 샘플)

itokawa_regolith_heropy -3.11 examples_3d/itokawa_regolith_hero.py

타입이 이어지는 다음 연산자(mesh 를 입력으로 받는 것)

mesh_to_voxel · mesh_to_points · to_points · fuse_to_voxel · ambient_occlusion · cast_shadow · supersample_mesh · render_beauty

같은 카테고리(terrain)

mesh_displace_fbm · terrain_region_mask · mesh_scatter_boulders · mesh_edge_lengths · mesh_subdivide · displacement_band_weights · bump_normals_fbm


*Provenance: render3d.py — 3D 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.