From 6e741272c5216da3b81ef05923e2ffd4f7acf70c Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Sun, 5 Aug 2018 16:43:36 +0200 Subject: [PATCH] changed spreading points to closest instead of farest center --- src/app/directives/guilloche.directive.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/directives/guilloche.directive.ts b/src/app/directives/guilloche.directive.ts index 23da6f9..ecc5c8f 100644 --- a/src/app/directives/guilloche.directive.ts +++ b/src/app/directives/guilloche.directive.ts @@ -75,8 +75,7 @@ export class GuillocheDirective implements OnChanges { private spreadLines(points: Point[]) { const indexMiddle = Math.floor(points.length * 0.5); const pointMiddle = points[indexMiddle]; - const closestCenter = this.getFarestCenter(pointMiddle); - // const closestCenter = this.getClosestCenter(pointMiddle); + const closestCenter = this.getClosestCenter(pointMiddle); const radius = this.Δ(pointMiddle, closestCenter); const spreadPoints = []; const group = this.canvas.append('g').attr('id', 'spread-points'); @@ -90,7 +89,6 @@ export class GuillocheDirective implements OnChanges { } spreadPoints.sort((a, b) => { - // return this.Δ(a, pointMiddle) - this.Δ(b, pointMiddle); // Good possibility to align orientation points outsite return this.Δ(b, pointMiddle) - this.Δ(a, pointMiddle); });