illuminate algebra and geometry of the extended complex numbers and mobius transformations
geometric data structures consisting of sequences of points lines circles triangles, styled and their images under application of linear fractional transformations
transformed from user space into screen space
pencils of circles in pre-image canvas mapped to image canvas by mobius transformation
lein figwheel
for devcards: http://localhost:3449/cards.html
use translation rotation and scaling to create parabolic, hyperbolic and elliptic pencils see their images, under mobius transformation replay, save and edit
classify all mobius transformations using fixed points and pencils of circles
mouse-move, mouase-click events move axis and key-press events generate pencils via translation, ratation of the x-axis and scaling of a unit circle
mouse-move moves center of axis mouse-click sets position of axis
creates a pencil of circles from axis, by transforming either the x-axis or y-axis by translation x-axis unit-circle by rotation and scaling
x-axis or y-axis
- u up
- d down
- l left
- r right
unit circle
- i in
- o out
x-axis
- a around -> counter clockwise
- b back -> clockwise
render/canvas.cljs render basic geometric primitives of point line triangle circle rect and style to an html canvas by sending data to a care.async channel
a drawing-loop channel that renders recieved messages to a graphics canvas context processing mouse and key events received from an events channel
mouse click and move events put on events channel handled by an event handler
with a control channel to start and stop listeners
om, react core.match core.async channels transducers data representing geometric entities html, canvas, css svg (not yet implemented) clojurescript, cljsbuild, figwheel, brepl
complex library
modes for creating objects or for viewing properties
make lines circles, triangles, quadrangles using mouse
view properties such as orthogonal circles with two given centers where the third point varies along the circle with diameter equal to line between the two centers
perpendicular bisectors of a line or of three lines of a triangle
circumcircle through three points where two points are fixed and the third varies
guides exist to make special objects like isosceles triangles equilateral triangles right triangles circumcircle of a triangle families of orthogonal circles (generalized) radial lines, paralell lines, concentric circles circles tangent to a point circles through two points
the way it workd os like this: local state contains current mouse-mode state events update the state in mouse-mode, render draws the background from the app-state and then the current mouse state on top
each mouse event triggers such a redraw
events include :move :click :click could be a :mouse-down followed by a :mouse-up but for now, it is just a :mosue-down
now, while animating, we want to disable mouse mode, this is because we are really focused on the animation and the drawing mode is just one on top of the previous, in sequence, with out redrawing - this could change, but for now it is the way it is
add more linear fractional transformations, as found in Grandma’s recipies
those that
- preserve the real line
- preserve the unit circle, disk
- preserve the upper half plane
- pair circles
- are loxodromic
- are elliptic
- are hyperbolic
- are parabolic
and switching between a list of transforms, and adding new ones to the list
allow for input of arbitrary complex number in polar and rectangular form
- as [x y] -> x + iy
- as [r a] -> r*exp(i*a)
- as named complex numbers: zero one i infity w1
- as operations on existing complex number minus recip conjugate and compositions thereof
allow for input of linear fractional transformations by selection from a list or by entering 4 complex numbers