How to infere a similar function given a graph

39 Views Asked by At

I am trying to identify a function of the following graph in order to implement an animation. It doesn't need to be exactly, anything similar would do the work.

enter image description here

The function repeat itself as you can see in red. In green is the same but mirrored.

I am currently trying combining polinomials and trigonometric functions, if I use different ranges of those I could get something similar but it should be something simpler.

1

There are 1 best solutions below

2
On

As an option, consider, for example, seven cubic Bezier segments,

enter image description here

where the Bezier control points are

/* 0*/ ( 0,20),
/* 1*/ ( 6,20),
/* 2*/ ( 7,17),
/* 3*/ (11,20),
/* 4*/ (15,23),
/* 5*/ (20,30),
/* 6*/ (26,28),
/* 7*/ (32,26),
/* 8*/ (37,14),
/* 9*/ (42,13),
/*10*/ (47,12),
/*11*/ (53,21),
/*12*/ (57,22),
/*13*/ (61,23),
/*14*/ (64,17),
/*15*/ (69,20),
/*16*/ (74,23),
/*17*/ (81,34),
/*18*/ (85,29),
/*19*/ (89,24),
/*20*/ (90, 2),
/*21*/ (100,2)

Periodic line looks like

enter image description here