GithubHelp home page GithubHelp logo

stepulak / interpolation_clipping_rasterization Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 0.0 463 KB

Interpolation, clipping and rasterization algorithms in C++

License: BSD 2-Clause "Simplified" License

C++ 98.87% Shell 1.13%
graphics-primitives sdl2 graphics2d cpp17 interpolation clipping rasterization algorithms cpp

interpolation_clipping_rasterization's Introduction

Interpolation, clipping and rasterization

Interpolation, clipping and rasterization algorithms in C++.

Algorithms which can be found in this application:

  • DDA, Bresenham line interpolation
  • Bresenham circle/ellipse interpolation
  • Cohen-Sutherland line clipping (interval bisection) in rectangular window
  • Cyrus-Beck line clipping in convex polygon (which is randomly generated)
  • Sutherland-Hodgman polygon clipping (xmax part)
  • Line seed fill of generic polygons
  • Pineda's algorithm for triangle rasterization (min-max mechanism)

After you start the application, read the information and pick one algorithm using keyboard key.

Algorithms are based on user interaction (mouse), they are animated and can be stepped (E, S keys).

Using the application should be at least a little bit intuitive, if you follow the text in the top-left corner of your application.

Exit application using escape key.

Build

To build this application you need to have g++ (or similar compiler) installed with C++17 support. Furthermore you ought to have SDL2 and SDL2_image libraries in your computer.

In Ubuntu, install g++, libsdl2-dev and libsdl2-image-dev packages.

Then run ./build.sh script. If compilation ends with success, run the ./icr-algo application.

interpolation_clipping_rasterization's People

Contributors

stepulak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.