Jump to content

Well, a circle has 360 degrees.

The 360 degrees correspond to 12 hours and to 60 minutes.

So 1 minute would correspond to a 6 degree angle , and 1 hour to a 30 degree angle.

We'll count the angles relative to the hour 12 , or 0 , on the circle.

 

So if you have 3 hours, that would make an angle of 90 degrees.

Then , let's say we have also have 30 minutes. That would make an angle of 180 degrees.

The difference between the angles is 90 degrees.

 

Let's take the my current time for another example.

23:18

 

The hour 23 corresponds to the hour 11, and we'll use that since it's easier to work with it. The hour angle is 330 degrees.

The minute angle is 108 degrees.

The difference between the hours and the minutes is 222 degrees.

 

Of course, that's if you don't count the fact that when the clock points , let's say , 12:30 , the hour thingy points between 12 and 1, and not at 12.

 

If we want to keep that into account, then we'll need to transform our current time into minutes. The angle will be equal to our hours , in minutes, plus our minutes.

T = H*60 + M

Now we want to represent this angle, which indicates the exact position of the hour thingy. It can point at something like 14:30 , unlike our previous solution.

That angle is half of our current time.

angle_hours = (H*60+M)/2

(not exactly sure why, but that's how it would work with your formula)

The angle of the minute thingy is :

angle_minutes = 6 * M

 

Now we just want to substract them and we end up with our delta.

 

delta = | (H*60 + M)*1/2 - 6*M|

 

The rest is just writing it under a different form.

i5 4670k @ 4.2GHz (Coolermaster Hyper 212 Evo); ASrock Z87 EXTREME4; 8GB Kingston HyperX Beast DDR3 RAM @ 2133MHz; Asus DirectCU GTX 560; Super Flower Golden King 550 Platinum PSU;1TB Seagate Barracuda;Corsair 200r case. 

Link to comment
https://linustechtips.com/topic/485494-math/#findComment-6509535
Share on other sites

Link to post
Share on other sites

Well, a circle has 360 degrees.

The 360 degrees correspond to 12 hours and to 60 minutes.

So 1 minute would correspond to a 6 degree angle , and 1 hour to a 30 degree angle.

We'll set our base line (relative to which we calculate our angles) as the line that goes through the center of the circle and through the points which determine hours 12 and 6.

 

So if you have 3 hours, that would make an angle of 90 degrees.

Then , let's say we have also have 30 minutes. That would make an angle of 180 degrees.

The difference between the angles is 90 degrees.

1 minute is 6 degrees is that 6 degrees between the 2 hands?

Link to comment
https://linustechtips.com/topic/485494-math/#findComment-6509572
Share on other sites

Link to post
Share on other sites

1 minute is 6 degrees is that 6 degrees between the 2 hands?

Read updated post.

i5 4670k @ 4.2GHz (Coolermaster Hyper 212 Evo); ASrock Z87 EXTREME4; 8GB Kingston HyperX Beast DDR3 RAM @ 2133MHz; Asus DirectCU GTX 560; Super Flower Golden King 550 Platinum PSU;1TB Seagate Barracuda;Corsair 200r case. 

Link to comment
https://linustechtips.com/topic/485494-math/#findComment-6509731
Share on other sites

Link to post
Share on other sites

@cakez

Ok , I figured it out.

The hour hand is at a certain position.

The hand angle is equal to the hour-only angle + the minute angle of the entire time.

What I mean to say more specifically :

The hour hand can go inbetween hour marks, let's say 6:30. The hour hand would be right between the hour 6 and hour 7 marks.

A watch has that distance divided into 5 different parts (with 4 lines).

We know that, if we add all the 5 angles up, we end up with the angle between 2 consecutive hours, which is 30 degrees. So each division should have 6 degrees.

Then, we also know that, if we add up the "minutes" which cause the hand clock to go in between two hour marks, we need to end up with 60 minutes, or 1 hour.

So when we add up the minutes coresponding to the 5 divisions, we end up with 60. That means that each division represents 12 minutes.

12 minutes represent 6 degrees.

1 minute represents 0.5 degrees.

So, the formula for the hand clock angle is :

angle_hour_hand = 30 * H + 0.5*M

If we process it a little we end up with

angle_hour_hand = 1/2*(60*H+0.5*M)

 

Then we just substract the minute hand angle.

i5 4670k @ 4.2GHz (Coolermaster Hyper 212 Evo); ASrock Z87 EXTREME4; 8GB Kingston HyperX Beast DDR3 RAM @ 2133MHz; Asus DirectCU GTX 560; Super Flower Golden King 550 Platinum PSU;1TB Seagate Barracuda;Corsair 200r case. 

Link to comment
https://linustechtips.com/topic/485494-math/#findComment-6509925
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×