CodingTrain / CodingTrain/Suggestion-Box

regular 2D hyperbolic polygons using the poincaré disk model

Open
#1,814 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
570
Forks
85
PR merge metrics
No merged PRs in 30d

Description

Hyperbolic geometry is an type of non-Euclidian geometry which I would love to see an coding train video on. Hyperbolic geometry is defined as this on the Wikipedia page:
>hyperbolic geometry (also called Lobachevskian geometry or Bolyai–Lobachevskian geometry) is a non-Euclidean geometry. The parallel postulate of Euclidean geometry is replaced with:
>>For any given line R and point P not on R, in the plane containing both line R and point P there are at least two distinct lines through P that do not intersect R.

Basically, for any line there can be a lot of different parallels to one line, like this (note that this are all straight lines) ![hyperbolic parallel lines](https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Poincare_disc_hyperbolic_parallel_lines.svg/1024px-Poincare_disc_hyperbolic_parallel_lines.svg.png)

---

The most common way of projecting hyperbolic space is using the poincaré disk model. All images I shown here uses this model. It projects the entire hyperbolic space on to an disk and it's most notable popertys are:
> The distance from the center of the disk to the edge is infinite

>straight lines consist of arcs of Euclidean circles contained within the disk that are orthogonal to the boundary of the disk, plus all diameters of the disk.

Challenge
---
Given any *p* and *q* were *(p - 2) • (q - 2) > 4* render regular hyperbolic polygons with *p* vertices and *q* polygons adjacent to each vertex using the poincaré disk model.

---
![regular hyperbolic polygons for *p=3 q=12*](https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Hyperbolic_domains_642.png/1024px-Hyperbolic_domains_642.png)
The above image is an solution for *p=3 q=12*
For an complete solution, check out [this page](http://www.malinc.se/noneuclidean/en/poincaretiling.php)

Resources
---
- [Verasrium (yt): parallel lines and hyperbolic/spherical geometry](https://youtu.be/lFlu60qs7_4?feature=shared)
- [CodeParade (yt): explanation of hyperbolic geometry](https://youtu.be/zQo_S3yNa2w?feature=shared)
- [Malin Christersson: non Euclidian geometry and the Poincaré disk model (with interactive example)](http://www.malinc.se/noneuclidean/en/index.php)
- [numberphile (yt): sports in hyperbolic geometry](https://youtu.be/u6Got0X41pY?feature=shared) and [part two](https://youtu.be/zDJKFcZ0Kkg?feature=shared)
- ["Rendering Non-Euclidean Geometry in Real-Time Using Spherical and Hyperbolic Trigonometry" by Prof Yang-Hui He, Dr Chris Child and Daniil Osudin](https://arxiv.org/pdf/1908.01742v1.pdf)
- [Poincaré disk model Wikipedia page](https://en.m.wikipedia.org/wiki/Poincar%C3%A9_disk_model)
- [hyperbolic geometry Wikipedia page](https://en.m.wikipedia.org/wiki/Hyperbolic_geometry)

---

![art](http://www.gogeometry.com/school-college/2/p1147-kaleidoscope-poincare-disk-model-triangle-center-ipad-7.jpg)
![less arty art](http://static1.squarespace.com/static/5005bb9de4b0d377efbfbb3c/t/50ee2224e4b029acc68b9693/1357783591817/poincare-disc-model.jpg?format=1000w)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.