Jump to content

Finding the Smallest Cube a Sphere can fit in

Orcblood

So I'm in a programming class and not in a math class, though some people may think I should be, I just need someone to check if this is right (Preferable someone who is good or decent with math) and or explain to me a better solution. So part of the programming assignment is to find the cubic dimensions of the smallest cub that can fit a sphere, already defined early, inside of it. 

This is what I am thinking. 

 

(DiameterOfSphere + .0000001)^3 = Volume of Cube

You can do only so many 0 until it is ridiculous.

 

 

Anyone who may think I shouldn't be getting answers to hw I have a few things to say. First thing yay for good morals! I think cheating is very wrong too. I wouldn't want you to do my work but as this is a programming class and not a math class I don't see what's wrong with asking for a math formula. Also this is only part of the assignment. My last point is that my teacher did say we could google for math and anything else just not have a friend or someone code it for us which is definitely cheating. I could not find a solution searching online hence why I'm asking :)

 

Last note, since there is no code and it is a math problem I decided to put this question in Off Topic in case you think I should of put it else where.

Thanks in advance!! 

Link to comment
Share on other sites

Link to post
Share on other sites

That question makes no sense. 

“The value of a college education is not the learning of many facts but the training of the mind to think”

 

Link to comment
Share on other sites

Link to post
Share on other sites

Your topic suggests one problem, but the text in your post suggests a completely  different problem. Are you trying to fit a cube into a sphere, or a sphere into a cube?

Link to comment
Share on other sites

Link to post
Share on other sites

A cube just has to be bigger than big as the diameter of the sphere

Link to comment
Share on other sites

Link to post
Share on other sites

Your topic suggests one problem, but the text in your post suggests a completely  different problem. Are you trying to fit a cube into a sphere, or a sphere into a cube?

I need the smallest cube possible to fit a sphere of certain size. So if my sphere has a diameter of 12 my cube has to fit a sphere with a diameter of 12 without extra space. Not sure how to explain it better. I think if I did (diameter + 0.1)^3 he would be fine with it. I just hope he doesn't get nit picky and want some crazy tiny number and says I need a smaller cube. I think at this point I will just go with what I said ((diameter + 0.1)^3) and hope for the best. Thanks all :)

Link to comment
Share on other sites

Link to post
Share on other sites

Oh this is easy to check.

 

@LukaP Our resident physicist.

Ketchup is better than mustard.

GUI is better than Command Line Interface.

Dubs are better than subs

Link to comment
Share on other sites

Link to post
Share on other sites

Oh this is easy to check.

 

@LukaP Our resident physicist.

umm radius of the sphere = half a side of the sphere? if its fitting it in as it is

 

Volumetrically 

a= (4π/3)r

so if you know your cube size (a) then it becomes

a = qbrt((4π/3)r3)

"Unofficially Official" Leading Scientific Research and Development Officer of the Official Star Citizen LTT Conglomerate | Reaper Squad, Idris Captain | 1x Aurora LN


Game developer, AI researcher, Developing the UOLTT mobile apps


G SIX [My Mac Pro G5 CaseMod Thread]

Link to comment
Share on other sites

Link to post
Share on other sites

umm radius of the sphere = half a side of the sphere? if its fitting it in as it is

 

Volumetrically 

a= (4π/3)r

so if you know your cube size (a) then it becomes

a = qbrt((4π/3)r3)

 

You just blew my mind >.< 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×