Analog Clock

Analog Clock - A simple animation - Mensajes

#1 Publicado: 9/7/2013 10:24:35
Davide Carpi

Davide Carpi

1.443 me gusta en 2.936 mensajes.

Grupo: Moderator

A simple animation


Best Regards,

Davide
AnalogClock_viewer.7z (355,86 KiB) descargado 832 vez(es).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
A 4 usuarios les gustó este mensaje
ioan92 9/7/2013 11:21:00, Вячеслав Мезенцев 11/7/2013 13:12:00, Andrey Ivashov 10/7/2013 8:27:00, Fridel Selitsky 9/7/2013 14:27:00
#2 Publicado: 9/7/2013 16:51:49
Fridel Selitsky

Fridel Selitsky

520 me gusta en 451 mensajes.

Grupo: 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) descargado 1425 vez(es).
A 2 usuarios les gustó este mensaje
Davide Carpi 9/7/2013 17:15:00, Andrey Ivashov 10/7/2013 8:27:00
#3 Publicado: 9/7/2013 17:20:04
Davide Carpi

Davide Carpi

1.443 me gusta en 2.936 mensajes.

Grupo: 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 Publicado: 11/7/2013 5:37:01
Fridel Selitsky

Fridel Selitsky

520 me gusta en 451 mensajes.

Grupo: 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) descargado 1490 vez(es).
A 2 usuarios les gustó este mensaje
Вячеслав Мезенцев 11/7/2013 13:12:00, Davide Carpi 11/7/2013 8:45:00
#5 Publicado: 11/7/2013 8:49:18
Davide Carpi

Davide Carpi

1.443 me gusta en 2.936 mensajes.

Grupo: 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 Publicado: 16/7/2019 0:08:53
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: 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 Publicado: 18/7/2019 14:24:18
Oscar Campo

Oscar Campo

135 me gusta en 309 mensajes.

Grupo: 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) descargado 1377 vez(es).
click_low.wav (171,1 KiB) descargado 365 vez(es).
alarm.wav (891,03 KiB) descargado 374 vez(es).
A 2 usuarios les gustó este mensaje
frapuano 18/7/2019 14:53:00, Alvaro 19/7/2019 2:04:00
#8 Publicado: 19/7/2019 2:25:06
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: 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.
A 2 usuarios les gustó este mensaje
frapuano 19/7/2019 5:23:00, Oscar Campo 19/7/2019 17:39:00
#9 Publicado: 19/7/2019 18:15:08
Oscar Campo

Oscar Campo

135 me gusta en 309 mensajes.

Grupo: 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.
  • Nuevos mensajes
  • Sin mensajes nuevos