node-quick-hull-2d icon indicating copy to clipboard operation
node-quick-hull-2d copied to clipboard

Unknown bug

Open dom1n1k opened this issue 8 years ago • 2 comments

I do not know why, I just tried the demo :)

b

dom1n1k avatar May 02 '17 16:05 dom1n1k

Interesting, have you been able to reproduce it? The demo outputs the points and computed bounds to the console, though those arrays might be a bit large with all those points you have in there :)

Also take a look at https://github.com/mikolalysenko/monotone-convex-hull-2d that uses the Monotone Chain algorithm, which has better worst case complexity than Quick Hull.

andrewseidl avatar May 02 '17 16:05 andrewseidl

b2

// points
[
  [ -0.5349999999999999, 0.15000000000000002 ],
  [ -0.08999999999999997, 0.48 ],
  [ -0.485, 0.5700000000000001 ],
  [ 0.20500000000000007, 0.5900000000000001 ],
  [ 0.20500000000000007, 0.355 ],
  [ 0.21999999999999997, 0.07499999999999996 ],
  [ 0.2250000000000001, -0.17999999999999994 ],
  [ -0.020000000000000018, -0.31499999999999995 ],
  [ -0.32499999999999996, -0.2549999999999999 ],
  [ -0.45999999999999996, -0.040000000000000036 ],
  [ -0.030000000000000027, 0.36 ],
  [ 0.17999999999999994, 0.495 ],
  [ -0.45499999999999996, 0.5549999999999999 ],
  [ -0.515, 0.13 ],
  [ -0.30500000000000005, 0.6599999999999999 ],
  [ -0.03500000000000003, 0.75 ],
  [ 0.2250000000000001, 0.5549999999999999 ],
  [ 0.2749999999999999, 0.44999999999999996 ],
  [ 0.2749999999999999, 0.375 ],
  [ 0.2849999999999999, 0.29500000000000004 ],
  [ 0.2849999999999999, 0.29500000000000004 ],
  [ 0.29499999999999993, 0.22499999999999998 ],
  [ 0.29499999999999993, 0.18999999999999995 ],
  [ 0.29000000000000004, 0.135 ],
  [ 0.29000000000000004, 0.12 ],
  [ 0.28, 0.06999999999999995 ],
  [ 0.2749999999999999, 0.030000000000000027 ],
  [ 0.2649999999999999, -0.004999999999999893 ],
  [ 0.25, -0.06000000000000005 ],
  [ 0.28, -0.10499999999999998 ],
  [ 0.2849999999999999, -0.040000000000000036 ],
  [ 0.375, 0.08999999999999997 ],
  [ 0.30499999999999994, 0.125 ],
  [ 0.32499999999999996, 0.24 ],
  [ 0.32499999999999996, 0.275 ],
  [ 0.33000000000000007, 0.35 ],
  [ 0.33000000000000007, 0.35 ],
  [ 0.32499999999999996, 0.39 ],
  [ 0.32499999999999996, 0.42000000000000004 ],
  [ 0.32000000000000006, 0.45499999999999996 ],
  [ 0.32000000000000006, 0.45499999999999996 ],
  [ 0.3700000000000001, 0.375 ],
  [ 0.3700000000000001, 0.28 ],
  [ 0.375, 0.20499999999999996 ],
  [ 0.375, 0.13 ]
]

// bounds
[
  [ -0.5349999999999999, 0.15000000000000002 ],
  [ -0.45999999999999996, -0.040000000000000036 ],
  [ -0.32499999999999996, -0.2549999999999999 ],
  [ -0.020000000000000018, -0.31499999999999995 ],
  [ 0.2250000000000001, -0.17999999999999994 ],
  [ 0.28, -0.10499999999999998 ],
  [ 0.375, 0.08999999999999997 ],
  [ 0.375, 0.20499999999999996 ],
  [ 0.3700000000000001, 0.375 ],
  [ 0.32000000000000006, 0.45499999999999996 ],
  [ 0.20500000000000007, 0.5900000000000001 ],
  [ -0.03500000000000003, 0.75 ],
  [ -0.30500000000000005, 0.6599999999999999 ],
  [ -0.485, 0.5700000000000001 ],
  [ 0.375, 0.13 ]
]

dom1n1k avatar May 02 '17 17:05 dom1n1k