Browse Search Popular Register Upload Rules User list Login:
Search:
Flip Clock Mod II

Image:
screenshot of the scene

Author: s_noonan

Group: Default

Filesize: 127.98 kB

Date added: 2023-08-05

Rating: 6.5

Downloads: 4544

Views: 653

Comments: 19

Ratings: 4

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

This scene uses Algodoo system.time.

Rev A: Added Python time correction. Zoom out and see blue boxes above clock.
Rev B: Modified Python code to write time file at the start of a second.
Rev C: Python script now synchronizes with Algodoo scene to update time every 10 seconds.
Last edited at 2023/08/24 00:17:35 by s_noonan
Please log in to rate this scene
edit
Similar scenes
Title: for Matteo 0605
Rating: 5
Filesize: 190.5 kB
Downloads: 589
Comments: 3
Ratings: 1
Date added: 2018/06/07 21:18:08
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Accurate mechanical clock
Rating: 6.3
Filesize: 386.38 kB
Downloads: 2277
Comments: 3
Ratings: 4
Date added: 2009/10/24 02:54:05
Made with: Algodoo before v1.8.5
Rating: rated 6.3
download
Title: Large Analog Clock
Rating: 5
Filesize: 389.19 kB
Downloads: 1480
Comments: 0
Ratings: 1
Date added: 2019/06/24 00:35:46
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: New FlipClock final
Rating: 5.625
Filesize: 238.7 kB
Downloads: 4462
Comments: 7
Ratings: 2
Date added: 2023/08/01 16:56:02
Made with: Algodoo v2.1.0
Rating: rated 5.6
download
Title: the speed when i download
Rating: 2.2727
Filesize: 76.11 kB
Downloads: 727
Comments: 5
Ratings: 11
Date added: 2009/01/10 02:03:26
Made with: Phun
Rating: rated 2.3
download
Title: Mechanical clock (Working)
Rating: 5.7778
Filesize: 1.07 MB
Downloads: 3026
Comments: 1
Ratings: 3
Date added: 2013/06/30 09:11:57
Made with: Algodoo v2.1.0
Rating: rated 5.8
download
This scene is a response to
show list
Title: New FlipClock final
Rating: 5.625
Filesize: 238.7 kB
Downloads: 4462
Comments: 7
Ratings: 2
Date added: 2023/08/01 16:56:02
Made with: Algodoo v2.1.0
Rating: rated 5.6
download
The transposition matrix causes a brief after-shock during the phase transition of the diamond plated phantastron voltage divider. :huh:
Last edited at 2023/08/06 02:25:27 by Xray
Thanks. That must have been due to aliasing between the update rate and system.time. I changed the code to update the time midway thru system.time seconds.
It works correctly now. :tup:
Wonderfull :tup:
Thanks.
It turns out that Algodoo system.time is not as accurate as I thought. On my PC, the clock lost 64 seconds in 10 hours when compared to the PC time.
Thanks for testing system.time and publishing your results. Those of us who use system.time in their scenes would want to know that. :tup:

System.time is probably accurate enough for 99.99% of all Algodoo scenes that use it. If anyone needs a time base that's more accurate, then they should consider something other than Algodoo.
376 users that are now running Flip Clock Mod II are going to be disappointed. I could probably write a Python program that could send the PC system time to an Algodoo text input menu by using sendkeys or something like that.
Hey, that would be awesome! (if you decide to do it)
Wow, that was fast! Only problem is I cannot get it to function. I'm sure the problem is on my end because I am a Python newbie and therefore I'm probably not doing something correctly. My version of Python is 3.11. Also, I tried running your script via the command line interpreter. Could that possibly be the problem?
Q: I tried running your script via the command line interpreter. Could that possibly be the problem?
A: Yes, AlgoTime.py needs to be in the C:\Users\Xray\Documents\Algodoo folder. You should be able to run it by double-clicking the file. A command window should then open and stay open. If the command window stays open, then it's probably working OK. If it opens but immediately closes, then Python doesn't like the script. The modules "time" and "datetime" need to be loaded on your system. If you run the file using IDLE, it will probably tell you if it doesn't see a module. Modules are typically loaded by by entering "pip install modulename" in a command window. Python indentation is critical. Any indentation errors will cause the code to fail. If you run the file in IDLE, it will tell you at what line the code fails. If the file runs in IDLE, but double clicking the file doesn't open it, then Python needs to be in your PATH variable. If the code runs correctly and is in the right place, but the clock in the scene doesn't update, then you probably need to set _readPythonTime = true in the time setting box script below the clock. I've updated the Python code in the latest scene edit, but the old code and the new code should both work.

P.S. If I right click on AlgoTime.py and choose "Open with" and select Python then the code doesn't work because it's apparently running somewhere other than the Algodoo folder. That's why Python needs to be in your PATH variable (or you need to put "with open('C:\Users\Xray\Documents\Algodoo\AlgoTime.txt', 'w') as f:" in AlgoTime.py).
Last edited at 2023/08/12 12:20:39 by s_noonan
Okay, thanks for the info. I'm pretty sure I know what I did wrong, and I'll let you know when I get it to work. I spent the better part of this morning replacing the battery in my wife's car (a 2005 Buick Rendezvous). I want to shoot the engineer who came up with such a difficult method of mounting a battery under a maze of cables and steel bars that must be removed in order to get to it. :mad:
I find it amusing that your wife drives such an old car. My wife drives a 2004 Honda Odyssey. Why do they put up with it? I think the trick is to always drive an older more beat up car than your wife. Besides an older car cost less in taxes and insurance and both cars have high reliability.
I drive a 2006 Chevy Silverado pickup which is only one year newer than my wife's car. I needed it when I ran my X-ray repair business until I retired in 2017. It's a great heavy duty truck but it gets horrible gas mileage. On open highways and at freeway speeds I'm lucky if I get 12 to 13 MPG! City driving I get around 10 MPG. Now that I'm retired, we hardly go anywhere except short trips to family or stores so gasoline cost is not an issue. By the way, I changed the battery in my truck and it took me about 20 minutes. My wife's car took about three and a half hours including broken and stripped screws, and I cussed more during that time period than I did during my four years in the U.S. Navy! :lol:
Wow, awesome coding! You obviously spent a lot of time on this scene. :tup:
Thanks. Yes, I initially spent a lot of time reducing the lines of Algodoo code and then spent some time synchronizing Python time write to the Algodoo check time window. I use the modified date of the Algodoo modified text file to synchronize Python to Algodoo. The time is now updated once every 10 seconds.
Impressive. :tup:
Yes, I agree with Xray. The thing I most love in this scene is the flip animination:tup: ! It looks like in real life!_o_ That's why im rating this a 10.
Thanks.