OpenGL 4.1 Core 및 ImGui를 사용한 볼록 껍질(Convex Hull) 알고리즘 시각화 도구입니다. A visualization tool for the Convex Hull algorithm using OpenGL 4.1 Core and ImGui.
프로그램을 실행한 후, 우측의 **통합 컨트롤 패널(Control Panel)**을 통해 알고리즘을 테스트할 수 있습니다.
- 마우스 클릭: 화면의 빈 공간을 클릭하여 점을 추가합니다. (상/하단 바 영역 제외)
- 랜덤 생성:
Seed와Count를 설정한 후Make it!을 클릭합니다. - 좌표 직접 입력: 하단의
Add Point By Pixel Range섹션에서 원하는 픽셀 좌표(X, Y)를 입력하여 정교하게 점을 추가할 수 있습니다. (범위 초과 시 경고 팝업 노출) - 전체 삭제:
Erase All버튼으로 모든 데이터를 초기화합니다.
- Visual Styles: 점의 크기와 색상, 볼록 껍질 선의 굵기와 색상, 배경색을 실시간으로 조절할 수 있습니다.
- 계산: 하단 바의
Get Convex Hull버튼을 클릭하면 Graham Scan 알고리즘이 작동합니다. - 데이터 관리: 상단 바의
Import/Export버튼을 통해 점 데이터를points.csv파일로 저장하거나 불러올 수 있습니다.
- 셰이더 경로: 실행 파일(
.exe)과 같은 위치에shaders폴더가 있어야 합니다. - 입력 범위: 직접 입력 시 상단 바(40px) 및 하단 바(70px) 영역을 제외한 가시 영역 내의 좌표만 유효합니다.
Use the Unified Control Panel on the right to interact with the algorithm.
- Mouse Click: Left-click on empty space to add points (excluding UI bar areas).
- Random Generation: Set
SeedandCount, then clickMake it!. - Manual Input: Use the
Add Point By Pixel Rangesection to add points at specific pixel coordinates. A warning popup will appear if the input is out of bounds. - Clear All: Reset everything using the
Erase Allbutton.
- Visual Styles: Real-time adjustment of point size/color, hull line width/color, and background color.
- Calculate: Click
Get Convex Hullon the bottom bar to run the Graham Scan algorithm. - Data I/O: Use
Import/Exportbuttons on the top bar to manage point data viapoints.csv.
- Shader Path: Ensure the
shadersfolder is in the same directory as the executable (.exe). - Input Clamping: Manual coordinates must be within the visible canvas (excluding 40px TopBar and 70px BottomBar).
- Graham Scan Algorithm: Efficient calculation of the smallest convex polygon.
- Unified UI: Grouped settings for point management, styles, and manual input.
- Real-time Feedback: Instant rendering of color, size, and coordinate changes.
- Validation System: Modal popups for out-of-range coordinate inputs.
- Language: C++ / OpenGL 4.1 Core
- Libraries: GLEW, GLFW, ImGui
- Dependency Manager: vcpkg (Manifest Mode)