as there are things called polygons i expted to be able to use
Code:
glBegin(GL_POLYGON);
glVertex3f(x,y,z);
.....
glEnd;
but that did not give the correct result. (bug i could just have misplaced the camera)
but looking at the coords i cannot detect a pentagon like shape inside it, unles is deeply hidden in the numbers behind the .
any ideas are welkom. it sure would be nice to be able to use google sketchup http://sketchup.google.com to design 3d models for use in your delphi opengl applications.
Registriert: Mi Jul 17, 2002 12:07 Beiträge: 976 Wohnort: Tübingen
Hmm it seems that the coordinates in the keyhole-tutorial differ from the second position after the dot. The values given in the tutorial seem like they are "earth coordinates". Have you already tried to delete the numbers before and scaled it to "bigger" ones? For example:
Code:
-77.05788457660967 -> -7.88457660967
_________________ "Du musst ein Schwein sein in dieser Welt, sangen die Prinzen, das ist so 1.0. Du musst auf YouTube zeigen, dass dir dein Schweinsein gefällt, das ist leuchtendes, echtes Web 2.0." - Hal Faber Meine Homepage: http://laboda.delphigl.com
xz_dist = sqrt( x*x + z*z ) latitude = atan2( xz_dist, y ) * RADIANS longitude = atan2( x, z ) * RADIANS -----------------------------------------
Q18. How do I convert Polar to Euclidean coordinates? -----------------------------------------------------
With a Polar coordinate (latitude, longitude, distance), the goal is to convert it into a Euclidean coordinate (x y z).
The conversion is as follows:
----------------------------------------- x = cos( latitude ) . sin( longitude ) y = sin( latitude ) z = cos( latitude ) . cos( longitude ) -----------------------------------------
Sorry to dissapoint you but the earth is no Sphere . It's an ellipsoid and I think google earth uses WGS84 for it's coordinate projections. Which use an ellipsoid as it's base and not a sphere. A poolar to euclidean conversion may still be good enough but as bigger the models as less aquarate it will become.
Zitat:
Q18 should be the way to go, but this puzles me a bit as where te leave the third number from the kml file. Or should that be left as is? As i already guesed the 3rd number is latitude. So i gues i can leave it unchanged (not sure though).
The third component is the altitude, you just build an altitude vector and add it to the x,y,z you get from the comversion.
Registriert: Do Sep 25, 2003 15:56 Beiträge: 7804 Wohnort: Sachsen - ERZ / C
Programmiersprache: Java (, Pascal)
kml ist ein ziemlich cooles, weil einfach zu verstehendes Format.
Genial ist, dass man in Google-Maps eine URL zu einem KML File angeben kann, und dies dann in Google-Maps angezeigt wird. So kann man ziemlich nett Infos visualisieren.
_________________ Blog: kevin-fleischer.de und fbaingermany.com
Registriert: Di Jul 01, 2003 18:59 Beiträge: 887 Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
The problem with kml is not the format but how coords are represented. Sure they are great for Google Earth. But they are not for when you want to use it with opengl in your own application.
Mitglieder in diesem Forum: 0 Mitglieder und 11 Gäste
Du darfst keine neuen Themen in diesem Forum erstellen. Du darfst keine Antworten zu Themen in diesem Forum erstellen. Du darfst deine Beiträge in diesem Forum nicht ändern. Du darfst deine Beiträge in diesem Forum nicht löschen. Du darfst keine Dateianhänge in diesem Forum erstellen.