Source-linked AI summary
Arbitrary Polygon Oscillator: Generalizing Polygonal Synthesis to Arbitrary Shapes, Morphing, and Three-Dimensional Polyhedra
Antonio Argentieri, Francesco Scagliola
TL;DR
Prior polygonal synthesis is centered on regular, parameterized shapes and constant angular traversal, leaving arbitrary vertex configurations and broader shape spaces to be addressed. This paper unifies arbitrary polygons, unequal-count morphing, and 3D cross-sections under an arc-length engine with geometric antialiasing. It reports approximately 22 dB alias-floor reduction from polyBLAMP, with adaptive oversampling providing further attenuation.
Problem
Existing polygonal synthesis formulations use parameterized polygon families, while arbitrary vertex configurations require correspondence and traversal methods that preserve geometric features.
Method
The system uses an arc-length oscillator fed by vertex data, hybrid interpolation for unequal vertex counts, polyhedral planar cross-sections, and geometry-based polyBLAMP with adaptive oversampling.
Results
Approximately 22 dB alias-floor reduction is achieved by polyBLAMP relative to the uncorrected signal, while OS = 2+BL4 achieves the highest SNR in all measured conditions.
Takeaways & Limitations
The arc-length engine generalizes polygonal synthesis to arbitrary shapes, morphable sequences, and 3D polyhedral cross-sections.
Takeaways & Limitations
Perceptual smoothness of morphing trajectories is not guaranteed, and perceptual modeling is left for future work.
Abstract
from arXiv · showhide
Polygonal synthesis generates audio by traversing the perimeter of a polygon with a phasor; prior work uses a constant angular velocity, whereas the proposed system adopts constant arc-length (perimeter) velocity. Existing formulations operate on regular, parametrically defined polygons, producing smooth timbral transitions within a single family of shapes. This paper generalizes polygonal synthesis around a unified arc-length engine: vertex data of any origin feed the same DSP pipeline. First, we adapt the oscillator to accept arbitrary vertex configurations from an external buffer, opening the possibility for a broad class of closed polygons -- regular, irregular, or star-shaped -- to function as a waveform generator. Second, a hybrid interpolation algorithm enables smooth morphing between polygons with unequal vertex counts, passing through intermediate shapes that have no parametric description. Third, we extend the paradigm to three dimensions: a convex polyhedron rotated about three axes is sliced by a fixed horizontal plane, and the resulting cross-section yields a continuously variable polygon controlled by the solid's orientation. The system runs in RNBO (Cycling~'74) with a geometry caching strategy that avoids per-sample recomputation. Antialiasing combines a four-point polyBLAMP correction derived from runtime Bézier tangents with adaptive oversampling, adapting the correction geometrically to general vertex configurations without per-shape analytical derivation.
1. INTRODUCTION
The paper generalizes polygonal synthesis from mathematically parameterized shapes to arbitrary vertex-defined polygons, morphing, and three-dimensional polyhedral cross-sections. Its unified contributions include hybrid unequal-count interpolation, geometric antialiasing, and orientation-controlled 3D waveform generation.
- Arbitrary polygon oscillator: A vertex buffer lets regular, irregular, convex, or concave closed polygons function as waveform generators.The approach defines shapes by their vertices rather than by mathematical parameters.
- Hybrid shape interpolation: Hybrid interpolation morphs polygons with different vertex counts while preserving corner sharpness through the transition.The method combines angular correspondence for convex shapes with perimeter-based midpoint expansion for concave shapes.
- Runtime antialiasing: Runtime four-point polyBLAMP uses geometric Bézier tangents to antialias arbitrary vertex configurations without per-shape analytical derivation.The correction generalizes closed-form derivative expressions to geometry supplied at runtime.
- 3D extension: A freely rotated convex polyhedron is sliced by a plane, producing a continuously variable polygon whose waveform is controlled by spatial orientation.The planar cross-section extends the oscillator paradigm from polygons to three-dimensional solids.
2. BACKGROUND
Polygonal synthesis maps phasor traversal around a polygon to two-dimensional audio output, with geometry determining waveform shape and spectrum. Earlier work established regular and star-polygon formulations, while related geometric oscillators motivated extensions toward freely drawn shapes and morphing.
- Core mechanism: A phasor traverses a closed polygon perimeter, and the resulting x and y coordinates form the two-dimensional audio output.Traversal speed sets the fundamental frequency f0, while geometry determines the waveform and spectrum.
- Core mechanism: In the illustrated triangle example, the phasor traverses the perimeter at constant velocity while one coordinate becomes the output waveform over phase ϕ from 0 to 1.The example uses an equilateral triangle with N = 3 and f0 = 110 Hz.
- Relation to other synthesis methods: Polygonal synthesis differs from waveshaping because phase indexes a geometric transfer function rather than an amplitude signal passing through a fixed scalar function.The proposed system reconstructs the waveform from vertex data instead of applying a scalar function to x = cos θ.
- Relation to other synthesis methods: Unlike wave terrain synthesis, polygonal synthesis outputs orbit coordinates directly, and unlike wavetable synthesis, it geometrically reconstructs waveforms that can vary during morphing.Wave terrain uses a two-dimensional orbit to address a scalar function, whereas wavetable synthesis reads a fixed stored waveform.
- Prior polygonal synthesis: Chapman related regular polygon order and star-polygon symbols {n/q} to harmonic content, including sawtooth, triangle, and square waves as special cases.This work established polygon-derived waveforms as a broader family of time-domain synthesis forms.
- Prior polygonal synthesis: Hohnerlein et al. formalized constant-angular-velocity synthesis with a continuously variable polygon order and sparse regular-N-gon spectra at harmonics (kN ± 1)f0.For regular polygons, the symmetry order coincides with vertex count; that coincidence does not hold for general shapes.
- Related geometric oscillators: Cyclone proposed cyclic Bézier paths traversed at constant arc-length velocity and outlined a polygon-based successor supporting freely drawn shapes and morphing.The cited polygon-based successor has no subsequent formal publication or implementation reported in the passage.
3. ARBITRARY POLYGON OSCILLATOR
The oscillator uses arbitrary vertex data, geometric transformations, curved edges, and constant arc-length traversal to generate two-channel waveforms. Its spectral lattice is governed by rotational symmetry, while geometry and curvature redistribute harmonic amplitudes.
- Arbitrary geometry: Vertex coordinates from an external buffer define arbitrary closed polygons, and subsequent processing operates on coordinates relative to the centroid.The pipeline applies geometric transformations, arc-length traversal, and two-dimensional coordinate output.
- Geometric transformations: Rotation mixes the two output channels and can animate the stereo field when swept.Static traversal phase offset is inaudible, whereas geometric rotation reshapes each waveform and the stereo image.
- Edge curvature: Quadratic Bézier control points curve edges; negative κ bows them outward and positive κ bows them inward.At fixed vertex count, curvature preserves harmonic positions while redistributing magnitudes, with concavity brightening and convexity rounding the tone.
- Arc-length traversal: Arc-length parameterization maintains constant perimeter velocity, preventing pitch fluctuation caused by unequal edge lengths.Phase maps to perimeter distance, the containing edge is located by accumulated lengths, and local parameter u drives Bézier evaluation.
- Arc-length traversal: Geometry caching avoids per-sample recalculation, while the arc-length approximation has better than 0.1% relative error for the curvature range used.The approximation reduces to the Euclidean chord at κ = 0 and remains consistent with chord directions used for polyBLAMP correction.
- Comparison with angular-velocity traversal: Curvature and radial weighting make arc-length output visually approach angular-velocity output without changing its active harmonic lattice.For the triangle, κ = −0.234 rounds transitions and radial weighting further aligns harmonic balance; weighting redistributes energy across existing harmonics.
- Spectral characterization by symmetry: Rotational symmetry order M determines which harmonics are present, independently of vertex count, while curvature and vertex geometry determine their energy.For M-fold symmetry, the active set is (mM ± 1)f0; traversal mode leaves this set unchanged but changes amplitudes.
- Spectral characterization by symmetry: Winding number extends the harmonic relation to self-intersecting polygons: for W = 2 and M = 5, f0 is absent and the perceived fundamental rises to 2f0.The pentagram {5/2} winds the centroid twice per period, producing the stated shift.
4. SHAPE INTERPOLATION
The paper morphs directly between vertex-defined polygons, including unequal vertex counts, using shape-dependent expansion and alignment strategies that preserve corners and continuity. Spectral transitions retain the fundamental while harmonics redistribute across a multi-shape sequence.
- 4. SHAPE INTERPOLATION: Vertex-space morphing connects arbitrary polygon configurations, extending beyond continuous parametric shape families.The trajectory is defined by polygon vertices, so intermediate forms need not have a parametric description.
- 4. SHAPE INTERPOLATION: Unequal vertex counts require correspondence; naive interpolation is undefined, while common-count resampling can blur corner sharpness.The hybrid algorithm addresses this by expanding polygons before vertex-to-vertex interpolation.
- 4.2. Hybrid Interpolation Algorithm: Convex pairs use angular correspondence, whereas pairs containing a concave polygon use perimeter-midpoint expansion for structurally compatible matching.Convexity is checked from the signs of consecutive-edge cross products; midpoint expansion distributes extra vertices proportionally to edge length.
- 4.2. Hybrid Interpolation Algorithm: Sleeping vertices begin superimposed and separate toward targets during interpolation, allowing new corners to emerge while preserving concavities and characteristic sharpness.For the triangle-to-star example, seven midpoint vertices expand the triangle to ten vertices before pairing with the star.
- 4.3. Polygon Sequences and Pair Switching: Polygon sequences use independent pair expansions plus phase continuity, write-back of vertex ordering, and temporal crossfading to prevent boundary discontinuities.Write-back ensures shared polygons inherit the same v0; crossfading lasts 20 ms with polyBLAMP suspended.
- 4.4. Spectral Structure under Morphing: Across the six-shape sequence, predicted harmonics persist, fade, or emerge as symmetry changes, while the fundamental remains fixed at f0 and out-of-lattice leakage stays small for typical pairs.The sequence is triangle → square → star → arrow → pentagon → hexagon.
5. EXTENSION TO 3D POLYHEDRA
The three-dimensional extension rotates a convex polyhedron and slices it with a fixed horizontal plane, passing the resulting polygon through the existing two-dimensional synthesis engine. Sleeping vertices keep the output count constant through topological transitions, while orientation produces continuously varying timbral and spatial behavior.
- 5. EXTENSION TO 3D POLYHEDRA: A rotated convex polyhedron is intersected with a fixed horizontal plane, and its cross-section is passed unchanged to arc-length traversal and polyBLAMP correction.Only plane–polyhedron intersection and fixed vertex-count handling are specific to the 3D front end.
- 5. EXTENSION TO 3D POLYHEDRA: Rotation about three axes controls the cross-section waveform; harmonic complexity grows and recedes at transitions where the plane crosses a vertex or edge.The two-dimensional output also maps spatial orientation directly onto stereo movement through the evolving x/y phase relationship.
- 5.2. Plane–Polyhedron Intersection: Each rotated edge is tested against the plane using signed endpoint distances, and crossing points are computed by linear interpolation.Edges coplanar with the plane are skipped to avoid a 0/0 indeterminacy.
- 5.3. Fixed Vertex Count: The intersection output is held at the solid’s edge count by parking sleeping vertices at nearby real vertices, preventing instantaneous count changes.The intersection uses two passes: collect and sort at least three real crossings, then insert sleeping vertices after their hosts.
- 5.4. Case Studies: A cube cross-section changes from a square at θx = θy = 0° to a near-regular hexagon at θx = θy = 40°.The figure uses blue for the square and amber for the near-regular hexagon.
6. SIGNAL QUALITY AND PRACTICAL CONSIDERATIONS
The system replaces unavailable per-shape polyBLAMP derivations with runtime Bézier-tangent correction for arbitrary vertex configurations, combined with adaptive oversampling. Measurements show approximately 22 dB alias-floor reduction from polyBLAMP, with the combined method achieving the highest SNR across tested conditions.
- 6.1.1. Four-Point polyBLAMP Correction: Runtime Bézier tangents provide derivative jumps for four-point polyBLAMP correction on arbitrary vertex buffers.The method uses adjacent Bézier-edge tangent directions at each vertex, avoiding per-shape analytical derivation.
- 6.1.1. Four-Point polyBLAMP Correction: The correction targets derivative discontinuities at vertices by applying residuals to four samples surrounding each oversampled crossing.The sign of the derivative jump determines the correction direction, while fractional delay locates the vertex within the sample.
- 6.1.1. Four-Point polyBLAMP Correction: The correction is skipped for degenerate edges and suspended during pair-switch crossfades when residuals become incoherent with the new buffer layout.Edges shorter than 10^-3 are excluded to guard against division by zero; pair-switch suspension preserves correction coherence during changing vertex-slot layouts.
- 6.1.2. Adaptive Oversampling: PolyBLAMP correction alone reduces the alias floor by approximately 22 dB relative to the uncorrected signal.Adaptive oversampling further attenuates residual aliasing, with the rate adjusted to fundamental frequency and sample rate.
- 6.1.3. Measured Performance: At κ = 0, BL4 alone exceeds OS = 2 at 400 Hz, while the two methods are comparable at 751 and 1350 Hz.The reported comparison uses measured SNR for an equilateral triangle at 44.1 kHz under multiple antialiasing configurations.
- 6.1.3. Measured Performance: OS = 2+BL4 achieves the highest SNR in all tested conditions because polyBLAMP and oversampling provide complementary suppression.PolyBLAMP addresses discontinuity leakage, whereas oversampling provides broadband suppression independent of geometry.
7. IMPLEMENTATION
The implementation separates polygon management from the DSP engine and caches geometry so expensive geometric preparation occurs only when parameters change. Pair construction is performed infrequently, while the audio path scales with oversampling and vertex count.
- 7.1. RNBO Architecture: Two RNBO codebox~ modules divide responsibilities between polygon management and audio processing.PolyManager stores polygons and builds interpolation pairs; the DSP engine performs traversal, polyBLAMP, and crossfade operations.
- 7.2. Geometry Caching: Centroid, vertex transformation, control-point placement, edge lengths, and perimeter accumulation are cached between parameter changes.The phase is rescaled to the new perimeter to maintain pitch, while pair-switch boundaries suppress the phase transition during crossfades.
- 7.3. Computational Cost: Pair building costs O(PN^2), but with N ≤ 24 and P ≤ 7 it requires only a few thousand operations when the pair set is rebuilt.The audio path is O(OS · N), with one O(N) edge search and O(1) polyBLAMP work per oversampled step.
8. CONCLUSIONS
The arc-length engine extends polygonal synthesis from parameterized shapes to arbitrary drawings, morphable sequences, and 3D polyhedral cross-sections. Sleeping vertices preserve topological stability across transitions, while future work targets perceptually guided morphing and higher-order polyhedra.
- 8. Conclusions: The arc-length engine supports arbitrary shapes, morphable sequences, and 3D polyhedral cross-sections within one synthesis framework.The system treats shape as a drawing rather than only as a parameterized family.
- 8. Conclusions: Sleeping vertices maintain topological stability across transitions between changing polygon configurations.The conclusion identifies perceptually guided morphing and higher-order polyhedra as future directions.