Analog Clock

Analog Clock - A simple animation - 消息

#1 已发布: 2013/7/9 10:24:35
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: Moderator

A simple animation


Best Regards,

Davide
AnalogClock_viewer.7z (355.86 KiB)已下载 838 次。
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
4位用户喜欢此帖子
ioan92 2013/7/9 11:21:00, Вячеслав Мезенцев 2013/7/11 13:12:00, Andrey Ivashov 2013/7/10 08:27:00, Fridel Selitsky 2013/7/9 14:27:00
#2 已发布: 2013/7/9 16:51:49
Fridel Selitsky

Fridel Selitsky

520个赞,共451个帖子。

组: User

Beautiful animation: To reduce the computation time can be operators "for", which do not depend on time, move out of the function cloc (s).
Best Regards,Ber7.

AnalogClock1.sm (22.29 KiB)已下载 1445 次。
2位用户喜欢此帖子
Davide Carpi 2013/7/9 17:15:00, Andrey Ivashov 2013/7/10 08:27:00
#3 已发布: 2013/7/9 17:20:04
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: Moderator

Thank you ber,

this make the script faster and easier to read


Best regards,

Davide


P.S. worksheet updated
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 已发布: 2013/7/11 05:37:01
Fridel Selitsky

Fridel Selitsky

520个赞,共451个帖子。

组: User

Davide,if your program to change the settings a bit, we get
"real" analog clock (all the arrows are moving continuously).
Best Regards,
Ber7


AnalogClock2.sm (21.44 KiB)已下载 1516 次。
2位用户喜欢此帖子
Вячеслав Мезенцев 2013/7/11 13:12:00, Davide Carpi 2013/7/11 08:45:00
#5 已发布: 2013/7/11 08:49:18
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: Moderator

I see, wonderful
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#6 已发布: 2019/7/16 00:08:53
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

Beautiful animation: To reduce the computation time can be operators "for", which do not depend on time, move out of the function cloc (s).
Best Regards,Ber7.


Glorious old vintage, before I joined Smath.
More elegant needles in there ... needs be animated

Rolex.PNG

attach]31143[/attach]

#7 已发布: 2019/7/18 14:24:18
Oscar Campo

Oscar Campo

135个赞,共309个帖子。

组: Moderator

Cheers to all!
This is my 5 cents to this thread. I only took some pieces of code from here and there, a little bit of make up, and.. voilá: my version of analog clock that works on "real" time

Updated 19jul2019 (Special thanks to [USERLINK]Razonar[/USERLINK]):
Annoying "purple line" eliminated. Path for sound files fixed. More realistic movement of hands clock.


Analog Clock Real Time.PNG
MyClock2.sm (38.86 KiB)已下载 1395 次。
click_low.wav (171.1 KiB)已下载 367 次。
alarm.wav (891.03 KiB)已下载 376 次。
2位用户喜欢此帖子
frapuano 2019/7/18 14:53:00, Alvaro 2019/7/19 02:04:00
#8 已发布: 2019/7/19 02:25:06
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: User

Hola Oscar. Very nice effects.

You can improve it multiply Play() by 1000 or something else but big. This avoid the horizontal purple line in the clock.

Also you define the location of the files as "D:\sound.wav". Using 1000*Play("sound.wav" ) searches sound in the same directory of the SMath file.

Finally notice that your blue hours hand jumps between hours, but not follow the actual movement of an hours hand clock. You need to take 1/2-1/6*el(NOW,1)-el(NOW,2)/600 as the arguments for sin, cos functions for place it between exact hours considering the minutes too.

Best regards.

Alvaro.
2位用户喜欢此帖子
frapuano 2019/7/19 05:23:00, Oscar Campo 2019/7/19 17:39:00
#9 已发布: 2019/7/19 18:15:08
Oscar Campo

Oscar Campo

135个赞,共309个帖子。

组: Moderator

Wrote

Hola Oscar. Very nice effects.

You can improve it multiply Play() by 1000 or something else but big. This avoid the horizontal purple line in the clock.

Also you define the location of the files as "D:\sound.wav". Using 1000*Play("sound.wav" ) searches sound in the same directory of the SMath file.

Finally notice that your blue hours hand jumps between hours, but not follow the actual movement of an hours hand clock. You need to take 1/2-1/6*el(NOW,1)-el(NOW,2)/600 as the arguments for sin, cos functions for place it between exact hours considering the minutes too.

Best regards.

Alvaro.



Thanks for your suggestions Also I considering the seconds in the movement of the minutes hand for a more realistic appearance.
I've updated the file and I uploaded the new one, you can check it here.
  • 有新帖
  • 无新帖