---
title: Trigonometric Angle-Based Features
url: https://www.emergentmind.com/topics/trigonometric-angle-based-features
type: topic
---

# Trigonometric Angle-Based Features

Trigonometric angle-based features are mathematically structured descriptors that utilize angular relationships—derived from classical or generalized trigonometric functions—within geometric or learned representations. Rooted in the properties of both classical and two-parameter generalized trigonometric functions—including new multiple-angle and addition formulas—these features provide a continuous, tunable family of periodic mappings for use in a variety of computational pipelines. Recent advancements demonstrate their impact, particularly regarding encoding rotation-invariant geometric relationships in high-dimensional data, as in graph neural networks (GNNs) for 3D object detection and feature engineering.

## 1. Generalized Trigonometric Functions and Fundamental Identities

Let $p, q \in (1,\infty)$ be fixed exponents. The generalized arcsine is defined as
\[
\arcsin_{p, q}(y) = \int_0^y \frac{dt}{(1-t^q)^{1/p}},\quad y\in[0,1]
\]
with half-period
\[
T_{p, q} = 2 \int_0^1 \frac{dt}{(1-t^q)^{1/p}} = \frac{2}{q} B\left(\frac{1}{q},\,\frac{1}{p/(p-1)}\right).
\]
Define $p^* = p/(p-1)$. The periodic continuation yields
\[
\sin_{p,q}: \mathbb{R} \rightarrow [-1,1], \quad \cos_{p,q}(x) := \frac{d}{dx} \sin_{p,q}(x).
\]
A key relation is the generalized Pythagorean identity:
\[
|\cos_{p, q}(x)|^p + |\sin_{p, q}(x)|^q = 1.
\]
Derivatives satisfy
\[
(\sin_{p, q} x)' = \cos_{p, q} x,\quad (\cos_{p, q} x)' = -|\cos_{p, q} x|^{2-p} |\sin_{p, q} x|^{q-1}.
\]
These generalized functions recover classical trigonometric identities when $p=q=2$ and enable continuous transitions between various function shapes, facilitating feature shape tuning. The domain of both $\sin_{p,q}$ and $\cos_{p,q}$ is $\mathbb{R}$, with fundamental period $2T_{p,q}$ [1603.06709].

## 2. Multiple-Angle and Duplication Formulas

Multiple-angle formulas for generalized trigonometric functions extend classical results. For all $x \in \mathbb{R}$ and $p>1$,
\[
\sin_{2, p}\bigl(2^{2/p} x\bigr) = 2^{2/p} \sin_{p^*, p}(x) \left| \cos_{p^*, p}(x) \right|^{p^*-1},
\]
\[
\cos_{2, p}\bigl(2^{2/p} x\bigr) = \left| \cos_{p^*, p}(x) \right|^{p^*} - \left| \sin_{p^*, p}(x) \right|^{p} = 1-2\left| \sin_{p^*, p}(x) \right|^{p}.
\]
The half-periods relate as $T_{p^*, p} = 2^{-2/p} T_{2, p}$. For each integer $n$ and by periodic continuation, closed-form expressions for $\sin_{2,p}(2^{2/p}x + nT_{2,p})$ and similar for cosine are available in terms of base functions [1603.06709].

A slowly-convergent series expansion analogous to the Gregory-Leibniz series for $\pi/2$ exists for $T_{p^*,p}$:
\[
T_{p^*,p} = \sum_{n=0}^\infty \frac{(2/p)_n}{n!} \cdot \frac{(-1)^n}{pn+1}
\]
where $(a)_n = \Gamma(a+n)/\Gamma(a)$.

## 3. Addition-Type Identities

While a full generalization of $\sin(x+y) = \sin x\,\cos y + \cos x\,\sin y$ is not available for all parameters, important addition-type results include:
- The $p$-Pythagorean identity: $|\cos_{p,q}x|^p + |\sin_{p,q}x|^q = 1$.
- Derivative identities enabling implicit integral-based addition relations.
- For $(p^*, p) = (4/3, 4)$ (Edmunds–Gurka–Lang), an explicit four-term addition theorem:
\[
\sin_{4/3,4}(2x) = \frac{4 \sin_{4/3,4} x\, \cos_{4/3,4}^{1/3} x}{1 + 4 \sin_{4/3,4}^{4/3} x\, \cos_{4/3,4}^{4/3} x}
\]
[1603.06709].

## 4. Algorithmic Construction of Angle-Based Features

