This is not a question about leap year. Let's pretend one "standard" year is 365.25 "days" and let us not think about it for now.
Punchline first: The "year" you've pictured your whole life is *technically* wrong, and my clock program will prove it to you.
Taking a coordinate system where the sun is stationary, note that the earth does *two* things: it
revolves (around the sun) and it
rotates (about its center axis, the 23-degree tilt does not matter). Now check it out: If the earth did not rotate at all, then the "standard" year would be 365.25 days, that's fair. However if you factor in the rotation of the earth, you will get plus or minus one full day, depending on if the rotation direction opposes or agrees with the revolution direction.
The *actual* number of days in the year cannot be 365.25, it must be 364.25 or 366.25. So which is it? Let's ask Google whether the rotation direction of the Earth is the same as its revolution direction, because surely that's been measured. The top result asserts:
One of the most remarkable features of our solar system is that nearly all of the revolutions and rotations are in the same direction.
So then, it just so happens that the rotation is "helping" the revolution, speeding the year up.
The truth, boys, is that there are 364.25 days in one year.Don't believe me yet? I'm going to attach a screenshot of the curious clock just posted on a neighboring thread. We have an analog clock, with the minute hand attaching to the top of the hour hand, and the second hand attaching to the minute hand. This is analogous to a solar system, where one hand is "in orbit" with respect to its parent. Of course, again just like the solar system, the rotation direction of each hand is in agreement.
The red circles track the hours 1-12, no problem there... But watch the minute hand. It's an honest minute hand: up means 12, down means 6, just like a regular clock. However, when we count the number of "loops" the minute hand makes per 12 hours, we clearly get 11, not 12. What? The pattern followed by the minute hand repeats precisely 11 times. Not what you would expect on a 12-hour clock.
The remedy to all this is even more subtle than the problem. The reason there are not *actually* 11 hours per half-day, is because analog clock hands are always printed on some kind of reference frame. There is always some indication of where 12 is, and from there, you can map the entire face of the clock. You can even build the clock, rotate it any way you want, it it will still be accurate. Whenever you move the clock, you drag the coordinate system around with it.
When it comes to defining the astronomical year, the local solar system doesn't have a notion of "12 o'clock". The best thing we can do is draw an imaginary line between Earth and the sun on any particular day (easily done with mountains, megaliths, and their shadows), and then wait for that moment to repeat itself, calling that moment "one year later". Indeed, this is where the Earth year of 365.25 days comes from. It's measured from Earth on a moving coordinate system. Okay, so for *our* Earthly purposes, there are 365.25 days per year. Take your calendars out of the recycle bin, everything is fine.
So why is that somehow wrong, and what's this 364.25 business? It's the length of an Earth year when you fix an absolute coordinate system. That is, if I took something "fixed", like the stars, and measured all of my coordinates from those, then I would look at Earth and surely measure the length of the year to be 364.25 days. (If Earth rotated backwards, I would get 366.25, but it doesn't.)
Who needs this? People who study cosmic rays. If your concern is massive particle beams whizzing through space, you shouldn't be trying to tune everything on "Earth time". Instead, they have a thing called "Anti-sidereal time":
Anti-sidereal time... Anyway, at the very least, I hope you can see why my 12-hour clock seemingly runs on an 11-hour cycle.
EDIT: Code:
HourHand.Center.x = 0
HourHand.Center.y = 0
HourHand.Length = 140
HourHand.Shade
= _RGBA(255, 0, 0, 255)MinuteHand.Length = HourHand.Length / phi
MinuteHand.Shade
= _RGBA(0, 255, 0, 255)SecondHand.Length = HourHand.Length / (phi ^ 2)
SecondHand.Shade
= _RGBA(255, 0, 255, 255)
CALL ccircle
(HourHand.HandPosition.x
, HourHand.HandPosition.y
, 5, _RGBA(_RED32(HourHand.Shade
), _GREEN32(HourHand.Shade
), _BLUE32(HourHand.Shade
), 200)) FOR k
= 0 TO 12 * 3600 - (12 * 3) STEP (12 * 3) CALL ccircle
(MinuteHand.HandPosition.x
, MinuteHand.HandPosition.y
, 3, _RGBA(_RED32(MinuteHand.Shade
), _GREEN32(MinuteHand.Shade
), _BLUE32(HourHand.Shade
), 100))
HourHand.Angle = -((TheTime.Hour + (TheTime.Minute / 60)) / 12) * 2 * pi + pi / 2
MinuteHand.Angle = -((TheTime.Minute + (TheTime.Second / 60)) / 60) * 2 * pi + pi / 2
SecondHand.Angle = -(TheTime.Second / 60) * 2 * pi + pi / 2
HourHand.HandPosition.x
= HourHand.Center.x
+ HourHand.Length
* COS(HourHand.Angle
) HourHand.HandPosition.y
= HourHand.Center.y
+ HourHand.Length
* SIN(HourHand.Angle
) MinuteHand.Center.x = HourHand.HandPosition.x
MinuteHand.Center.y = HourHand.HandPosition.y
MinuteHand.HandPosition.x
= MinuteHand.Center.x
+ MinuteHand.Length
* COS(MinuteHand.Angle
) MinuteHand.HandPosition.y
= MinuteHand.Center.y
+ MinuteHand.Length
* SIN(MinuteHand.Angle
) SecondHand.Center.x = MinuteHand.HandPosition.x
SecondHand.Center.y = MinuteHand.HandPosition.y
SecondHand.HandPosition.x
= SecondHand.Center.x
+ SecondHand.Length
* COS(SecondHand.Angle
) SecondHand.HandPosition.y
= SecondHand.Center.y
+ SecondHand.Length
* SIN(SecondHand.Angle
)
CALL ccircle
(SecondHand.HandPosition.x
, SecondHand.HandPosition.y
, 3, SecondHand.Shade
) CALL lineSmooth
(SecondHand.Center.x
, SecondHand.Center.y
, SecondHand.HandPosition.x
, SecondHand.HandPosition.y
, SecondHand.Shade
) CALL ccircle
(MinuteHand.HandPosition.x
, MinuteHand.HandPosition.y
, 3, MinuteHand.Shade
) CALL lineSmooth
(MinuteHand.Center.x
, MinuteHand.Center.y
, MinuteHand.HandPosition.x
, MinuteHand.HandPosition.y
, MinuteHand.Shade
) CALL ccircle
(HourHand.HandPosition.x
, HourHand.HandPosition.y
, 3, HourHand.Shade
) CALL lineSmooth
(HourHand.Center.x
, HourHand.Center.y
, HourHand.HandPosition.x
, HourHand.HandPosition.y
, HourHand.Shade
)
TheTime.Hour = t \ 3600
t = t - TheTime.Hour * 3600
IF (TheTime.Hour
> 12) THEN TheTime.Hour
= TheTime.Hour
- 12 TheTime.Minute = t \ 60
t = t - TheTime.Minute * 60
TheTime.Second = t
'translated from
'https://en.wikipedia.org/w/index.php?title=Xiaolin_Wu%27s_line_algorithm&oldid=852445548
steep
= ABS(y1
- y0
) > ABS(x1
- x0
)
dx = x1 - x0
dy = y1 - y0
gradient = dy / dx
gradient = 1
'handle first endpoint
DIM xend
, yend
, xgap
, xpxl1
, ypxl1
yend = y0 + gradient * (xend - x0)
xgap
= (1 - ((x0
+ .5) - INT(x0
+ .5))) xpxl1 = xend 'this will be used in the main loop
plX = ypxl1
plY = xpxl1
plI
= (1 - (yend
- INT(yend
))) * xgap
plX = ypxl1 + 1
plY = xpxl1
plI
= (yend
- INT(yend
)) * xgap
plX = xpxl1
plY = ypxl1
plI
= (1 - (yend
- INT(yend
))) * xgap
plX = xpxl1
plY = ypxl1 + 1
plI
= (yend
- INT(yend
)) * xgap
intery = yend + gradient 'first y-intersection for the main loop
'handle second endpoint
yend = y1 + gradient * (xend - x1)
xgap
= ((x1
+ .5) - INT(x1
+ .5)) xpxl2 = xend 'this will be used in the main loop
plX = ypxl2
plY = xpxl2
plI
= (1 - (yend
- INT(yend
))) * xgap
plX = ypxl2 + 1
plY = xpxl2
plI
= (yend
- INT(yend
)) * xgap
plX = xpxl2
plY = ypxl2
plI
= (1 - (yend
- INT(yend
))) * xgap
plX = xpxl2
plY = ypxl2 + 1
plI
= (yend
- INT(yend
)) * xgap
'main loop
FOR x
= xpxl1
+ 1 TO xpxl2
- 1 plY = x
plI
= (1 - (intery
- INT(intery
)))
plY = x
plI
= (intery
- INT(intery
))
intery = intery + gradient
FOR x
= xpxl1
+ 1 TO xpxl2
- 1 plX = x
plI
= (1 - (intery
- INT(intery
)))
plX = x
plI
= (intery
- INT(intery
))
intery = intery + gradient
plot:
' Change to regular PSET for standard coordinate orientation.