Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: SOLVING A CUBE

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48886] Re: SOLVING A CUBE
  • From: "Stergios J. Papadakis" <stergios.papadakis at jhuapl.edu>
  • Date: Tue, 22 Jun 2004 05:31:28 -0400 (EDT)
  • Organization: Johns Hopkins University Applied Physics Lab, Laurel, MD, USA
  • References: <cap4b6$cf9$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

My apologies, I assumed first that you couldn't
rotate the pieces.  I guess you would not have
asked if that were the case.

Do it recursively.  Write a routine that calculates
how many will fit as per my previous post
(IntegerPart[L/l]*IntegerPart[W/w]*IntegerPart[H/h]),
but do it for all three possible orientations of the
little pieces relative to the big piece.  Then figure
out what is left for each of the orientations and keep
the one with the least volume left over.  Recursively call the
routine again using that remaining volume, with a 0 result
being what trips you out of the recursion.

Stergios


  • Prev by Date: Re: SOLVING A CUBE
  • Next by Date: Problem rendering fonts (?) in mathematica
  • Previous by thread: Re: SOLVING A CUBE
  • Next by thread: Re: SOLVING A CUBE