A broad class of angle-based features in signal processing and machine learning applications are constructed from periodic base functions. Given explicit duplication and multiple-angle formulas, one can:
- Select $ \varphi_1(\theta) = \sin_{p^*,p}(\theta),\ \varphi_2(\theta) = \cos_{p^*,p}(\theta) $ as base features.
- For higher harmonics, form features like $ \sin_{2,p}(2^{2/p} \theta) = 2^{2/p} \varphi_1(\theta) |\varphi_2(\theta)|^{p^*-1} $, without requiring numerical inversion or quadrature.
- Treat $p$ and $q$ as tunable hyperparameters for optimizing feature shape, seamlessly interpolating between classical sinusoids $(p=q=2)$ and other geometries (e.g., super-circles, astroids).

Application contexts include filter-bank design with band shapes adapted by $(p,q)$ and geometric modeling via parameterizations $x(\theta) = \cos_{p,q}(\theta),\ y(\theta) = \sin_{p,q}(\theta)$ [1603.06709].

## 5. Rotation-Invariant Trigonometric Angular Features in Deep Learning

Within 3D point cloud analysis and graph neural network (GNN) architectures, trigonometric angle-based features are constructed as follows. For points $P_i, P_j \in \mathbb R^3$,
\[
n_i = \frac{P_i}{\|P_i\|},\quad n_j = \frac{P_j}{\|P_j\|},\quad r_{ij}=P_j-P_i,\quad \hat{r}_{ij} = \frac{r_{ij}}{\|r_{ij}\|}.
\]
Define angular features:
\[
\theta_{ij}^{(1)} = \arccos(n_i \cdot n_j), \quad
\theta_{ij}^{(2)} = \arccos(\hat r_{ij} \cdot n_j), \quad
\theta_{ij}^{(3)} = \pi - (\theta_{ij}^{(1)} + \theta_{ij}^{(2)}).
\]
The triple $(\theta_{ij}^{(1)}, \theta_{ij}^{(2)}, \theta_{ij}^{(3)})$ forms a mathematically rotation-invariant descriptor for each point-pair.

These are encoded in GNN edge features as either angle-only or concatenated with relative offsets:
- Angle-only: $[\theta_{ij}^{(1)}, \theta_{ij}^{(2)}, \theta_{ij}^{(3)}, \mathrm{intensity}_i]$
- Angle+Relative: $[\theta_{ij}^{(1)}, \theta_{ij}^{(2)}, \theta_{ij}^{(3)}, x_i-x_j, y_i-y_j, z_i-z_j, \mathrm{intensity}_i]$.

Empirical analysis shows that angle-based encodings confer strong robustness to global rigid rotations, as angular quantities $\arccos((R v)\cdot(R w)) = \arccos(v\cdot w)$ for any rotation $R \in SO(3)$, while raw offsets do not [2108.00780].

## 6. Comparative Impact and Quantitative Results

Empirical results from KITTI 3D object detection benchmarks demonstrate marked improvements in performance using trigonometric angle-based features within GNNs.

| Feature Encoding      | Car mAP (E/M/H)  | Cyclist mAP (E/M/H) | Pedestrian mAP (E/M/H) |
|----------------------|------------------|---------------------|------------------------|
| Euclidean-only       | 30.23/25.58/22.02| 15.15/11.06/7.47    |  8.93/15.47/8.93       |
| Absolute-only        | 35.56/28.66/25.41| 20.71/18.92/16.17   | 32.67/29.91/22.41      |
| Relative-only        | 62.23/49.57/42.42| 45.64/40.14/38.19   | 51.28/47.42/42.56      |
| Angle-only           | 85.64/75.66/67.69| 50.55/41.07/38.27   | 71.42/63.12/55.47      |
| Angle+Relative       | 90.12/88.86/79.53| 54.23/48.67/41.21   | 80.61/62.41/58.01      |

The Angle+Relative encoding achieves the highest mean average precision while incurring only marginal runtime overhead compared to the baseline [2108.00780].

## 7. Applications and Theoretical Significance

Trigonometric angle-based features provide a mathematically principled, computationally tractable, and robust methodology for constructing invariant geometric descriptors. Their generalization to $(p,q)$-parametric families enables function shape optimization for diverse domains:
- Machine learning: periodic feature engineering via learnable harmonic shapes.
- Signal processing: design of frequency bases and filter-banks beyond the classical Fourier family.
- Geometric modeling: smooth shape interpolation and parameterization of generalized curves.

The explicit algebraic structure of angle-based features rooted in generalized trigonometric identities enables their systematic deployment in mathematical and practical pipelines [1603.06709][2108.00780].

Source: https://www.emergentmind.com/topics/trigonometric-angle-based-features