ens-lg4 / multifocus_ellipse

Extending the classical rope-and-pencil ellipse drawing technique to more than 2 foci.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multifocus_ellipse

Build Status

Extending the classical pins-string-and-pencil ellipse drawing technique to more than 2 foci. The generic problem is, given a set of 2D points, make a string loop around them and the tip of a pencil and trace a convex smooth curve around the points with this pencil while keeping the loop taught.

For 3 non-collinear foci the resulting curve looks like this: Three-foci ellipse example

It is in fact a smooth combination of 6 elliptical fragments, each built on just two foci out of three: Three-foci ellipse with leftovers

Animation of a running pencil in a string loop: Three-foci pencil animation

For 4 non-collinear foci the resulting curve looks like this: Four-foci ellipse example

It is a smooth combination of 8 elliptical fragments, each built on two foci out of four: Four-foci ellipse with leftovers

The following drawing shows the effect of different amount of slack in the loop, ranging from "almost a polygon" to "almost a circle": Multi-focus ellipses with different slacks

About

Extending the classical rope-and-pencil ellipse drawing technique to more than 2 foci.

License:Apache License 2.0


Languages

Language:Python 100.0%