From f7b4cc602b9a646fbc66f3f17d6bb9c20efc3ead Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 24 Jan 2021 18:44:56 +0100 Subject: Initial commit --- .../Documentation/offset_triginometry3.svg | 391 +++++++++++++++++++++ 1 file changed, 391 insertions(+) create mode 100644 upstream/clipper-6.4.2/Documentation/offset_triginometry3.svg (limited to 'upstream/clipper-6.4.2/Documentation/offset_triginometry3.svg') diff --git a/upstream/clipper-6.4.2/Documentation/offset_triginometry3.svg b/upstream/clipper-6.4.2/Documentation/offset_triginometry3.svg new file mode 100644 index 0000000..52eff70 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/offset_triginometry3.svg @@ -0,0 +1,391 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + ß + + delta + c + b + When 'mitering' offset polygons, the maximum distance point 'b' can be from point 'a' is set by 'limit' where limit is a multiple of delta. Therefore, for any given anglewe need to know if length(ab) > limit * delta.Find the largest angle ß (or smallest Ø since Ø = pi - ß) for a given limit, expressing ß as sin(ß) or cos(ß) sincethese can easily be derived from cross or dot products respectively. angle(abc) = Ø/2 length(ab) = limit * deltalength(ac) = deltasin(Ø/2) = delta / (limit * delta) = 1 / limitGiven that sin(Ø/2) = sqrt((1-cos(Ø))/2) **1 / limit = sqrt((1-cos(Ø))/2)limit = sqrt(2 / (1-cos(Ø)))1-cos(Ø) = 2 / sqr(limit) Since Ø = pi - ß ...1-cos(pi - ß) = 2 / sqr(limit)and given cos(pi-ß) = -cos(ß) ** ... 1+cos(ß) = 2 / sqr(limit) cos(ß) = 2 / sqr(limit) - 1Example: if miter limit = 2 (ie 2 times delta) then cos(ß) = (2 / 4) -1 = -0.5 and so ß = 120 degrees. Therefore, when ß > 120 deg. (or Ø < 60 deg.), thedistance point 'b' would be from point 'a' would exceed the limit. ** see http://en.wikipedia.org/wiki/List_of_trigonometric_identities + + a + + + + + + Ø + Ø + + + -- cgit