<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2419841</guid>
        <pubDate>Thu, 12 Nov 2009 11:37:15 +0000</pubDate>
        <title>Шары в коробке</title>
        <link>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2419841</link>
        <description><![CDATA[Kastigare: Была, кажется, &quot;плосткостная&quot; задача - сколько бильярдных шаров (радиус) уместится на столе (размеры). Надо бы поискать, там это все довольно красиво решалось...<br>да и нагляднее.]]></description>
        <author>Kastigare</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2417575</guid>
        <pubDate>Tue, 10 Nov 2009 01:18:54 +0000</pubDate>
        <title>Шары в коробке</title>
        <link>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2417575</link>
        <description><![CDATA[amk: Для прямоугольных коробок (особенно не очень больших) с ребрами, кратными диаметру шаров, обычно оптимальна простая кубическая укладка. При других возле стенок образуются слишком большие полости, сводящие на нет эффект от более плотного расположения шаров.<br>Кстати, укладка, в которой в слоях шары лежат в квадратной сетке, а каждый следующий слой в углублениях предыдущего, по плотности эквивалентна гексагональной, точнее совпадает с одним из ее вариантов]]></description>
        <author>amk</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2416744</guid>
        <pubDate>Mon, 09 Nov 2009 06:18:33 +0000</pubDate>
        <title>Шары в коробке</title>
        <link>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2416744</link>
        <description><![CDATA[Dethlord: Обьем шаров/Обьем коробки=пи/корень(18)=0,740448 (это почти 75%)<br>
<br>
Болеее плотные упаковки пока не известны(по статье Гарднера)<br>
<br>
Соответственно такая прога(надо еще доработать чето всеравно ошибается&#33;):<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; </div><div class="code_line">&nbsp;&nbsp; Public Function GetCollSQ(ByVal a As Double, ByVal b As Double, ByVal c As Double, ByVal R As Double)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim T As Integer = 1</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dim V1, V2, V2O As Double</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;V1 = a * b * c</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;V2 = (4 / 3) * Math.PI * R ^ 3</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;V2O = V2 * T</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;If V2O / V1 &#62;= 0.74 Then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Return T</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Exit Do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;End If</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;T = T + 1</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Loop</div><div class="code_line">&nbsp;&nbsp; &nbsp;End Function</div><div class="code_line">loop</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>Dethlord</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2416697</guid>
        <pubDate>Mon, 09 Nov 2009 02:16:14 +0000</pubDate>
        <title>Шары в коробке</title>
        <link>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2416697</link>
        <description><![CDATA[amk: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=286571&view=findpost&p=2416332'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>3D&#045;fleX &#064; <time class="tag-quote__quoted-time" datetime="2009-11-08T12:41:59+00:00">08.11.09, 12:41</time></span><div class='quote '>о можно же найти максимальное количество шаров которые можно поместить не зависимо от того как я буду их раскладыват</div></div>Можно оценить, но очень часто можно будет найти укладку, в которую помещаются еще один-два, а то и больше шара. Кроме того, можно получить оценку сверху, деля объем коробки на объем, не самого шара, а описанного вокруг него многогранника, получающегося при гексагональной укладке. Эта оценка получится тоже довольно грубая.]]></description>
        <author>amk</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2416345</guid>
        <pubDate>Sun, 08 Nov 2009 13:21:38 +0000</pubDate>
        <title>Шары в коробке</title>
        <link>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2416345</link>
        <description><![CDATA[Dethlord: Задача о плотной упаковке.<br>http://www.ega-math.narod.ru/Nquant/Spheres.htm<br>Имеется кое какая инфа в книге математеческие головоломки и развлечения Гарднера вроде там читал]]></description>
        <author>Dethlord</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2416332</guid>
        <pubDate>Sun, 08 Nov 2009 12:41:59 +0000</pubDate>
        <title>Шары в коробке</title>
        <link>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2416332</link>
        <description><![CDATA[3D-fleX: Согласен. Но можно же найти максимальное количество шаров которые можно поместить не зависимо от того как я буду их раскладывать.]]></description>
        <author>3D-fleX</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2416329</guid>
        <pubDate>Sun, 08 Nov 2009 12:36:25 +0000</pubDate>
        <title>Шары в коробке</title>
        <link>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2416329</link>
        <description><![CDATA[ss: Чо-то ты, вроде, не шары в коробку укладываешь, а какие-то помидоры утрамбовываешь... Бессмысленно делить объём коробки на объём шара.<br>Вообще, надо ещё знать, как те шары в коробку укладываются: либо ты их по одной и той же квадратной сетке на каждом слое укладываешь, либо для чётных и нечётных слоёв сетка смещается, чтобы... Представь/вспомни, как шары себя &quot;ведут&quot; в какой-либо ёмкости :) А ещё можно их укладывать как соты...<br>Вобщем, задачка довольно нетривиальна.<br>Нужно сузить условия.]]></description>
        <author>ss</author>
        <category>Алгоритмы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2416317</guid>
        <pubDate>Sun, 08 Nov 2009 12:24:12 +0000</pubDate>
        <title>Шары в коробке</title>
        <link>https://forum.sources.ru/index.php?showtopic=286571&amp;view=findpost&amp;p=2416317</link>
        <description><![CDATA[3D-fleX: Есть задача. Найти количество шаров которые поместятся в коробку. Для коробки можно указать размеры, а для шаров радиус.<br>
Отсюда можно найти объем коробки и шаров. Соответственно чтобы шары поместились в коробку, общая сумма объема шаров не должна превышать объема коробки.<br>
Вот сделал подобный алгоритм:<br>
<br>
        <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">static void Main(string[] args)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Console.Write(&quot;Коробка. Введите сторону a(см): &quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int a = int.Parse(Console.ReadLine());</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Console.Write(&quot;Коробка. Введите сторону b(см): &quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int b = int.Parse(Console.ReadLine());</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Console.Write(&quot;Коробка. Введите сторону c(см): &quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int c = int.Parse(Console.ReadLine());</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Console.Write(&quot;\nШар. Введите радиус шара(см): &quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;float r = float.Parse(Console.ReadLine());</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int Vkor = a * b * c;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;double Vshar = Math.Ceiling((4 / 3) * Math.PI * Math.Pow(r,3),1);</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int i = Convert.ToInt32(Vkor / Vshar);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Console.Write(&quot;\nВ коробку можно поместить &quot; + i + &nbsp;&quot; шар(а)&quot;);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Console.Read();</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div></ol></div></div></div></div><br>
<br>
Но проблема в том что, шары должны поместится целиком. А тут получается я нахожу объем не зависимо от шаров которые поместятся целиком, но вокруг остаются промежутки. Как бы сделать так, чтобы еще можно было найти такой промежуток куда бы поместился еще такой же шар?]]></description>
        <author>3D-fleX</author>
        <category>Алгоритмы</category>
      </item>
	
      </channel>
      </rss>
	