HomeALGEBRAClock | mathbabe

Clock | mathbabe

Guest post by Sander O’Neil

Clock | mathbabe

This is a follow up to this post https://mathbabe.org/2015/03/12/earths-aphelion-and-perihelion/ from 2015

also try other experiments on my website:

https://mroneilportfolio.weebly.com/analemma.html

This JavaScript program is a clock/map/single star-star chart in the style of Geochron.

lets look at the elements of the site

The info here is your location and the time, these should be pulled directly from your computer and your IP address, the location isn’t exact for security reasons but it should point to the nearest city/wherever your WIFI is routed through. day and time of day are represented in numbers but rewritten into something understandable in the box below.

This is a star chart, but just for the sun.

This is a polar graph where distance from the center is the angular distance to straight upward, the light blue circle represents points in the sky above the horizon, dark blue represents below the horizon. Keen thinkers will already realize that this means the outside circle on this graph is actual the point in the sky which represents straight down, (or straight up for people on your Antipode)

The yellow circle is the suns current position in the sky,

the white squares represent where the sun will be in the sky in the next 24 hours, 1 square per hour.

the white line is where the sun will be every other day at this time for the next 365 days. (on my chart 12:47 pm)

On this Equirectangular projection of the earth each pixel moved up/down or left/right represents the same change in angle in latitude or longitude respectively

The yellow circle represents the point on earth closest and pointing most directly at the sun.

the red/black line represents the sunset/sunrise line. On the black side the sun cannot be seen, on the red side it can. As can be seen from this line, the sun has just risen in Hawaii and is soon to set over Greece.

The red horizontal line is your latitude.

The white vertical line is your longitude.

the yellow squares represent where the sun will be in the sky in the next 24 hours, 1 square per hour.

the white line is where the sun will be every other day at this time for the next 365 days.

the yellow and orange curves give some sense of where the sun is most directly warming currently.

Principles

The way I have actually gotten these positions is basically the most complicated possible method.

const f1 = vec(-783.79 / 2, 0);
const f2 = vec(783.79 / 2, 0);
let a = 23455;
let c = Math.abs(f1[0] - f2[0]) / 2;
let b = Math.sqrt(a * a - c * c);

const goal_angle_to_orbital_pos = (goal_angle) => {
    let angle = goal_angle + 0;
    let M = goal_angle - 0.0167086 * Math.sin(goal_angle - Math.PI);
    let goal_dif = M - goal_angle;

    for (let n = 0; n < 10; n += 1) {
        angle += goal_dif;
        M = angle - 0.0167086 * Math.sin(angle - Math.PI);
        goal_dif = goal_angle - M;
    }

    p = vec(Math.cos(angle) * a, Math.sin(angle) * b);
    return math.subtract(f1, p);
}

const rev_transform_planet = (p, a) => {
    const angle = a * 365.25 * 366.25 / 365.25;
    const day_matrix = rotationMatrix(2, angle); // Z-axis rotation

    const earth_tilt = math.unit(-23.5, 'deg').toNumber('rad');
    const tilt_matrix = rotationMatrix(1, earth_tilt); // Y-axis rotation

    const angle_tilt_to_elipse = -0.22363;
    const day_tilt_to_elipse = rotationMatrix(2, angle_tilt_to_elipse); // Z-axis rotation

    p = vec3(p[0], p[1], 0);
    let rotated_point = math.multiply(day_matrix, math.multiply(tilt_matrix, math.multiply(day_tilt_to_elipse, p)));
    rotated_point = normalize(rotated_point._data);
    const angle_rev = a * 365.25;

    let longitude = Math.atan2(rotated_point[1], rotated_point[0])-0.24385;
    let latitude = Math.atan2(rotated_point[2], Math.sqrt(rotated_point[1] * rotated_point[1] + rotated_point[0] * rotated_point[0]))

    return [vec(longitude, latitude), Math.abs(angle_rev + 0.22363) % (2 * Math.PI), rotated_point];
};

const year_to_angle = (t) => { return t * 2.0 * Math.PI - (182.0) / 365.25 }
const day_hour_to_angle = (d, h) => { return ((d - 182.0) / 365.25 + h / 365.25 / 24) * 2.0 * Math.PI }
const day_hour_to_year = (d, h) => { return ((d) / 365.25 + h / 365.25 / 24) }


Basically I’ve got the dynamics of the earths orbit of off Wikipedia and created a ellipse out of it. there is a concept in orbital mechanics of an imaginary angle called the mean anomaly which is an angle that changes at a constant rate through an orbit. It is not hard to calculate what the current mean anomaly is but it is only possible to estimate the real position of a point based on its mean anomaly. That is why my goal_angle_to_orbital_pos function performs 10 guesses and corrections. This is technically not an exact solution for the earths location in orbit but it gets 5 times more accurate with each correction so its indiscernible after 10 corrections

