Moving the camera to see the sky in CesiumJS maps has always been a little bit difficult for me. So,m when CesiumJS announced their baseline MCP for controlling the camera on CesiumJS maps, I leaped at the chance to try out an MCP and to grab hold of better control of my map camera.
This week, the sujbect of eclipses came up in my Gladych Files research. (Ferry Barrows Colton, famed National Geographic Science writer of the 1940s was part of the 1947 Brazil eclipse expedtiion, and was also on board the Normandie with Tom Slick in 1937.) That reminded me of the following picture I took of the 2017 eclipse from Wyoming.
I've wanted to identify the stars on that picture for years, so I was curious if CesiumJS had accurate constellation maps for a given date and time. Turns out, they do.
But, how to look at the stars? I revived my MCP camera control server for CesiumJS in a few minutes by starting Codex in the repo directory on my local machine, and asking it to start everything back up. I asked ChatGPT to create a czml for me that contained the viewing sites and dates of both the 1947 eclipse, (Brazil), and the 2017 eclipse, (my viewing spot north of Jefffrey City, WY.) A while later, I was reliably viewing both eclipses using Cesium JS.
I haven't verified the star maps yet, but I don know that the sky view from Brazil, 1947 is different from Wyoming, 2017. Here's 2017
As an interesting aside, there are more stars on the Cesium sky map than those that jump out. Turning up the brightness on a screen capture of the sky image gives something more like this.
OK, so, finally, here's the new and intersting part. Once you have an MCP camera control server running for CesiumJS, if there's an app on a website that's not yours, and if you can find a handle in JavaScript to the apps CesiumJS viewer, you can control the camera there too.
I know this because I found a demo site built for siggraph 2017 that included a trace of the moons shadow on the Earth at the time of the eclipse. I asked Codex if this would work and it helpfully offered to create the code for me. We had to run through a few iterations, but finally worked it all out.
And so, you can see that I can look right at the eclipse using MCP
and then, turn around and look at the Earth.
Notice that in each image, the sky map changes, as it should.
The server is still running a little slow, mostly because of the LLM, for my taste, but it's incredibly handy to have around as a tool.
Comments
Post a Comment
Please leave your comments on this topic: