1 Pages (9 items)
Analog Clock - A simple animation - Messages
#1 Posted: 7/9/2013 10:24:35 AM
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
4 users liked this post
ioan92 7/9/2013 11:21:00 AM, Вячеслав Мезенцев 7/11/2013 1:12:00 PM, Andrey Ivashov 7/10/2013 8:27:00 AM, Fridel Selitsky 7/9/2013 2:27:00 PM
#2 Posted: 7/9/2013 4:51:49 PM
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 KiB) downloaded 162 time(s).
Best Regards,Ber7.
AnalogClock1.sm (22 KiB) downloaded 162 time(s).
2 users liked this post
#3 Posted: 7/9/2013 5:20:04 PM
Thank you ber,
this make the script faster and easier to read
Best regards,
Davide
P.S. worksheet updated
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 Posted: 7/11/2013 5:37:01 AM
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 KiB) downloaded 205 time(s).
"real" analog clock (all the arrows are moving continuously).
Best Regards,
Ber7

AnalogClock2.sm (21 KiB) downloaded 205 time(s).
2 users liked this post
#5 Posted: 7/11/2013 8:49:18 AM
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 Posted: 7/16/2019 12:08:53 AM
#7 Posted: 7/18/2019 2:24:18 PM
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.

MyClock2.sm (38 KiB) downloaded 81 time(s).
click_low.wav (171 KiB) downloaded 79 time(s).
alarm.wav (891 KiB) downloaded 73 time(s).
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.
MyClock2.sm (38 KiB) downloaded 81 time(s).
click_low.wav (171 KiB) downloaded 79 time(s).
alarm.wav (891 KiB) downloaded 73 time(s).
2 users liked this post
#8 Posted: 7/19/2019 2:25:06 AM
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.
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 users liked this post
#9 Posted: 7/19/2019 6:15:08 PM
WroteHola 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

I've updated the file and I uploaded the new one, you can check it here.
1 Pages (9 items)
-
New Posts
-
No New Posts