Skip to content

Vildana99/skyline-visualization-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Skyline Visualization – C++ Builder

C++ C++ Builder Algorithm Geometry


About the Project

This project implements and visualizes the Skyline Problem using C++ and C++ Builder.
The algorithm calculates the city skyline silhouette formed by the union of rectangular buildings, based on their (left x, height, right x) coordinates.


Key Features

  • Sweep line algorithm with O(n log n) time complexity
  • Graphical visualization of buildings and skyline
  • Dynamic input of buildings via mouse interaction
  • Highlighted skyline points for better visual understanding

Algorithm Overview

The project uses a sweep line approach:

  1. Each building generates two events — start and end.
  2. Events are sorted by x-coordinate.
  3. A multiset keeps track of active building heights.
  4. When the maximum height changes, a new skyline point is added.

Complexity:

  • Time: O(n log n)
  • Space: O(n)

About

Implementation and visualization of the Skyline Problem using C++ and C++ Builder. The project computes the city skyline silhouette using a sweep line algorithm with O(n log n) time complexity and visualizes the result graphically.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors