Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Davide Carpi  
#1 Posted : 09 July 2013 17:24:35(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
A simple animation Good


Best Regards,

Davide
File Attachment(s):
AnalogClock.sm (23kb) downloaded 255 time(s).
AnalogClock_viewer.7z (356kb) downloaded 155 time(s).
Davide Carpi attached the following image(s):
clock.gif
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 4 users thanked Davide Carpi for this useful post.
on 09/07/2013(UTC),  on 09/07/2013(UTC),  on 10/07/2013(UTC),  on 11/07/2013(UTC)

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Ber7  
#2 Posted : 09 July 2013 23:51:49(UTC)
Ber7


Rank: Advanced Member

Groups: Registered
Joined: 15/07/2010(UTC)
Posts: 437
Man
Israel
Location: Beer-Sheva

Was thanked: 520 time(s) in 288 post(s)
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.
File Attachment(s):
AnalogClock1.sm (23kb) downloaded 120 time(s).
thanks 2 users thanked Ber7 for this useful post.
on 10/07/2013(UTC),  on 10/07/2013(UTC)
Offline Davide Carpi  
#3 Posted : 10 July 2013 00:20:04(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Thank you ber,

this make the script faster and easier to read Friends


Best regards,

Davide


P.S. worksheet updated Foto
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Ber7  
#4 Posted : 11 July 2013 12:37:01(UTC)
Ber7


Rank: Advanced Member

Groups: Registered
Joined: 15/07/2010(UTC)
Posts: 437
Man
Israel
Location: Beer-Sheva

Was thanked: 520 time(s) in 288 post(s)
Davide,if your program to change the settings a bit, we get
"real" analog clock (all the arrows are moving continuously).
Best Regards,
Ber7

File Attachment(s):
AnalogClock2.sm (22kb) downloaded 161 time(s).
thanks 2 users thanked Ber7 for this useful post.
on 11/07/2013(UTC),  on 11/07/2013(UTC)
Offline Davide Carpi  
#5 Posted : 11 July 2013 15:49:18(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
I see, wonderful Good
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Jean Giraud  
#6 Posted : 16 July 2019 06:08:53(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: Ber7 Go to Quoted Post
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]

Offline oscampo  
#7 Posted : 18 July 2019 20:24:18(UTC)
oscampo


Rank: Advanced Member

Groups: Registered
Joined: 10/12/2009(UTC)
Posts: 238
Man
Colombia
Location: Cali, Colombia

Was thanked: 79 time(s) in 60 post(s)
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 Razonar Offline ):
Annoying "purple line" eliminated. Path for sound files fixed. More realistic movement of hands clock.


Analog Clock Real Time.PNG
MyClock2.sm (39kb) downloaded 44 time(s).
click_low.wav (172kb) downloaded 41 time(s).
alarm.wav (892kb) downloaded 39 time(s).

Edited by user 20 July 2019 00:24:52(UTC)  | Reason: Annoying "purple line" eliminated. Path for sound files fixed. More realistic movement of

thanks 2 users thanked oscampo for this useful post.
on 18/07/2019(UTC),  on 19/07/2019(UTC)
Offline Razonar  
#8 Posted : 19 July 2019 08:25:06(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
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 2 users thanked Razonar for this useful post.
on 19/07/2019(UTC),  on 19/07/2019(UTC)
Offline oscampo  
#9 Posted : 20 July 2019 00:15:08(UTC)
oscampo


Rank: Advanced Member

Groups: Registered
Joined: 10/12/2009(UTC)
Posts: 238
Man
Colombia
Location: Cali, Colombia

Was thanked: 79 time(s) in 60 post(s)
Originally Posted by: Razonar Go to Quoted Post
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 Clap 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.

Edited by user 20 July 2019 00:26:23(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.