You will see odd corrections here, some constants thrown in. This is because the orbit and rotation of the earth are not all aligned. For instance the Apoapsis is 182 days off of the start of the year.

Future work

Tell me what you think of the NESW arrangement of the star chart. It is a little strange but you would use the chart in its current form by setting it on the ground. If it was going to represent looking up then it should be NORTH WEST SOUTH EAST.

Tell me if the location and time are correct for you, and anything else you want to see.

https://mroneilportfolio.weebly.com/clock.html

also you can go to my GitHub and just download the clock.html file and run it locally for the best experience https://github.com/Sander-ONeil/sun-timing/

Most Popular

More from Author

Google Forms for Formative Assessment in Math Class

Cheers to a new school year that will be unlike any...

2nd Grade Subtraction Worksheet | Subtraction of 2-Digit Numbers

In 2nd grade subtraction worksheet we will solve the problems on subtraction...

S01 overview – Intellectual Mathematics

Galileo is the most overrated figure in the history of science....

Digital SAT Math Problems and Solutions (Part

Problem 1 :Store A sells raspberries for $5.50 per pint and...

- A word from our sponsors -

Read Now

Google Forms for Formative Assessment in Math Class

Cheers to a new school year that will be unlike any school year before!I know that all of us are looking at new and different plans...hybrid/synchronous/asynchronous/ fully in person/fully remote...the list goes on.   I have spent a considerable amount of time trying to figure out how I...

2nd Grade Subtraction Worksheet | Subtraction of 2-Digit Numbers

In 2nd grade subtraction worksheet we will solve the problems on subtraction of 2-digit numbers (without Regrouping), subtraction of numbers with regrouping, subtracting 1-digit number from 2-digit number with regrouping, subtracting 2-digit number with regrouping, checking subtraction with addition, subtraction is reverse of addition, addition and subtraction together, estimating the difference and...

S01 overview – Intellectual Mathematics

Galileo is the most overrated figure in the history of science. That is the thesis of Season 1 of my podcast, which consists of the following 18 episodes. Galileo bad, Archimedes good Galileo’s bumbling attempts at determining the area of the cycloid suggests a radical new interpretation of...

Digital SAT Math Problems and Solutions (Part

Problem 1 :Store A sells raspberries for $5.50 per pint and blackberries for $3.00 per pint. Store B sells raspberries for $6.50 per pint and blackberries for $8.00 per pint. A certain purchase of raspberries and blackberries would cost $37.00 at store A or $66.00 at store B. How many...

How To Find The Factors Of 20: A Simple Way

The factors of 20 are the numbers 1, 2, 4, 5, 10, 20, -1, -2, -4, -5, -10, and -20. As you can see, the total number of factors 20 has is 12. Make the following observations!The numbers 1, 2, 4, 5, 10, 20 are called positive factors of...

Addition & Subtraction Together |Combination of addition & subtraction

We will solve the different types of problems involving addition and subtraction together. To show the problem involving both addition and subtraction, we first group all the numbers with ‘+’ and ‘-‘ signs. We find the sum of the numbers with ‘+’ sign and similarly the sum of all the...

Two Back to School Ideas for Digital Classrooms

 Yep, it's a school year like no other.  If you're like me, you have some very specific back to school routines...you buy the new school supplies, you get your kids a new backpack, you prepare your bulletin boards.  There are even back to school activities that I...

Digital SAT Math Problems and Solutions (Part

Problem 1 :Each face of a fair 14-sided die is labeled with a number from 1 through 14, with a different number appearing on each face. If the die is rolled one time, what is the probability of rolling a 2? Solution : https://www.youtube.com/watch?v=PC0RAjG6Zb8 Problem 2 :A printer produces posters...

Percent of Increase Word Problems

Hello and welcome! We're focusing today on a fascinating mathematical topic: percent of increase word problems. We've got some exciting scenarios to consider and we'll walk through these calculations together. It'll be as simple as counting 1, 2, 3. Let's start! Before we start, let's be clear on...

Societal role of geometry in early civilisations – Intellectual Mathematics

Podcast: DownloadIn ancient Mesopotamia and Egypt, mathematics meant law and order. Specialised mathematical technocrats were deployed to settle conflicts regarding taxes, trade contracts, and inheritance. Mathematics enabled states to develop civil branches of government instead of relying on force and violence. Mathematics enabled complex economies in which...

Sub Plans for High School Math Class – Webquests are Perfect!

Distance learning ... hybrid learning ... asynchronous learning ...   we're all learning different terms right now!  Here is a type of activity would be great in any of these settings...Webquests!I have used these types of activities in my classroom for a number of years.  I enjoy using...

Digital SAT Math Problems and Solutions (Part

Problem 1 :A neighborhood consists of a 2-hectare park and a 35-hectare residential area. The total number of trees in the neighborhood is 3,934. The equation 2x + 35y = 3,934 represents this situation. Which of the following is the best interpretation of x in this context? A) ...