POV-Ray : Newsgroups : povray.general : Re: Is there a math formula for making... Server Time
17 Nov 2024 17:18:03 EST (-0500)
  Re: Is there a math formula for making... (Message 1 to 6 of 6)  
From: Tim Nikias
Subject: Re: Is there a math formula for making...
Date: 1 Feb 2003 19:32:07
Message: <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

From: Daniel Matthews
Subject: Re: Is there a math formula for making...
Date: 1 Feb 2003 20:19:37
Message: <18662631.Jdy67IQoXK@3-e.net>
Your problem is in the domain of circle packing.
http://www.math.utk.edu/~kens/

or learn to google!
http://www.google.com/search?q=packing+circles+into+a+circle


Post a reply to this message

From: Patrick Dugan
Subject: Re: Is there a math formula for making...
Date: 1 Feb 2003 23:16:09
Message: <3e3c9b89$1@news.povray.org>
> That is what the message body is for. The subject line should be
> descriptive but brief, it should not contain the entire message.

That's precisely why I said what I did.  Sometimes you can give enough
information in the subject line
and sometimes you cannot.


"Christopher James Huff" <cja### [at] earthlinknet> wrote in message
news:cja### [at] netplexaussieorg...
> In article <3e3c554a@news.povray.org>,
>  "Patrick Dugan" <pat### [at] netinsnet> wrote:
>
> > I couldn't explain the request within the subject line so I'll try to
> > explain it here.
>
> That is what the message body is for. The subject line should be
> descriptive but brief, it should not contain the entire message.
> Also, you should not post binaries to this or other non-binary groups.
> Please read the messages in povray.announce.frequently-asked-questions
> and cancel your message.
>
> --
> Christopher James Huff <cja### [at] earthlinknet>
> http://home.earthlink.net/~cjameshuff/
> POV-Ray TAG: chr### [at] tagpovrayorg
> http://tag.povray.org/


Post a reply to this message

From: Patrick Dugan
Subject: Re: Is there a math formula for making...
Date: 1 Feb 2003 23:17:12
Message: <3e3c9bc8$1@news.povray.org>
Thanks for the information!  Hard to google though when you don't know what
its called.

"Daniel Matthews" <dan#@3-e.net> wrote in message
news:186### [at] 3-enet...
> Your problem is in the domain of circle packing.
> http://www.math.utk.edu/~kens/
>
> or learn to google!
> http://www.google.com/search?q=packing+circles+into+a+circle
>
>


Post a reply to this message

From: Daniel Matthews
Subject: Re: Is there a math formula for making...
Date: 2 Feb 2003 00:18:31
Message: <2365309.iTKFECreiD@3-e.net>
Ah yes, it is as if you need to know everything before you can learn
anything.

Patrick Dugan wrote:

> Thanks for the information!  Hard to google though when you don't know
> what its called.
> 
> "Daniel Matthews" <dan#@3-e.net> wrote in message
> news:186### [at] 3-enet...
>> Your problem is in the domain of circle packing.
>> http://www.math.utk.edu/~kens/
>>
>> or learn to google!
>> http://www.google.com/search?q=packing+circles+into+a+circle
>>
>>

-- 
Your connection failed because: The Dilithium Crystals need to be rotated.


Post a reply to this message

From: Mike White
Subject: Re: Is there a math formula for making...
Date: 13 Feb 2003 03:26:36
Message: <3e4b56bc$1@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.