cosinekitty / astronomy

Astronomy Engine: multi-language calculation of Sun, Moon, and planet positions. Predicts lunar phases, eclipses, transits, oppositions, conjunctions, equinoxes, solstices, rise/set times, and other events. Provides vector and angular coordinate transforms among equatorial, ecliptic, horizontal, and galactic orientations.
MIT License
456 stars 63 forks source link

Host live demos of JavaScript browser examples #49

Open cosinekitty opened 5 years ago

cosinekitty commented 5 years ago

I was trying to use GitHub Pages just so I could host live demos of the JavaScript browser examples. It worked, but at the cost of having two different versions of this project with different Markdown renderers. I have turned off GitHub Pages. Now I need to create my own static website just for hosting the demos. Also need to automate the process of publishing there every time I hit a stable release.

matheo commented 3 years ago

I could help here with an Angular App (my speciality) to show up some cool examples on the top of the engine. I want to learn how to render some stuff with the result data, and if I get some help from you we can get it done :)

cosinekitty commented 3 years ago

Hi @matheo ! I'm glad you are interested in contributing. Yes, it would be helpful to have more examples of using Astronomy Engine in some real-world applications. I don't know very much about Angular, React, etc. My goal is to keep Astronomy Engine free of any external dependencies for all the supported languages (C/C++, C#, Python, JavaScript). However, examples and demos can have external dependencies so long as they do not creep into the core libraries.

Do you have any ideas of a project you would like to build? I can definitely help with figuring out how to do various calculations.

matheo commented 3 years ago

examples and demos can have external dependencies so long as they do not creep into the core libraries.

of course, the demo app should be consuming the engine from npm (but it also could use an astronomy.js file as the existing demos.

Do you have any ideas of a project you would like to build?

Initially I want to find some cool 3D stuff like https://sanderblue.github.io/solar-system-threejs/ and try to model the engine data with such fancy displaying for a given AstroTime. In that view we could documebt the Observers.

Then for the Coordinate systems we could use another perspective from https://github.com/ofrohn/d3-celestial

So I'm thinking about an Angular App with the Documentation next to cool animations, and Demo usages with the Moon Phases, Rise/Set, Eclipses, etc.

I can definitely help with figuring out how to do various calculations.

Thank you very much I will study and come back with some questions when I have them :)

faisalr commented 1 year ago

Hi @cosinekitty

I hosted a live demo here https://faisalr.github.io/

cosinekitty commented 1 year ago

That looks great! Thank you for doing that. I noticed that you ask for the geographic location, but you are not using it, so the altitude and azimuth angles of the Moon are not correct for where I live. The code has a fixed latitude and longitude:

let observer = new Astronomy.Observer(33, 33, 0);
faisalr commented 1 year ago

I fixed the demo.

Can you check the numbers are correct?

cosinekitty commented 1 year ago

Yes, I entered my geographic coordinates and all the numbers look correct. That is great! May I add a link to it from the browser demo page?

faisalr commented 1 year ago

Yes.