Jump to content

Motion Graph

Featured Replies

Hello!

I am stuck with a relatively simple task. I am doing some coding and need a certain kind of motion to apply to an object.

The motion graph should look something like in the picture. It may look like sqrt(x) at first but this isn't the case, I am wondering if there is some function that actually reaches a slope of 0 relatively quickly (or a VERY tiny slope) ?

Thanks!

Screenshot_525.png

13 minutes ago, andero said:

Hello!

I am stuck with a relatively simple task. I am doing some coding and need a certain kind of motion to apply to an object.

The motion graph should look something like in the picture. It may look like sqrt(x) at first but this isn't the case, I am wondering if there is some function that actually reaches a slope of 0 relatively quickly (or a VERY tiny slope) ?

Thanks!

Screenshot_525.png

The ln function gets very close to a 0 slope rather quickly. What exactly are you trying to program?

You could try and analytically continue a function with another one, and when its slope reaches 0 just replace it with a fixed value

 

-k(x-t)^2+c for instance would give you a function that reaches a slope of 0 at it's summit, and you could then replace it by c when f'(x)==0

Edited by YaDinghus
Example

  • Author
6 minutes ago, YaDinghus said:

The ln function gets very close to a 0 slope rather quickly. What exactly are you trying to program?

You could try and analytically continue a function with another one, and when its slope reaches 0 just replace it with a fixed value

I tried modifiying the ln(x) a bit and it's close enough to what I'd like.

Thank you very much!

5 minutes ago, andero said:

I tried modifiying the ln(x) a bit and it's close enough to what I'd like.

Thank you very much!

Anytime :)

2 minutes ago, Strange said:

You could try the tan function (or tan^2 to get an even faster change).

Doesn't tan go 'straight' up once it passes x = pi/4? After all it has definition gaps every pi/2...

Edited by YaDinghus

I get this graph in OpenOffice Calc using code "=IF(A1<1.5;SIN(A1)^0.5;1)" for cell B1. Fill it down to entire column.

graph.thumb.png.f42e09b1fa34b386f380d79e5c3d64da.png

Check also 0.333 instead of 0.5..

 

 

 

Example result for "=IF(A1<1.75;SIN(A1^0.8333)^0.33;1)"

5b167ae1329f1_graph2.thumb.png.e277c51c475b1f1e30999c2a0c451694.png

 

  • 2 weeks later...
On 6/5/2018 at 1:32 PM, YaDinghus said:

Doesn't tan go 'straight' up once it passes x = pi/4? After all it has definition gaps every pi/2...

He means arctan (times a suitable constant).

It is different from a logarithm in an important respect. Although both functions will keep increasing, the log is unbounded, whereas arctan will approach an upper limit. So it depends on which of those properties you are aiming for.

Edited by taeto

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.