Skip to content

prannerta100/circle-play

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

circle-play

Fun Python widget to digitize circles on a grid

Hello friends,

This widget is a good introduction to making tcl/tk type widgets in Python.

The widget initializes with a grid of points, allowing you to draw a circle/ellipse as you wish on the screen. As soon as you finish drawing your circle/ellipse, it highlights the points on the grid closest to the boundary of the circle/ellipse you just drew.

There are 3 functionalities overall:

  1. highlight points in a grid that lie close to a circle
  2. select a bunch of points, create a best fit circle through them
  3. select a bunch of points, create a best fit ellipse through them (an extension of 2)

Dependencies:

  1. tkinter

Installation:

None, you only need the Python notebook file

Warning: "Double click" is used for clearing your selection. Running the cells will open a new tcl/tk widget window, so look out for that.

Thanks to http://www.java2s.com/Code/Python/GUI-Tk/Usemousetodrawashapeoncanvas.htm for the basic template and Jim Tieman for suggesting this exercise!

Enjoy!

About

Fun Python widget to digitize circles on a grid

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published