Basically, looking for ideas and heads up in developing a program to create a randomly distributed closed pack spheres (non-overlapping) in a cube using Matlab. Have no great deal of experience in coding.
Hi, I think it is better you first consider a cartesian coordinate. Then write the cube equation and sphere separately. To define the radius of the sphere, you should have a condition of radius< cube elements. In this way, the radius could take any random value smaller than cubic sizes. Redius could be projected on x,y,z , on the other hand spherical coordinate could be converted to cartezians.