# Generate $n$ randomly oriented non-intersecting cylinders with fixed radius and length

This post is in reference to the previous question here.

How could I adapt the solution given to have the following constraints: fixed radius, fixed length, number of cylinders, and within a specified domain. Issues might arise when too many cylinders are specified for a small volume.

• Welcome to Mathematica.SE! 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign!
– user9660
Dec 2, 2015 at 19:20
• Your question is really too broad. You should describe what you tried and where you are specifically having a problem. Dec 2, 2015 at 19:28

## 1 Answer

Data for the array cylinder can be modified by

cylinder = Map[(s = Plus @@ (First@#)/2; d = 50 Subtract @@ (First@#)/
Norm[Subtract @@ (First@#)]; {{s + d, s - d}, Last@#}) &, cylinders];


after which the procedure in the referenced question yields