Code Monkey home page Code Monkey logo

thealdrin / bounday_fill_using_python Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 109 KB

This is an implementation of boundary fill algorithm using Python. It can generate any polygon or circle of custom user given specifications and will colour the figure starting from a user provided point with a user defined colour.

Python 100.00%
matplotlib plot spyder-python-ide boundary-fil bresenham-line-drawing-algorithm midpoint-circle-algorithm numpy python

bounday_fill_using_python's Introduction

Bounday_Fill_using_Python

This is an implementation of boundary fill algorithm using Python. It can generate any polygon or circle of custom user given specifications and will colour the figure starting from a user provided point with a user defined colour.

It uses Bresenham's line drawing algorithm to draw the polygon sides.Each point plotted has a 8 unit size.For drawwing a polygon of 4 vertex input vertex as 5 and give the last vertex the same as the first one.

It uses Midpoint circle algorithm, to generate the circle.Each point plotted has a 8 unit size.

The colour is filled using r,g,b values from 0-255.

I used a 100*100 sized plot as i wanted the boundary fill to be over fastly. You can change this in the code to build figures with more definition but the boundary fill will take good time as the plot is shown after each unit is filled with colour.

I used Spyder IDE for building and running this code.The images generated are shown in the plot screen.

bounday_fill_using_python's People

Contributors

thealdrin avatar

Watchers

 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.