mathigon / textbooks

Source code of Mathigon's interactive textbooks
https://mathigon.org
357 stars 154 forks source link

Interactive: Ellipse drawing #82

Open plegner opened 4 years ago

plegner commented 4 years ago

An interactive component for the Conic Sections course, that allows students to draw an ellipse using a virtual pencil and a rope that is connected to two pegs (the foci of the ellipse):

LqKvB2

Students should be able to move the pencil as well as the position of the two foci, by clicking and dragging with finger or mouse.

The rope needs some basic physics simulation (rope/chain) to model behaviour when it is slack. The pencil should be movable to anywhere within the ellipse, not just the positions along the edge, and leave a faint trail of where it has been.

plegner commented 4 years ago

Here is a simple draft that connects the three points in a triangle: https://github.com/mathigon/textbooks/blob/ellipse/content/circles/components/ellipse.ts

Screenshot 2020-03-06 at 20 43 32

But we want a more realistic "physics" version like this:

custom – 1 custom – 2 custom – 3