filletofish / line-clipping-pyopengl

Example of clipping line segment with a polygon in OpenGL.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

line-clipping-pyopengl

This script is a simple example of clipping line segment with a polygon.

Requirements:

  • PyOpenGL
  • GLFW

Getting started:

python3 main.py
  • Use mouse to build clipper (polygon)
  • Press L to start building line segment. Same, use mouse to build it
  • Press S button to turn on / off slicing the line segment

About

Example of clipping line segment with a polygon in OpenGL.


Languages

Language:Python 100.0%