changed spreading points to closest instead of farest center
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user