Debian Codegraph @

texmf-dist/doc/lualatex/luahyperbolic/README.md

raw
1 # Lua Hyperbolic Geometry
2
3 Version : 2026/03/16
4
5 **luahyperbolic** is a LaTeX package and a Lua library for performing operations and drawing pictures in hyperbolic geometry, intended for use with LuaLaTeX. The package provides complex number manipulation and hyperbolic geometric functions.
6
7 ![triangle_tiling_5_4](triangle-tiling-2-4-5.png)
8
9 ## Installation
10
11 ### Manual Installation (for now)
12
13 If you wish to install the package manually, follow these steps:
14
15 - Put the file `luahyperbolic.sty` in your working directory
16 - Include the package in your document by adding:
17
18 ```latex
19 \usepackage{luahyperbolic}
20 ```
21
22 ### Example Usage
23
24 A minimal working example is (see `minimal_example.tex`in `examples/`) :
25
26 ```latex
27 \documentclass[margin=.2cm,multi,tikz]{standalone}
28 \usepackage{luahyperbolic} %loads luacode package
29 \begin{document}
30 \begin{luacode*}
31 hyper.tikzBegin("scale=2.5")
32 local P = complex(0.5,-0.2)
33 local A = complex.exp_i(math.pi/10)
34 for k=1,5 do hyper.drawLine(P, A^k, "teal") end
35 hyper.labelPoint(P, "$P$", "left=.2cm")
36 hyper.drawLine(complex.J,-complex.I,"very thick, dashed, red")
37 hyper.tikzEnd("myfile.tikz")
38 \end{luacode*}
39 \end{document}
40 ```
41
42 Compiling that file with `lualatex` produces the following output:
43
44 ![minimal example](minimal-example.png)
45
46 It also saves the TikZ picture to `myfile.tikz`, for later use. (Optional)
47
48 See the [package documentation (pdf)](documentation-luahyperbolic.pdf) for numerous examples.
49
50 More examples in [examples/](examples/)
51
52 ## License
53
54 This package is released under the **Public Domain (CC0 1.0 Universal License)**. You may use, modify, and distribute it freely, without restriction.
55
56 For more information on the license, see the `LICENSE` file or visit [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/).
57
58 ## Todo
59
60 ### In `luahyperbolic-core` :
61
62 - function distance_between_geodesics(z1, z2, w1, w2)
63 - function closest_points_between_geodesics(z1, z2, w1, w2)
64 - triangle intouch points, extouchpoints, excenters
65 - hide functions metric_factor, circle_to_euclidean
66 - get rif of cosh, sinh, tanh
67 - IMPORTANT write function that computes triangle with given angles. Necessary for (p,q,r) tilings.
68 - change name fundamentalIdealTriangle if only one angle is zero
69 - power of a point, radical axis
70 - hyper.getType(phi) for automorphism
71 - hyper.getFixedPoints(phi) for automorphism
72 - symmetrySending (A to B)
73 - reflectionSending (A to B)
74 - expMap : transforme into function of type point -> (vector -> point) instead of (point, vector) -> point
75
76 ### In `luahyperbolic-tikz` :
77
78 - more constants : distances for angle drawing/labelling etc,
79 - function `drawExcircle` and variants
80 - more triangle geometry ? Gergonne, Nagel etc ?
81 - function `markAngle(A, O, B, options)`
82 - function `labelSegment(A, B, label)`
83 - function `labelAngle(A, O, B, label)`
84 - more tikz shapes if necessary
85 - draw external angle bisector ?
86 - replace old `complex.isClose(z,w)` etc with `z:isNear(w)` etc.
87 - fillTriangle, fillPolygon etc ?
88 - drawExcircle
89
90 ### In `luahyperbolic-tilings`
91
92 - faster tiling generation
93 - draw tiling step by step, triangle by triangle
94
95 ### In documentation
96
97 links to math articles on wikipedia for definitions ?
98
99 ### More examples
100
101 - ex circles
102
103 ## Contact
104
105 Do you really need to contact me ? Please don't contact me.