## Developer Reference

• 2021
• 03/26/2021
• Public Content
Contents

# Triangle-Generating Functions

This section describes the functions that generate a periodic signal with a triangular wave form (referred to as “triangle”) of a given frequency, phase, magnitude, and asymmetry.
A real periodic signal with triangular wave form
x
[
n
] (referred to as a real triangle) of a given frequency
rFreq
, phase value
phase
, magnitude
magn
, and asymmetry
h
is defined as follows:
x
[
n
] =
magn
*
ct
h
(2π*
rFreq
*
n
+
phase
)
,
n
= 0, 1, 2,...
A complexl periodic signal with triangular wave form
x
[
n
] (referred to as a complex triangle) of a given frequency
rFreq
, phase value
phase
, magnitude
magn
, and asymmetry
h
is defined as follows:
x
[
n
] = magn * [
ct
h
(2π*
rFreq
*
n
+
phase
) + j *
st
h
(2π*
rFreq
*
n
+
phase
)]
,
n
= 0, 1, 2,...
The
ct
h
() function is determined as follows:
H
= π +
h
ct
h
(α +
k
* 2π) =
ct
h
(α)
,
k
= 0, ±1, ±2, ...
When
H
= π , asymmetry
h
= 0, and function
ct
h
() is symmetric and a triangular analog of the
cos
() function. Note the following equations:
ct
h
(
H
/2 +
k
*π) = 0
,
k
= 0, ±1, ±2, ...
ct
h
(
k
* 2π) = 1
,
k
= 0, ±1, ±2, ...
ct
h
(
H
+
k
* 2π) = -1
,
k
= 0, ±1, ±2, ...
The
st
h
() function is determined as follows:
st
h
(α +
k
* 2π) =
st
h
(α)
,
k
= 0, ±1, ±2, ...
When
H
= π , asymmetry
h
= 0, and function
st
h
() is symmetric and a triangular analog of the sine function. Note the following equations:
st
h
(α) =
ct
h
(α + (3π +
h
)/2)
,
k
= 0, ±1, ±2, ...
st
h
(
k
* π) = 0
,
k
= 0, ±1, ±2, ...
st
h
((π -
h
)/2 +
k
* 2π) = 1
,
k
= 0, ±1, ±2, ...
st
h
((3π +
h
)/2 +
k
* 2π) = -1
,
k
= 0, ±1, ±2, ...

#### Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.