I want to plot several small circles in a bigger one with constraint minimization. The distance between any two small circles must be >= to 2*the radius in order not to enter one another. When I change the number of the small circles the length of the radius will vary according to these changes in order to fit the small ones. When I execute the program, I must get plot of the new circles


closed as unclear what you're asking by Dr. belisarius, MarcoB, J. M. is away Nov 2 '15 at 3:03

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Should the circles be arranged in some special way? $\endgroup$ – C. E. Nov 2 '15 at 1:34
  • 1
    $\begingroup$ Graphics[{Disk[#, 1] & /@ (2 CirclePoints[6]), Disk[], Circle[{0, 0}, 3]}] gives one possible arrangement, but your question is currently ill-posed. $\endgroup$ – J. M. is away Nov 2 '15 at 1:36
  • $\begingroup$ Suppose that I have a big circle and I want to plot n small circles in it, say 8 circles 1 inch radius each. What is the smallest radius for the biggest circle to contain all of the small ones? Constraint minimization, they must not be inside one another. How will I write the function, which will minimize this radius for the general case for a general n? I need to write an algorithm for n number of circles, when I change the n number the amount of the small circles will change and the radius of the biggest circle will change too. $\endgroup$ – gamaali2000 Nov 2 '15 at 3:36
  • $\begingroup$ The following link, which is contributed by Ed Pegg Jr answers my question if I get the code. demonstrations.wolfram.com/CirclesPackedInACircle $\endgroup$ – gamaali2000 Nov 2 '15 at 3:53
  • 1
    $\begingroup$ You can get the code by clicking "Download Author Code" on the right. But it doesn't do any constrained minimization, it just gets the circle positions from a big hard-coded list that looks like circlelist = N[1/10^16 {{{0, 0}}, {{10000000000000000, 0}, {-10000000000000000, 0}}, {{0, 11547005383792515}, {-10000000000000000, -5773502691896258}, {10000000000000000, -5773502691896258}}, ...} $\endgroup$ – Rahul Nov 2 '15 at 4:03

Browse other questions tagged or ask your own question.