You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The aim of this project was to create a stand-alone demo program to visualize 2D arrangements embedded on the sphere using C++17, OpenGL, Qt6 and CGAL. The demo program should read the data from a JSON file, construct the corresponding arrangement on a sphere (AoS) using the CGAL arrangement package and then render it in a Qt6 OpenGL-Window. The user should be able to rotate the sphere, zoom in and out and also pick a certain face and highlight it with the right mouse button. The source of the data in the JSON file is chosen to be a GIS data-set containing all administrative boundaries of the countries in the world.
E. Deniz Diktas GSoC 2023 Submission
Overview
The aim of this project was to create a stand-alone demo program to visualize 2D arrangements embedded on the sphere using C++17, OpenGL, Qt6 and CGAL. The demo program should read the data from a JSON file, construct the corresponding arrangement on a sphere (AoS) using the CGAL arrangement package and then render it in a Qt6 OpenGL-Window. The user should be able to rotate the sphere, zoom in and out and also pick a certain face and highlight it with the right mouse button. The source of the data in the JSON file is chosen to be a GIS data-set containing all administrative boundaries of the countries in the world.
CGAL Wiki-page
Final report
Commit Log
CGAL/cgal-public-dev@e85b59374eb added: if the query point is on the vertex or on the edge, then one of the incident faces is chosen arbitrarily as the query result
CGAL/cgal-public-dev@96145bf82d2 refactor on Single_vertex: position is held inside this class now (no need for the application to keep track of it)
CGAL/cgal-public-dev@a3233527cfc minor refactor and clean-up on Main_widget
CGAL/cgal-public-dev@498778d6517 refactor: kept just the code related to the final application and moved all of the previous code to Main_winget_old.h/cpp
CGAL/cgal-public-dev@0a10e28440b the outlines of the faces are drawn from the arrangement data itself now (no KML needed)
CGAL/cgal-public-dev@cec57f2d5df minor refactor: Aos::get_approx_arcs & added rendering of country borders (but still need to load the KML file)
CGAL/cgal-public-dev@706e7ea81e7 refactor: moved country picking to a separate class
CGAL/cgal-public-dev@ddc8cdd0b1e refactor
CGAL/cgal-public-dev@f785ef7a029 refactor: added gui_event_handler base class & derived Camera_manip from this
CGAL/cgal-public-dev@f8d58defe18 minor refactor: moved country picking to separate member function to clean up mousePressEvent handler
CGAL/cgal-public-dev@ef68eb7483f Lighting corrected
CGAL/cgal-public-dev@bf4edb99f6a move verification code to a separate class (Verification)
CGAL/cgal-public-dev@1015f046798 minor refactor: redefined new_faces as member variable
CGAL/cgal-public-dev@544942e8ab6 refactor: moved triangulation code to a separate class
CGAL/cgal-public-dev@8d99ac39eeb refactor: moved Aos definitions to a separate file
CGAL/cgal-public-dev@c2173dd3768 get_handle is now templated & minor cleanup
CGAL/cgal-public-dev@db65cfa4de8 Fixed: memory leak with Country_aos arrangement (using std::shared_ptr with custom deleter)
CGAL/cgal-public-dev@60a9ce2e1b2 Added: country selection
CGAL/cgal-public-dev@88b2e91ac12 bug fixed: sphere ray intersection
CGAL/cgal-public-dev@b028dca7f84 started working on sphere-line intersection in GUI
CGAL/cgal-public-dev@3b8aa1d2fc1 reverted back to each country having a unique color (a little dimmed)
CGAL/cgal-public-dev@08a695bba86 reduced color-set (neighboring countries got different colors from a minimal set of colors
CGAL/cgal-public-dev@d97d364cfc1 can render each country in different color now
CGAL/cgal-public-dev@ee279d4302d grouped triangles by countries
CGAL/cgal-public-dev@9e2c80b0626 Added: json loading by country name
CGAL/cgal-public-dev@b40ea143189 Merge branch 'gsoc2023-aos_sphere_demo-denizdiktas' of github.com:CGAL/cgal-public-dev into gsoc2023-aos_sphere_demo-denizdiktas
CGAL/cgal-public-dev@1a6ed9ab34b Added face name
CGAL/cgal-public-dev@f1faa51541e added copyright notices
CGAL/cgal-public-dev@2493be17e3a added a single global static Geom_traits object in Aos.cpp for all operations
CGAL/cgal-public-dev@0c3ab6d10a3 code cleanup
CGAL/cgal-public-dev@66d0ef8c809 incorporated json reader from globe project
CGAL/cgal-public-dev@15a1b8fa390 fixed: curve source and target indices
CGAL/cgal-public-dev@a4c56c9f3d2 added: 2 flags when recording the faces and code to check the smallest country
CGAL/cgal-public-dev@93811dfe4a7 added: source and target attributes to each edge in json format
CGAL/cgal-public-dev@9c6c7ff150b Allowed missing outer or inner ccbs in case not present
CGAL/cgal-public-dev@de4bf46157d Updated
CGAL/cgal-public-dev@64bafda02f2 added anti z-fighting capability to smooth-shader
CGAL/cgal-public-dev@72547412dbb solved the triangulation error
CGAL/cgal-public-dev@dbd95118e31 initiali triangle visualization (triangles outside of the polygon are rendered as well)
CGAL/cgal-public-dev@f80b980242a added: initial triangulation code
CGAL/cgal-public-dev@249b41236dd modified file format
CGAL/cgal-public-dev@d374cff520e Fixed condition
CGAL/cgal-public-dev@cd26c232283 updated
CGAL/cgal-public-dev@944ebe0592c changed: saving edges instead of half-edges (code might need optimization)
CGAL/cgal-public-dev@7a8ed94d383 Merge branch 'gsoc2023-aos_sphere_demo-denizdiktas' of github.com:CGAL/cgal-public-dev into gsoc2023-aos_sphere_demo-denizdiktas
CGAL/cgal-public-dev@c71362a7da7 json parsing
CGAL/cgal-public-dev@1db9651e6f0 not skipping the spherical face
CGAL/cgal-public-dev@16863d71484 modified the arr-saving function
CGAL/cgal-public-dev@47df8a8206d Dropped the old database library; used json instead
CGAL/cgal-public-dev@454d2c31146 Merge branch 'gsoc2023-aos_sphere_demo-denizdiktas' of github.com:CGAL/cgal-public-dev into gsoc2023-aos_sphere_demo-denizdiktas
CGAL/cgal-public-dev@5ba18641471 working on JSON-loading
CGAL/cgal-public-dev@7e7ff1a415e Removed last trace of shp library
CGAL/cgal-public-dev@1995b8b61f4 corrections for saving the json file
CGAL/cgal-public-dev@ddaa2334439 minor refactor
CGAL/cgal-public-dev@5a08d9a9c0f added: writing of faces
CGAL/cgal-public-dev@a87fec062d8 Added: writing the halfedges
CGAL/cgal-public-dev@95eb1f59042 separating the geometry from topology: vertices -> points, edges -> curves
CGAL/cgal-public-dev@38376c3fbe2 Added: correct code to traverse the outer and inner ccbs of all faces
CGAL/cgal-public-dev@c2f323b55a5 saving the vertices and edges for now (intermediate commit)
CGAL/cgal-public-dev@39504e536cc Added: JSON parser (with example)
CGAL/cgal-public-dev@db132c30f88 commented out shapefile
CGAL/cgal-public-dev@3009fc47288 Fixed: Antarctica in no longer identified as one of the newly created faces.
CGAL/cgal-public-dev@f5f0995a629 Finished: code to identify the newly created faces: previous approach changed. Newly added faces are shown in red
CGAL/cgal-public-dev@302f36b9ef4 working on finding out the newly created faces in the arrangement
CGAL/cgal-public-dev@9014f8833eb Initial implementation of checking the newly created faces during the arrangement construction
CGAL/cgal-public-dev@a43389da337 bug fix: confirmed that the previous opengl error was due to the inactive OpenGL context. Fixed it by moving the update function into paintGL(). This causes a delay when updating the approximation, will probably need multithreaded solution (low-priority / future work)
CGAL/cgal-public-dev@13111f4b9ed Added: Message_manager to notify changes in zoom (trying to recompute the country boundaries results in strange OpenGL problems)
CGAL/cgal-public-dev@92c6c1794f6 Added: Timer class to time the computation of the approximation of country borders
CGAL/cgal-public-dev@f7b1d1675a5 Refactor: moved commonly calculated values in the manipulators up to the base class
CGAL/cgal-public-dev@70247a17ab1 clean-up
CGAL/cgal-public-dev@8bbb43c10e7 Refactor: camera manipulator for zoom moved to its own class
CGAL/cgal-public-dev@96c81a07940 Refactor: camera manipulator bpa moved to its own class by deriving from camera_manip
CGAL/cgal-public-dev@b800d9a7f5d Refactor: moved basic gui-handling in Camera_manip_rot into Camera_manip
CGAL/cgal-public-dev@e7db9ce1721 Refactor: moved camera rotation-manipulator to its own class
CGAL/cgal-public-dev@78cead66e26 minor refactor
CGAL/cgal-public-dev@19bb136f388 Refactor: moved shapefile reader to its own class
CGAL/cgal-public-dev@2d2174d2cc9 Added: code to check for problematic nodes in Africa region and verify the redundant node in Antarctica
CGAL/cgal-public-dev@824d9890c51 minor refactor
CGAL/cgal-public-dev@83d22ace809 node-collapsing (very basic)
CGAL/cgal-public-dev@258b40a7d7e Working on identifying the vertex problems
CGAL/cgal-public-dev@ea0604eddcd Implemented: defining polygons with node-ids
CGAL/cgal-public-dev@daf548c58cb refactor
CGAL/cgal-public-dev@7ba83df90a3 Added: identification curve in the scene
CGAL/cgal-public-dev@9f98df3d16c Refactor
CGAL/cgal-public-dev@d5c4d3fd640 Implemented: check for problematic arc in Antarctica (looks like it is repeating 2 points in the south pole so that they can be seen in the projected planar coordinates when the coordinates are wrapped along the x-axis (longitude)
CGAL/cgal-public-dev@32446d30c2f Refactor: moved common arc construction code in Aos to anonymous namespace functions (might still need to refactor common code further)
CGAL/cgal-public-dev@434c219b523 Moved arc construction into Aos as static (make it non-static member function?)
CGAL/cgal-public-dev@1c934d73029 Corrected the rendering and arrangement construction logic (TODO: we need to take outer and inner boundaries separately)
CGAL/cgal-public-dev@2b251e5052b Changed: KML data structure to reflect the geometry correctly
CGAL/cgal-public-dev@d97f1cfd2ba Organized files under different categories in CMakeLists.txt
CGAL/cgal-public-dev@7571f9a5d07 Implemented: rendering individual arcs to see the problem with the GIS data-set
CGAL/cgal-public-dev@e29175b81eb Rendering countries one by one
CGAL/cgal-public-dev@03e22344374 refactor
CGAL/cgal-public-dev@38c41461af1 Added: code to visualize the newly created vertices and to toggle the visualization of the countries
CGAL/cgal-public-dev@10e7154607a Added: check with extended DCEL
CGAL/cgal-public-dev@31cd58d8f9f Added: Arrangement check code
CGAL/cgal-public-dev@c5a77777087 Added: code to render the repeated vertices
CGAL/cgal-public-dev@b31d2d48eda Added: code to check for duplicates
CGAL/cgal-public-dev@4f616f46f7b Refactor: removed std::string dependencies, using QString in KML-parser
CGAL/cgal-public-dev@a7bbef7d87e World countries are rendered on the sphere
CGAL/cgal-public-dev@520083fd31f Kml reader can read country data (Note: this is not a general reader!)
CGAL/cgal-public-dev@ffca6656b4a added node conversion for kml-reader
CGAL/cgal-public-dev@76c9873076c Started reading KML GIS file (code is unstable, do not use it yet!)
CGAL/cgal-public-dev@e8157090680 Corrected behavior of the camera manipulator (backprojected diff-vector method)
CGAL/cgal-public-dev@a1af86fbc28 Bug fixed: camera now rotates from the last zoom position
CGAL/cgal-public-dev@1e760f4734f Added: computation of the world-space approximation error by back-projecting the screen-space error
CGAL/cgal-public-dev@531399fd42f refactor
CGAL/cgal-public-dev@f9c98feb530 Refactor: separated Geodesic arcs and their representation into different classes
CGAL/cgal-public-dev@d68e430042c refactor
CGAL/cgal-public-dev@e87f5a55300 Refactor: name changes and member variable fixes
CGAL/cgal-public-dev@782d7224fde Added an alternative camera rotation (look inside the mouseMoveEvent() function: ROTATION AROUND AN AXIS ORTHOGONAL TO THE BACKPROJECTED DIF-VECTOR)
CGAL/cgal-public-dev@493206ecb92 now z-axis looks upwards
CGAL/cgal-public-dev@b3d657d1dbb intermediate camera fix (initial axes are not correct, this needs to be fixed!)
CGAL/cgal-public-dev@eaece85eaae fixed shader loading program
CGAL/cgal-public-dev@ff0a29dfe44 warning messages fixed
CGAL/cgal-public-dev@2d7db030cde sytling and other corrections
CGAL/cgal-public-dev@96be82f0cc4 Added capability to render multiple arcs
CGAL/cgal-public-dev@f483d1b4552 bug fix: position attribute stride was left at 3, set back 0 because we have just the position data
CGAL/cgal-public-dev@f8ccbb1235b Bug fix: arc-shader initialization
CGAL/cgal-public-dev@d3dc5628579 added separate shader for drawing arcs
CGAL/cgal-public-dev@db222f07f40 z-fighting solved with silhouette plane
CGAL/cgal-public-dev@5808019e36f Added: test code for arc drawing (needs more work for generic version)
CGAL/cgal-public-dev@947d46c52d1 Added CGAL to CMakeLists.txt
CGAL/cgal-public-dev@84f614a27c7 Refactor: shader initialization
CGAL/cgal-public-dev@9a5bfa00bef Corrected initial camera position such that z-axis points to up, x-axis to right, y-axis into the screen
CGAL/cgal-public-dev@74b54a32982 Added: world coordinate axes
CGAL/cgal-public-dev@452cd888ff9 Added: color-only shader
CGAL/cgal-public-dev@fc3bcaf3269 Merge branch 'gsoc2023-aos_sphere_demo-denizdiktas' of github.com:CGAL/cgal-public-dev into gsoc2023-aos_sphere_demo-denizdiktas
CGAL/cgal-public-dev@42cc22701d7 Added sphere color
CGAL/cgal-public-dev@1c98dba72a4 small code refactor
CGAL/cgal-public-dev@21323d82231 Added merdians
CGAL/cgal-public-dev@e4840f589bf Merge branch 'gsoc2023-aos_sphere_demo-denizdiktas' of github.com:CGAL/cgal-public-dev into gsoc2023-aos_sphere_demo-denizdiktas
CGAL/cgal-public-dev@2ee383241c0 Added: camera-zoom
CGAL/cgal-public-dev@84aa35153f9 Refactor: shaders can be read from file
CGAL/cgal-public-dev@609a13e60a7 Refactor: Shader_program added as an abstraction
CGAL/cgal-public-dev@eb03e6bb7a1 Refactor: moved Sphere to a separate file
CGAL/cgal-public-dev@cbf97e9c1b4 Refactor: Camera class
CGAL/cgal-public-dev@9f404ab9bfe Added Camera class & code refactor
CGAL/cgal-public-dev@99fd1e31e51 Added camera controls (needs refactoring)
CGAL/cgal-public-dev@7ffda351d2a reverted back commented out statement
CGAL/cgal-public-dev@b0a2e09fb24 refactor: separated Sphere into its separate class
CGAL/cgal-public-dev@07124850f8d smooth sphere shading + minor style corrections
CGAL/cgal-public-dev@d4ee1bba11c Merge branch 'gsoc2023-aos_sphere_demo-denizdiktas' of github.com:CGAL/cgal-public-dev into gsoc2023-aos_sphere_demo-denizdiktas
CGAL/cgal-public-dev@ce02ab66322 Added support for drawing an arrangement on a sphere induced by geodesic arcs
CGAL/cgal-public-dev@6acd902d2f7 applied coding conventions
CGAL/cgal-public-dev@3737f3a66f9 fixed the sphere problem by generating the strided vertex-data separately (previous code logic regarding the opengl vertex attributes was correct though)
CGAL/cgal-public-dev@9369e1538c3 Sphere Drawing Skeleton: add vertex positions and normals to a single std::vector and defined two attribues, but this seems not to work properly (debug this)
CGAL/cgal-public-dev@52f4c7ed678 Rendering a sphere with flat shading: triangle normals are calculate inside the geometry shader for now
CGAL/cgal-public-dev@2f202dd5b00 demo-earth: added dynamic rotation and static camera location
CGAL/cgal-public-dev@cbafb4ee787 Switched from GGG to Qt6: current demo just draws a single triangle
CGAL/cgal-public-dev@2864d74b1d9 Merge branch 'gsoc2023-aos_sphere_demo-denizdiktas' of github.com:CGAL/cgal-public-dev into gsoc2023-aos_sphere_demo-denizdiktas
CGAL/cgal-public-dev@890395a8cb1 Demo app with just sphere drawn inside OpenGL with GGG (but cmake fails to produce project files)
CGAL/cgal-public-dev@3ade612d49e Merge branch 'gsoc2023-aos_sphere_demo-denizdiktas' of github.com:CGAL/cgal-public-dev into gsoc2023-aos_sphere_demo-denizdiktas
CGAL/cgal-public-dev@81d4592766d style corrections
CGAL/cgal-public-dev@0477dfe2f3f Removed unnecessary (actually erroneous) member function definitions
CGAL/cgal-public-dev@da710d604e7 Fixed test expected result
CGAL/cgal-public-dev@ab6b892b4b2 Added tests for the Approximate_2 functor
CGAL/cgal-public-dev@d565320573a Merge branch 'gsoc2023-aos_sphere_demo-denizdiktas' of github.com:CGAL/cgal-public-dev into gsoc2023-aos_sphere_demo-denizdiktas
CGAL/cgal-public-dev@e55287a9624 Started to add tests for the Approximate_2 traits functor
CGAL/cgal-public-dev@34b9a7d3560 Removed std::vector from the algorithm, now outputting the approximation points directly to the output iterator.
CGAL/cgal-public-dev@fc9c993a23f Added std:: in front of math functions
CGAL/cgal-public-dev@7a447d661af Code clean-up and style corrections
CGAL/cgal-public-dev@01e60570177 Fixed approximation of arcs with
theta>PI
:atan2
was returning negative value, so I added2*PI
to make it in the range[0,2*PI)
CGAL/cgal-public-dev@910e0437a06 changed the error type in the approximation function from double to Approximate_number_type
CGAL/cgal-public-dev@a079b5d572c Initial implementation of the approximation-function inside Approximate_2
CGAL/cgal-public-dev@f08da8489fc 1st revision
CGAL/cgal-public-dev@2159476dc4f Fixed Approxinate_2::operator()(const Point_2&)
CGAL/cgal-public-dev@facc5926e6c Fixed dependencies. (Moved Arr_extended_direction_3 definition to the front.)
CGAL/cgal-public-dev@97209117272 Ops (Approximate_point_2)
CGAL/cgal-public-dev@f9b9591f040 Fixed some approximate operators
CGAL/cgal-public-dev@c74d7a31b6f Merge branch 'master' into gsoc2023-aos_sphere_demo-denizdiktas
CGAL/cgal-public-dev@c1c1a51b6a3 Merge branch 'Aos_2-conics-efif' into gsoc2023-aos_sphere_demo-denizdiktas
The text was updated successfully, but these errors were encountered: