Skip to content
المشاريع

حول

A powerful bin packing problem solver for any polygons

العلوم والهندسة

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
٠
خلال 15 يومًا
٠
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

Flamethrower's polygon packer

This program can quickly solve the 2D bin packing problem for any number of any polygons inside any other polygon! It was the tool used to find all the optimal packings under the name "Ignacio Vallejo" on Erich's Packing Center. 30 triangles in a hexagon

How to use

Download the python file, navigate to its location and run it like this:

python3 polygon_packer.py [n] [nsi] [nsc]

  • Replace [n] with the number of inner polygons you want to solve for
  • Replace [nsi] with the number of sides of the inner polygons (e.g. 4 for a square)
  • Replace [nsc] with the number of sides of the container polygon

Optional parameters:

  • --attempts: the total number of attempts to run. Increase to explore more possible packings. Defaults to 1000.
  • --tolerance: the tolerance for the penalty function. More penalty reduces the margin of overlap but limits exporation. Defaults to an empirical sweetspot of 0.00000001.
  • --finalstep: the container size is decreased by a smaller factor each time, to save compute at the beginning and achieve greater precision near the end. This sets the step size of the shrinkage which would correspond to the theoretical minimum container size (which, for most packings, will not actually be reached, so keep that in mind when setting this parameter). Defaults to 0.0001.
  • --output_format: the file type of the output image. Currently supported types are png (default) and svg.

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…