Skip to content

An iterative process which turns any polygon into an ellipse

Notifications You must be signed in to change notification settings

dan-robertson/Midpoint-Flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Midpoint flow

Consider a polygon and replace each line segment by its midpoint to make a new polygon. The new polygon will be slightly smaller so normalise it to fit inside a fixed size rectangle. It turns out that when iterating this process the polygon will approach an ellipse in shape. This program exhibits this.

Curvature flow

There is also some code to attempt some kind of curvature flow, that is estimate the curvature at each point and try to move each point towards the centre of its circle of curvature. This does not seem so effective.

Instructions

To build:

$ make

To run:

$ ./pe

This depends on SDL2.

About

An iterative process which turns any polygon into an ellipse

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published