update tests

This commit is contained in:
Adrian Mariano 2022-11-05 16:58:15 -04:00
parent 8cd43a6637
commit 3bc83463e0

View file

@ -90,10 +90,10 @@ test_octagon();
module test_teardrop2d() {
$fn=24;
assert_approx(teardrop2d(r=50),[[0,70.7106781187],[35.3553390593,35.3553390593],[43.6811195323,24.3302239283],[48.671902718,11.4475274975],[49.9466487401,-2.30917293229],[47.4080323795,-15.8895709791],[41.2498737299,-28.2568207211],[31.9423402826,-38.4666985491],[20.1960502436,-45.7396934244],[6.90781774759,-49.5205215438],[-6.90781774759,-49.5205215438],[-20.1960502436,-45.7396934244],[-31.9423402826,-38.4666985491],[-41.2498737299,-28.2568207211],[-47.4080323795,-15.8895709791],[-49.9466487401,-2.30917293229],[-48.671902718,11.4475274975],[-43.6811195323,24.3302239283],[-35.3553390593,35.3553390593]]);
assert_approx(teardrop2d(d=100),[[0,70.7106781187],[35.3553390593,35.3553390593],[43.6811195323,24.3302239283],[48.671902718,11.4475274975],[49.9466487401,-2.30917293229],[47.4080323795,-15.8895709791],[41.2498737299,-28.2568207211],[31.9423402826,-38.4666985491],[20.1960502436,-45.7396934244],[6.90781774759,-49.5205215438],[-6.90781774759,-49.5205215438],[-20.1960502436,-45.7396934244],[-31.9423402826,-38.4666985491],[-41.2498737299,-28.2568207211],[-47.4080323795,-15.8895709791],[-49.9466487401,-2.30917293229],[-48.671902718,11.4475274975],[-43.6811195323,24.3302239283],[-35.3553390593,35.3553390593]]);
assert_approx(teardrop2d(r=50,cap_h=50),[[20.7106781187,50],[35.3553390593,35.3553390593],[43.6811195323,24.3302239283],[48.671902718,11.4475274975],[49.9466487401,-2.30917293229],[47.4080323795,-15.8895709791],[41.2498737299,-28.2568207211],[31.9423402826,-38.4666985491],[20.1960502436,-45.7396934244],[6.90781774759,-49.5205215438],[-6.90781774759,-49.5205215438],[-20.1960502436,-45.7396934244],[-31.9423402826,-38.4666985491],[-41.2498737299,-28.2568207211],[-47.4080323795,-15.8895709791],[-49.9466487401,-2.30917293229],[-48.671902718,11.4475274975],[-43.6811195323,24.3302239283],[-35.3553390593,35.3553390593],[-20.7106781187,50]]);
assert_approx(teardrop2d(r=50,cap_h=50,ang=30),[[28.8675134595,50],[43.3012701892,25],[48.5147863138,12.09609478],[49.969541351,-1.74497483513],[47.5528258148,-15.4508497187],[41.4518786278,-27.9596451735],[32.1393804843,-38.3022221559],[20.3368321538,-45.6772728821],[6.958655048,-49.5134034371],[-6.958655048,-49.5134034371],[-20.3368321538,-45.6772728821],[-32.1393804843,-38.3022221559],[-41.4518786278,-27.9596451735],[-47.5528258148,-15.4508497187],[-49.969541351,-1.74497483513],[-48.5147863138,12.09609478],[-43.3012701892,25],[-28.8675134595,50]]);
assert_approx(teardrop2d(r=50),[[0,70.7106781187],[35.3553390593,35.3553390593],[43.3012701892,25],[48.2962913145,12.9409522551],[50,0],[48.2962913145,-12.9409522551],[43.3012701892,-25],[35.3553390593,-35.3553390593],[25,-43.3012701892],[12.9409522551,-48.2962913145],[0,-50],[-12.9409522551,-48.2962913145],[-25,-43.3012701892],[-35.3553390593,-35.3553390593],[-43.3012701892,-25],[-48.2962913145,-12.9409522551],[-50,0],[-48.2962913145,12.9409522551],[-43.3012701892,25],[-35.3553390593,35.3553390593]]);
assert_approx(teardrop2d(d=100), [[0,70.7106781187],[35.3553390593,35.3553390593],[43.3012701892,25],[48.2962913145,12.9409522551],[50,0],[48.2962913145,-12.9409522551],[43.3012701892,-25],[35.3553390593,-35.3553390593],[25,-43.3012701892],[12.9409522551,-48.2962913145],[0,-50],[-12.9409522551,-48.2962913145],[-25,-43.3012701892],[-35.3553390593,-35.3553390593],[-43.3012701892,-25],[-48.2962913145,-12.9409522551],[-50,0],[-48.2962913145,12.9409522551],[-43.3012701892,25],[-35.3553390593,35.3553390593]]);
assert_approx(teardrop2d(r=50,cap_h=50),[[20.7106781187,50],[35.3553390593,35.3553390593],[43.3012701892,25],[48.2962913145,12.9409522551],[50,0],[48.2962913145,-12.9409522551],[43.3012701892,-25],[35.3553390593,-35.3553390593],[25,-43.3012701892],[12.9409522551,-48.2962913145],[0,-50],[-12.9409522551,-48.2962913145],[-25,-43.3012701892],[-35.3553390593,-35.3553390593],[-43.3012701892,-25],[-48.2962913145,-12.9409522551],[-50,0],[-48.2962913145,12.9409522551],[-43.3012701892,25],[-35.3553390593,35.3553390593],[-20.7106781187,50]]);
assert_approx(teardrop2d(r=50,cap_h=50,ang=30),[[28.8675134595,50],[43.3012701892,25],[48.2962913145,12.9409522551],[50,0],[48.2962913145,-12.9409522551],[43.3012701892,-25],[35.3553390593,-35.3553390593],[25,-43.3012701892],[12.9409522551,-48.2962913145],[0,-50],[-12.9409522551,-48.2962913145],[-25,-43.3012701892],[-35.3553390593,-35.3553390593],[-43.3012701892,-25],[-48.2962913145,-12.9409522551],[-50,0],[-48.2962913145,12.9409522551],[-43.3012701892,25],[-28.8675134595,50]]);
}
test_teardrop2d();