mmcloughlin / globe

Globe wireframe visualizations in Golang
https://pkg.go.dev/github.com/mmcloughlin/globe
ISC License
1.59k stars 51 forks source link

culling the "wires" in the background #2

Open fils opened 7 years ago

fils commented 7 years ago

First.. this is cool and amazingly easy. I could really see me using this in some of the visualizations I do for scientific drilling data from NSF.

Second.. I am not a graphics person.. so forgive the poorly worded question..

The visuals are ncie, but might get a bit confusing given the wireframe aspect of these where one can see through to the continent coastlines on the other side of the globe.

Is there there any chance in the code base to enable a situation where the globe surface is opaque?

regardless.. thanks.. would love to see more of these types of packages in Go for geospatial data

mmcloughlin commented 7 years ago

Thanks for your interest in the project!

I agree this would be a great feature. It's definitely possible but it may be a non-trivial change, I'd have to do some more research to pin this down. A related change that might help the confusion you mention is to more aggressively fade into the background.

At the moment this package simply performs the translation from geographical to cartesian coordinates and delegates to the pinhole library for rendering. So I think it would require a change to the underlying pinhole library.

I think the pinhole lineWidthAtZ function will be a good place to experiment.

https://github.com/tidwall/pinhole/blob/86ba04e3523bd03ebff51eac8dd0865c9dc9305e/pinhole.go#L607

joeblew99 commented 7 years ago

That's a great idea !

In the art world it's called the recession if I remember. All architects are trained to use different pen thickness depending how close to the camera you are. It really adds a sense of depth and makes it's more intuitive to use stupid humans :)