Second hand bouncing back a fraction of a movement for more realistic look

I don’t remember what watch was here in Facer that made the second hand, every time that jump a second with #DWFS# it was bouncing back just a fraction of a movement making the second hand looking more realistic. I would love to find out the calculation and expression to use to do something like that. Please help!

This might work …

(#DWFS#+sin((#Dsm#-#Ds#)*20)*(1-(#Dsm#-#Ds#)))

If you want the oscillation to be faster then you could try increasing 20 to something larger.

If you want the magnitude of the oscillation to be smaller or larger then multiply the sine function by a number less than or greater than 1 respectively. eg. the following will have a smaller oscillation.

(#DWFS#+0.5*sin((#Dsm#-#Ds#)*20)*(1-(#Dsm#-#Ds#)))

I hope that helps.

2 Likes

Thank you very much! I will try it out and report back… :wink:

Look nice and, I think that if I try messing with sine function it may work exactly as I saw it on the other Facer watch but, only one thing is not working, when the Second-Hand reaches the 0 or 60 (at 0°) it make a big crazy jump back and forward rapidly in the duration of that 0° second so, I have to figure it out how to stop that big jump… If you have any ideas on how to fix that, please, I’m all ears… Thank you very much for your help!

Mmm, it does not do that for me …

How big is the oscillation around the 0deg mark?

1 Like

The Creator do not show the oscillation error… It happens on my watch (Huawei Watch 2 Wear OS 2.1)… I don’t know why…

You could try this …

(#DWFS#+0.5*sin(clamp(#Dsm#-#Ds#,0,1)*20)*(1-clamp(#Dsm#-#Ds#,0,1)))

Ok, it should not be necessary but adding the clamp expressions means that the above expression should be limited to #DWFS# +/- 0.5 degrees

I hope that helps.

1 Like

IT WORKS!!! :laughing: Now it works on the watch without the big oscillation error. Now I’m going to work to refine the oscillation and I will share the result with the calculation here. Thank you so much! I appreciate a lot your help, Mike! :wink:

1 Like

You are most welcome, I’m glad it works.

1 Like

After playing with the formula I think this is the most realistic I can get and I like it a lot… Thank you very much again for your help…

I just modified the clamp function… Do you want to share it for the community or I can if you don’t mind… I would mention you as the one that came out with the formula… Let me know… :wink:

(#DWFS#+0.5sin(clamp(#Dsm#-#Ds#,0,.2) * 80)(1-clamp(#Dsm#-#Ds#,0,1)))

The example…

2 Likes

I am very happy for you to paste the formula - any code or guidance shared on the forum is for everyone!

When you do, create a new line in your post, click on the </> icon in the bar above the post to insert a code segment and then replace the generated text with the expression. This will make sure that the expression is pasted correctly. In particular, if you look at the expressions that you pasted above you will see that the * operator is missing sometimes.

So your modified expression should look like this in the forum

(#DWFS#+0.5*sin(clamp(#Dsm#-#Ds#,0,0.2)*80)*(1-clamp(#Dsm#-#Ds#,0,1)))

and not this

(#DWFS#+0.5*sin(clamp(#Dsm#-#Ds#,0,0.2)80)(1-clamp(#Dsm#-#Ds#,0,1)))

1 Like

Umm, I pasted your expression into creator and the second hand oscillates ok in your pasted face above I can’t detect any oscillation ??

1 Like

I noticed that it works differently on my watch… To make it works I think it will have to be specified that the person using the formula will need to modify it to get the result they intended. The formula is a good start. Also, thank you for pointing out the right way to share formulas because I didn’t notice. :wink:

1 Like