Slider Mystery

goldenj shared this question 2 years ago
Answered

Every now and then I feel this compulsion to make a clock. I like this one so far, hour hand controls the minute hand, time readout and set time works. Elapsed time works if the time is under 5 hours and ignores the minutes if elapsed time is over five hours. I am stumped. It creates a slider for the number of minutes, then advances the hour hand the angle (.5 deg) for each update of the slider.

Any ideas? Is 300 some kind of limit for sliders?

Comments (5)

photo
1

Nice clock!

300 is not the max for sliders; if I'm understanding correctly, try this: go to object properties and change your gotime slider max to a higher number; see below and attached.

-Peter

f0627339e166cf8a4f860a4fbf7c9410

photo
1

The slider goes to more than 300, but then it loses the minutes in the advancing the time. For example 7 hours 23 minutes only goes forward 7 hours. And the change happens at 5 hours. 4 hours 59 minutes works fine.

photo
1

It's not the max value of the slider that's the issue, I think. Try changing the speed of animation slider et; reducing to 0.5 allows up to 10 hrs., etc.; consider making the speed dependent on the value of gotime, maybe change the speed of et to a new number etspeed and in OnClick button scripting after setting the gotime value add something like: SetValue(etspeed, If(gotime>300, 300/gotime, 1)). That might work for you.

-Peter

photo
1

I tried several differnt speeds - great idea. Unfortunately, that increased the inaccuracy to even lower speeds, although an oddly consistent 4 minutes off for a lot of times.

I need another way to do the animation. Maybe create a set angle, and then transform a fraction of that angle. I just wish I understood why the other way wasn't working!

photo
1

I recommend starting with an integer slider from 0 to 720 (representing all times on the 12 hour clock)https://www.geogebra.org/m/mAGesaxF

© 2020 International GeoGebra Institute