Geometric drawings, especially those made using only basic tools such as rulers and compasses, are not only powerful as a means of proof or explanation, but also have a unique charm for just watching and admiring.


The First Six Books of the Elements of Euclid - Oliver Byrne

The First Six Books of the Elements of Euclid - Oliver Byrne


It is easy to draw line segments, circles, etc. in various environments including HTML canvas. However, it is not so easy to draw figures like those in geometry textbooks. Even a simple operation such as drawing a circle around the intersection of two straight lines requires a bit of calculation. The ability to draw a picture and the ability to handle geometry mathematically are two different things. Of course, there are many well-designed libraries out there, but it is also a good learning experience to implement basic functions by yourself. Well it was at least for myself.

HTML Canvasを始めとする様々な環境では簡単に線分や円を描くことができます。ところが幾何学の教科書に出てくるような図形を描くのは意外と難しくて、2直線の交点を中心に円を描くといったシンプルな操作にもちょっとした計算が必要になります。絵を描く機能と数学的に図形を扱う機能は別物なのです。もちろん世の中にはよく出来たライブラリがたくさんあるのですが、自分で基本的な機能を実装してみるのも良い勉強になります(なりました)。

<aside> 💡 This page deals only with the two-dimensional Euclidean space. If you don’t understand this sentence, you can safely ignore it for now.



Straight lines


Let’s first look at straight lines. In geometry, a straight line has no thickness and extends infinitely in both directions. In the real world, you cannot draw a line that extends infinitely or has no thickness, but in mathematics, we deal with ideal, rigorously defined concepts. We need to distinguish between those two.

まずは直線について考えてみましょう。幾何学における直線は太さを持たず、両方向に無限に伸びる図形です。現実の世界では無限に伸びる線や太さを持たない線を描くことはできません が数学では理想的で厳密な概念を扱います。この2つを区別しましょう。

A straight line can be defined by two points or one point and the direction of the line. These two are the same thing, since two points determine the direction from one point to the other.