https://github.com/tanerius/quadtree_lod
Implementation of a Quadtree LOD in terrain rendering (such as planets)
https://github.com/tanerius/quadtree_lod
Last synced: 9 months ago
JSON representation
Implementation of a Quadtree LOD in terrain rendering (such as planets)
- Host: GitHub
- URL: https://github.com/tanerius/quadtree_lod
- Owner: tanerius
- License: gpl-3.0
- Created: 2016-09-10T21:04:51.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-12T07:45:53.000Z (almost 9 years ago)
- Last Synced: 2025-04-04T16:41:44.259Z (9 months ago)
- Language: C
- Size: 1.69 MB
- Stars: 21
- Watchers: 5
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Quadtree LOD - Rendering planets and surfaces
**Summary**
Implementation of a Quadtree LOD in terrain rendering (such as planets). The representation of the planet is with an ellipsoid. Im hoping this will result in either a complete planet rendering engine or something that will help me in my upcoming project with the Unreal Engine 4.
**Coordinate Systems**
The coordinate systems used are :
* Geographic coordinates - Tuple(lng, lat, height)
* Cartesian coordinate system - for addressing the viewports and screen stuff
**Spheres and allipses**
These are some stuff that are important to point out.
A point anywhere on a sphere:
x^2 + y^2 + z^2 = r^2
A point on a spheres surface:
xs^2 + ys^2 + zs^2 = r^2
A point on an ellipse surface:
(xs^2)/(a^2) + (ys^2)/(b^2) + (zs^2)/(c^2) = 1
(where a,b and c are radii on the x, y and z axis)
Ellipses have two types of surface normals:
* Geocentric - a normalized vector from the center point
* Geodetic - a vector normal to a tangent of a point on the actual surface of the ellipse
For Earth:
a == b == 6,378,137m (semimajor axis)
c == 6,356,752.3142m (semiminor axis)