From 35eef84bc634b6c7ab09fff76e84ee49c9adc66d Mon Sep 17 00:00:00 2001 From: mforets Date: Wed, 28 Feb 2018 15:53:57 -0300 Subject: [PATCH] typo and docs tweaks --- src/LineSegment.jl | 6 +++--- src/is_intersection_empty.jl | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/LineSegment.jl b/src/LineSegment.jl index ddb8065871..f437f01293 100644 --- a/src/LineSegment.jl +++ b/src/LineSegment.jl @@ -33,7 +33,7 @@ true ``` We can check the intersection with another line segment, and optionally compute -a witness (that reduces to the common point in this case): +a witness (which is just the common point in this case): ```jldoctest linesegment_constructor julia> sn = LineSegment([1., 0], [0., 1.]) @@ -123,8 +123,8 @@ Check whether a given point is contained in a line segment. Let ``L = (p, q)`` be the line segment with extremes ``p`` and ``q``, and let ``x`` be the given point. -1. A necessary conidition for ``x ∈ (p, q)`` is that they are aligned, thus - their cross product should be zero. +1. A necessary condition for ``x ∈ (p, q)`` is that the three points are aligned, + thus their cross product should be zero. 2. It remains to check that ``x`` belongs to the box approximation of ``L``. This amounts to comparing each coordinate with those of the extremes ``p`` and ``q``. diff --git a/src/is_intersection_empty.jl b/src/is_intersection_empty.jl index 80d08fb1c5..5b0b800ff8 100644 --- a/src/is_intersection_empty.jl +++ b/src/is_intersection_empty.jl @@ -444,8 +444,8 @@ compute a witness. ### Algorithm The algorithm is inspired from [here](https://stackoverflow.com/a/565282), which -again is the special 2D case of a 3D algorithm by R. Goldman, *Intersection of -two lines in three-space*, 1990. +again is the special 2D case of a 3D algorithm by Ronald Goldman's article on the +*Intersection of two lines in three-space* in Graphics Gems, Andrew S. (ed.), 1990. We first check if the two line segments are parallel, and if so, if they are collinear.