|
|
A little late to the thread but I think this could help someone.
The radius of the cylinder is a function of how many cylinders, the radius
of the circle, and whether the cylinders are inside, or outside of the
circle.
On the inside of the circle, you can have as few as 2 cylinders
On the outside of the circle you can have as few as 3 cylinders.
To calculate the radius Rni for N cylinders inside a circle of radius R is:
Rni = (R * sin( pi / N )) / ( 1 + sin( pi / N ))
To calculate the radius Rno for N cylinders outside a circle of radius R
is:
Rno = (R * sin ( pi / N )) / ( 1 - sin( pi / N ))
"Tim Nikias" <tim### [at] gmxde> wrote in message
news:3e3c6707@news.povray.org...
> Well, the circumferance (no idea if that was written
> correctly) of a circle is 2*pi*Radius.
> So, divide that by the diameter of any given cylinder,
> and place these along the circle.
> This is a very crude method, and you'll probably end
> up having the cylinders overlap slightly, or somewhat
> apart, making them somewhat larger/smaller (by a given
> percentage probably dependant on amount of cylinders
> in total, that's trial and error, I guess).
>
> So, lets see:
> You've got a cylinder with diameter 3 (radius 1.5 = diameter 3),
> and you want it 80% smaller, that's 2.4 diameter for the
> new cylinders.
> So, 1.5 radius of initial cylinder + 1.2 radius of next cylinder,
> that equals a circle with radius of 2.7.
> 2*pi*2.7 = 16.96.
> 16.96 divided by 2.4 (diameter of new cylinders) = 7.069,
> roughly 7.
> You'll have 7 cylinders to be placed in the next circle, so divide
> 360 degrees by 7 and place them with that much apart in angle
> (using something like rotate y*360/7*Cylinder_Number or so),
> and perhaps need to increase the radius of them a bit to have them
> touch.
> Apply the same thing for the next circle:
> Initial radius of 1.2 times 80%, add that to the radius of 2.7
> we have right now, multiply that with 2*pi, and divide by
> Init_Radius*80% (this is rough code ;-) and place em. Repeat...
>
> Hope it's clear what I'm trying to say. If not, just ask again, if
> need arises, I might even write the script for ya.
>
> Regards,
> Tim
>
>
> --
> Tim Nikias
> Homepage: http://www.digitaltwilight.de/no_lights/index.html
> Email: Tim### [at] gmxde
>
> > I couldn't explain the request within the subject line so I'll try to
> > explain it here. I am trying to create several sets of cylinders. The
first
> > cylinder is located dead center <0,0,0> and has a radius of 1.5. I want
to
> > place smaller (maybe 80% or so smaller) cylinders around the outside
edge so
> > that the cylinders all touch each other and touch the middle cylinder.
> > (perhaps nine or so.) Then I want to make another set outside the last
of
> > cylinders (a little smaller still) that all touch each other and the
> > cylinders below them. I want to get smaller and smaller cylinders until
> > they are very small (perhaps 0.1 or so) at a distance of +6 from center.
I
> > am including a small (very poor) drawing of what I'm trying to
accomplish
> > (although I want the cylinders to go all the way around.)
> >
> > Is there some math formula that would correctly create these?
> >
> > Patrick (math impaired) Dugan
> >
> >
> >
> >
>
>
Post a reply to this message
|
|