+ 8
[Python] 3D vertices to faces - howto?
Ok, so I have finished part of my GeoProject PL task and built a dictionary of Polish cities, their population and geolocation (longitude and latitude). I am about to run it yet to find the average elevation of each of the cities and add it to the dictionary. So let's say I have a set of 3D coordinates for each city point and I want to produce faces out of them to pass the whole surface to OpenGL. The problem is - with such a big network, how to link them, which with which? Is there an algorithm for that?
3 odpowiedzi
+ 8
that's exactly what OpenGL is designed for. It takes in lists of 3D points and renders polygons (usually triangles) in the OpenGL environment.
Instead of trying to figure out how to connect the vertices, why don't you try generating a large plane, a terrain of sorts. the position of of any point on the terrain is determined by the 'city point'
+ 4
The problem is I want to generate a plane based on exactly those coordinates. I am just looking for a way to tell OpenGL how to connect those points into triangles. I hope to get their elevation, too, so the terrain will already be quasi-realistic.
When I get a decent list of villages and rural locations, I'll get an even more perfect image :)
+ 4
I finished the 3D labyrinth mini-project, so now when I understand how to play it, I'm off to GeoProject now :)
https://www.instagram.com/p/BQszVwBhoYT/