Stretching a wave maintaing the length and curve

40 Views Asked by At

I have a function as , y = [sin(cos(x))]*x

were , 0 <= x <= PI/2

It draws a wave in this manner

I am trying to perform calculations which will stretch the or squeeze the wave maintaining the length .

case(1) : When x & y increases , the wave should be stretched .

case(2) : When x & y decreases , the wave should be squeezed .

Moving a point to x,y

Reason behind my need : I am developing a simple a game were i am trying to achieve some rope movements were user will be able to control the end points .I might be not maths geek but i would luv to achieve this on my own , any references , i would appreciate it .