GenericMappingTools / GenericMappingTools/gmt
Improve -p option to support true perspective projections
- Dominant language
- C
- Stars
- 979
- Forks
- 414
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 54
Description
The `-p` option currently produces what seems to be an orthographic projection, where all objects appear with the same size regardless of their distance from the viewer. This projection maintains parallel lines and provides no sense of depth.
A true perspective projection would make distant objects appear smaller, with lines converging toward vanishing points — similar to how real cameras or rendering engines represent 3D scenes. You can see this [link](https://learnwebgl.brown37.net/08_projections/projections_introduction.html) for some interactive examples.
**Implementation**:
I would be interested in working on this improvement myself. However, I have not been able to find where in the GMT source the code handling the -p option (projection and 3D transformations) is implemented. Could you please indicate which source file(s) contain this logic?
I believe some of the required functionality might already exist in GMT through the General Perspective projection, so this could potentially be adapted or reused for implementing a true perspective view.
Contributor guide
Assessment
This issue has not been assessed yet.