Skip to content

Commit 513144f

Browse files
committed
minor doc fixes, typos, misc.
1 parent cba0a8c commit 513144f

File tree

7 files changed

+30
-14
lines changed

7 files changed

+30
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ will print:
5757
[7,8]
5858
```
5959

60-
(Depending on your GCC version, you might need to add `--std::c++17` to the compiler call above.)
60+
(Depending on your GCC version, you might need to add `--std=c++17` to the compiler call above.)
6161

6262
#### TRYME2:
6363

docs/homog2d_manual.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,8 @@ Circle c1( vpts);
758758
c1.set( vpts );
759759
```
760760
See [showcase13](homog2d_showcase.md#sc13) for an example.
761-
It uses the Welzl algorithm, that require O(n) time and O(n) memory (recursive technique).
761+
It uses the [Welzl algorithm](https://en.wikipedia.org/wiki/Smallest-circle_problem),
762+
that require O(n) time and O(n) memory (recursive technique).
762763
The input container can be `std::vector`, `std::array`, or `std::list`.
763764
It requires a least 2 points in the container, and will throw if condition not met.
764765

@@ -1101,11 +1102,14 @@ The minimum value for `nb` is 3 (will generate an equilateral triangle), the fun
11011102
11021103
#### 3.4.12 - Offsetted polyline
11031104
1104-
For closed Polyline objects, the member function `getOffsetPoly()` can compute a new polyline at a given distance.
1105+
For closed Polyline objects, the member function `getOffsetPoly()` can compute a new polyline at a given distance, by using
1106+
[parallel curves](https://en.wikipedia.org/wiki/Parallel_curve).
11051107
Its argument is a distance (numerical value).
1106-
If positive, the returned polyline will be "outside", if negative, il will be inside.
1108+
If positive, the returned polyline will be "outside" the original one, if negative, il will be inside.
11071109
1108-
An optional second argument of type `OffsetPolyParams` holds a boolean value `_angleSplit` that can be set to `true` to "smoothen" the return polyline, by adding some points on sharp angles
1110+
The source polyline must be "simple" (closed, and no intersections).
1111+
1112+
An optional second argument of type `OffsetPolyParams` holds a boolean value `_angleSplit` that can be set to `true` to "smoothen" the return polyline, by adding two points on sharp angles
11091113
(applies only to "outside" computation).
11101114
11111115
See [showcase 22](homog2d_showcase.md#sc22)
@@ -1197,7 +1201,8 @@ bool b2 = isCircle( ell, 1E-15 );
11971201
### 3.6 - Common functions
11981202
<a name="p_commonf"></a>
11991203

1200-
All the types above share some common functions, that are also declared as virtual in the root class `Root`.
1204+
All the types above share some common member functions.
1205+
These are also declared as virtual in the root class `Root`.
12011206
Thus, this enables classical pointer-based runtime polymorphism, [see here](#section_rtp).
12021207

12031208
All of these are `const`.
@@ -1213,7 +1218,7 @@ The names of these functions are:
12131218

12141219

12151220
The `type()` function will return an enum value of type `Type` having one of these values:
1216-
`Point2d`, `Line2d`, `Segment`, `FRect`, `Circle`, `Ellipse`, `OPolyline`, `CPolyline`.
1221+
`Point2d`, `Line2d`, `Segment`, `OSegment`, `FRect`, `Circle`, `Ellipse`, `OPolyline`, `CPolyline`.
12171222
You can get a human-readable value ot the object type with `getString(Type)`:
12181223
```C++
12191224
Point2d pt;
@@ -1228,7 +1233,7 @@ They are declared as `constexpr`, except of course for the last two.
12281233
| Type | Return Value |
12291234
|--------------|--------------|
12301235
| `Point2d` | 1 |
1231-
| `Line2d` | 1 |
1236+
| `Line2d` | 0 |
12321237
| `Segment` | 2 |
12331238
| `OSegment` | 2 |
12341239
| `FRect` | 4 |

docs/index.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SVG import;manual;svg_import
88
Showcase;showcase;
99
Numerical data types;manual;numdt
1010
Segment;manual;p_segment
11-
Minimum Enclosing Circle;manual;minenccir
11+
Minimum Enclosing Circle (MEC);manual;minenccir
1212
Polygon Extremum points;manual;poly_extremum_points
1313
Convex Hull;manual;convex-hull-ff
1414
Polygon Rotation/mirroring;manual;polyline_rotate
@@ -26,3 +26,4 @@ Boost Geometry library;manual;boost_geom_1
2626
Opencv;manual;drawing
2727
SVG drawing;manual;drawing
2828
Rectangle union/intersection;manual;frect_union
29+
Welzl;manual;minenccir

docs/index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
* [Ellipse](homog2d_manual.md#p_ellipse)
99
* [Homographies](homog2d_manual.md#matrix)
1010
* [Lines and Points](homog2d_manual.md#basic)
11-
* [Minimum Enclosing Circle](homog2d_manual.md#minenccir)
11+
* [Minimum Enclosing Circle (MEC)](homog2d_manual.md#minenccir)
1212
* [Numerical data types](homog2d_manual.md#numdt)
1313
* [Opencv](homog2d_manual.md#drawing)
1414
* [Parallelogram](homog2d_manual.md#build_parallelo)
1515
* [Polygon Extremum points](homog2d_manual.md#poly_extremum_points)
16-
* [Polygon](homog2d_manual.md#p_polyline)
1716
* [Polygon Rotation/mirroring](homog2d_manual.md#polyline_rotate)
17+
* [Polyline](homog2d_manual.md#p_polyline)
1818
* [Rectangle](homog2d_manual.md#p_frect)
19+
* [Rectangle union/intersection](homog2d_manual.md#frect_union)
1920
* [Regular Convex Polygon (RCP)](homog2d_manual.md#set_RCP)
2021
* [Runtime polymorphism](homog2d_manual.md#section_rtp)
2122
* [Segment](homog2d_manual.md#p_segment)
@@ -24,5 +25,6 @@
2425
* [SVG import](homog2d_manual.md#svg_import)
2526
* [Thresholds](homog2d_thresholds.md#)
2627
* [ttmath library](homog2d_manual.md#bignum)
28+
* [Welzl](homog2d_manual.md#minenccir)
2729
<hr>
28-
Page generated on 2024-04-21
30+
Page generated on 2025-02-24

misc/plot_line_count.plt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# that is generated with the script: generate_line_count_graph.sh
88

99
set datafile separator " "
10-
set terminal pngcairo size 900,600
10+
set terminal pngcairo size 1200,600
1111
set output "BUILD/line_count.png"
1212

1313
#set terminal qt

misc/scripts/plot_tags_linecount.plt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ set output "linecount.png"
1919
plot "/tmp/homog2d/tags_linecount.csv" using (column(2)/1000):xtic(1) with histogram ti "Library file", \
2020
"" using (column(3)/1000):xtic(1) with histogram ti "Test file"
2121

22+
set title "homog2d: Unit testing"
23+
set output "tests.png"
24+
plot "/tmp/homog2d/tags_linecount.csv" \
25+
using (column(6)):xtic(1) with histogram ti "Nb test cases", \
26+
"" using (column(7)/10):xtic(1) with histogram ti "Nb tests x10"
27+
2228
set title "homog2d: KBytes per release"
2329
set output "bytecount.png"
2430
plot "/tmp/homog2d/tags_linecount.csv" using (column(4)/1000):xtic(1) with histogram ti "Library file", \

misc/scripts/tags_linecount.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ do
2626
c2=$(cat ${p}homog2d_test.cpp|wc -l)
2727
c3=$(du --bytes homog2d.hpp | cut -f1)
2828
c4=$(du --bytes ${p}homog2d_test.cpp | cut -f1)
29-
echo "$t;$c1;$c2;$c3;$c4">>tags_linecount1.csv
29+
c5=$(grep TEST_CASE ${p}homog2d_test.cpp | wc -l)
30+
c6=$(grep CHECK ${p}homog2d_test.cpp | wc -l)
31+
echo "$t;$c1;$c2;$c3;$c4;$c5;$c6">>tags_linecount1.csv
3032
done
3133

3234
# -V: enables sorting by version number (i.e. v2.10 if AFTER v2.9)

0 commit comments

Comments
 (0)