Visual Mode
🎨 Mode Palette
Section titled “🎨 Mode Palette”| Mode | Description |
|---|---|
phase_portrait | Scatter plot of real vs. imaginary components to expose attractors and limit cycles. |
waveform | Time-domain waveform view, useful for debugging scalar fields or reductions. |
phase | Phase-only rendering that highlights angular structure. |
energy | Energy-density style view for quick stability checks. |
frequency | Spectral magnitude inspection for dispersion and filtering experiments. |
polar | Polar plotting of magnitude/phase pairs. |
🛠️ API
Section titled “🛠️ API”ooc.sim_set_visual_mode(ctx, "polar") -- accepts string or integer codelocal mode_value, mode_name = ooc.sim_get_visual_mode(ctx)ooc.log("visual mode %d -> %s", mode_value, mode_name)sim_set_visual_mode accepts either the integer code or any of the aliases shown above. The getter returns both the code and the canonical string.
📜 Usage
Section titled “📜 Usage”local ctx = ooc.sim_create()ooc.sim_set_timestep(ctx, 0.01)ooc.sim_set_visual_mode(ctx, "phase_portrait")
local field = ooc.sim_add_field(ctx, {512}, { type = "complex_double", fill = {0, 0}})
-- add operators...
ooc.sim_step(ctx)