Re: [Flashcoders] a question of geometry

2006-09-20 Thread Charles Parcell

It is a great book!  Plus, we have the added benifit of having access to the
man here on the list!

Charles P.


On 9/19/06, Andreas R <[EMAIL PROTECTED]> wrote:


Whoa, thanks for pointing me to that book. Just ordered it :) sounds
like exactly what i need.

- A

Charles Parcell wrote:
> This is why Danny is "The Math Man"!
>
> BTW, love your book Danny. Can't wait for the next. :)
>
http://www.amazon.com/Mathematics-Physics-Programmers-Game-Development/dp/1584503300/sr=1-1/qid=1158676544/ref=pd_bbs_1/104-0626050-4073525?ie=UTF8&s=books
>
>
> Charles P.
>
>
> On 9/18/06, Andreas R <[EMAIL PROTECTED]> wrote:
>>
>> Danny Kodicek wrote:
>> >> I can email an image to anyone that wants it, or you can draw it
like
>> >> this...
>> >>
>> >> I think this is what you want...
>> >> Draw a point and a line vertically upwards of length R.
>> >> Draw a large letter V (inverted cone) upwards from the point.
>> >> Draw an arc, radius R to cut the V.
>> >> Where the arc cuts the vertical draw a circle, radius r, to meet the
>> edges
>> >> of V.
>> >> The edges of V are tangents.
>> >> Draw radii to these tangents, making 90 degree angles with them.
>> >> Mark r and R on the diagram.
>> >> Now r/R = sin(A), where A is half the angle at the bottom of the V.
>> >>
>> >> Let's say there are n of these small circles, so that
>> >> n*2*A = 360   (degrees)
>> >> or
>> >> n*2*A = 2*pi   (radians)
>> >>
>> >> You can decide n and find A and then find r/R (the angles are
usually
>> in
>> >> radians).
>> >> You can then decide R and find r (or other way around).
>> >>
>> >> Each time through the loop for <=n the new angle measured from
>> >> the vertical
>> >> in a clockwise direction is n*2*A.
>> >> The place to draw each circle is x=Rsin(n*2*A) and y=Rcos(n*2*A)
>> >>
>> >
>> > I enjoyed this one, so I came back to it and wrote a complete
>> solution.
>> Put
>> > a symbol in the library with id 'circle', then run this script:
>> >
>> > function getRingRadius(tArray:Array):Number {
>> >   var tMaxError = 0.1
>> >   var tMax = 1024
>> >   var tMin = 0
>> >   do {
>> >   var tCheck = (tMax + tMin) / 2
>> >   var tSum = 0
>> >   for (var i = 0; i> >   tSum += Math.atan2(tArray[i],tCheck)
>> >   }
>> >   if (tSum>Math.PI) {
>> >   tMin = tCheck
>> >   } else {
>> >   tMax = tCheck
>> >   }
>> >   } while (Math.abs(tSum - Math.PI)>tMaxError)
>> >   return tCheck
>> > }
>> > var tRadii = new Array()
>> > for (var i=0; i<10 ; i++) {
>> >   tRadii.push(Math.random()*20+1)
>> > }
>> > var tRingRadius = getRingRadius(tRadii)
>> > var tSquaredRadius = tRingRadius * tRingRadius
>> > var tAngle = 0
>> > for (var i=0; i<10 ; i++) {
>> >   tCircle = this.attachMovie("circle", "circle"+i,
>> > this.getNextHighestDepth())
>> >   tCircle._width = tCircle._height = tRadii[i]*2
>> >   tThisAngle = Math.atan2(tRadii[i], tRingRadius)
>> >   tAngle += tThisAngle
>> >   tDistance = Math.sqrt(tRadii[i]*tRadii[i] + tSquaredRadius)
>> >   tCircle._x = 200 + tDistance * Math.cos(tAngle)
>> >   tCircle._y = 200 + tDistance * Math.sin(tAngle)
>> >   tAngle += tThisAngle
>> > }
>> >
>> > NB: my previous script had my max and min mixed up so it didn't work.
>> This
>> > one is correct.
>> >
>> > Danny
>> >
>> > ___
>> > [email protected]
>> > To change your subscription options or search the archive:
>> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>> >
>> > Brought to you by Fig Leaf Software
>> > Premier Authorized Adobe Consulting and Training
>> > http://www.figleaf.com
>> > http://training.figleaf.com
>> >
>> You guys are gods :)
>> Thanks so much! My problem was solved completely by slight
modifications
>> to Danny's script. What i'd do without this list i don't know.
>>
>> - Andreas
>> ___
>> [email protected]
>> To change your subscription options or search the archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Adobe Consulting and Training
>> http://www.figleaf.com
>> http://training.figleaf.com
>>
> ___
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.fig

Re: [Flashcoders] a question of geometry

2006-09-19 Thread Andreas R
Whoa, thanks for pointing me to that book. Just ordered it :) sounds 
like exactly what i need.


- A

Charles Parcell wrote:

This is why Danny is "The Math Man"!

BTW, love your book Danny. Can't wait for the next. :)
http://www.amazon.com/Mathematics-Physics-Programmers-Game-Development/dp/1584503300/sr=1-1/qid=1158676544/ref=pd_bbs_1/104-0626050-4073525?ie=UTF8&s=books 



Charles P.


On 9/18/06, Andreas R <[EMAIL PROTECTED]> wrote:


Danny Kodicek wrote:
>> I can email an image to anyone that wants it, or you can draw it like
>> this...
>>
>> I think this is what you want...
>> Draw a point and a line vertically upwards of length R.
>> Draw a large letter V (inverted cone) upwards from the point.
>> Draw an arc, radius R to cut the V.
>> Where the arc cuts the vertical draw a circle, radius r, to meet the
edges
>> of V.
>> The edges of V are tangents.
>> Draw radii to these tangents, making 90 degree angles with them.
>> Mark r and R on the diagram.
>> Now r/R = sin(A), where A is half the angle at the bottom of the V.
>>
>> Let's say there are n of these small circles, so that
>> n*2*A = 360   (degrees)
>> or
>> n*2*A = 2*pi   (radians)
>>
>> You can decide n and find A and then find r/R (the angles are usually
in
>> radians).
>> You can then decide R and find r (or other way around).
>>
>> Each time through the loop for <=n the new angle measured from
>> the vertical
>> in a clockwise direction is n*2*A.
>> The place to draw each circle is x=Rsin(n*2*A) and y=Rcos(n*2*A)
>>
>
> I enjoyed this one, so I came back to it and wrote a complete 
solution.

Put
> a symbol in the library with id 'circle', then run this script:
>
> function getRingRadius(tArray:Array):Number {
>   var tMaxError = 0.1
>   var tMax = 1024
>   var tMin = 0
>   do {
>   var tCheck = (tMax + tMin) / 2
>   var tSum = 0
>   for (var i = 0; i   tSum += Math.atan2(tArray[i],tCheck)
>   }
>   if (tSum>Math.PI) {
>   tMin = tCheck
>   } else {
>   tMax = tCheck
>   }
>   } while (Math.abs(tSum - Math.PI)>tMaxError)
>   return tCheck
> }
> var tRadii = new Array()
> for (var i=0; i<10 ; i++) {
>   tRadii.push(Math.random()*20+1)
> }
> var tRingRadius = getRingRadius(tRadii)
> var tSquaredRadius = tRingRadius * tRingRadius
> var tAngle = 0
> for (var i=0; i<10 ; i++) {
>   tCircle = this.attachMovie("circle", "circle"+i,
> this.getNextHighestDepth())
>   tCircle._width = tCircle._height = tRadii[i]*2
>   tThisAngle = Math.atan2(tRadii[i], tRingRadius)
>   tAngle += tThisAngle
>   tDistance = Math.sqrt(tRadii[i]*tRadii[i] + tSquaredRadius)
>   tCircle._x = 200 + tDistance * Math.cos(tAngle)
>   tCircle._y = 200 + tDistance * Math.sin(tAngle)
>   tAngle += tThisAngle
> }
>
> NB: my previous script had my max and min mixed up so it didn't work.
This
> one is correct.
>
> Danny
>
> ___
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
You guys are gods :)
Thanks so much! My problem was solved completely by slight modifications
to Danny's script. What i'd do without this list i don't know.

- Andreas
___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] a question of geometry

2006-09-19 Thread Charles Parcell

This is why Danny is "The Math Man"!

BTW, love your book Danny. Can't wait for the next. :)
http://www.amazon.com/Mathematics-Physics-Programmers-Game-Development/dp/1584503300/sr=1-1/qid=1158676544/ref=pd_bbs_1/104-0626050-4073525?ie=UTF8&s=books

Charles P.


On 9/18/06, Andreas R <[EMAIL PROTECTED]> wrote:


Danny Kodicek wrote:
>> I can email an image to anyone that wants it, or you can draw it like
>> this...
>>
>> I think this is what you want...
>> Draw a point and a line vertically upwards of length R.
>> Draw a large letter V (inverted cone) upwards from the point.
>> Draw an arc, radius R to cut the V.
>> Where the arc cuts the vertical draw a circle, radius r, to meet the
edges
>> of V.
>> The edges of V are tangents.
>> Draw radii to these tangents, making 90 degree angles with them.
>> Mark r and R on the diagram.
>> Now r/R = sin(A), where A is half the angle at the bottom of the V.
>>
>> Let's say there are n of these small circles, so that
>> n*2*A = 360   (degrees)
>> or
>> n*2*A = 2*pi   (radians)
>>
>> You can decide n and find A and then find r/R (the angles are usually
in
>> radians).
>> You can then decide R and find r (or other way around).
>>
>> Each time through the loop for <=n the new angle measured from
>> the vertical
>> in a clockwise direction is n*2*A.
>> The place to draw each circle is x=Rsin(n*2*A) and y=Rcos(n*2*A)
>>
>
> I enjoyed this one, so I came back to it and wrote a complete solution.
Put
> a symbol in the library with id 'circle', then run this script:
>
> function getRingRadius(tArray:Array):Number {
>   var tMaxError = 0.1
>   var tMax = 1024
>   var tMin = 0
>   do {
>   var tCheck = (tMax + tMin) / 2
>   var tSum = 0
>   for (var i = 0; i   tSum += Math.atan2(tArray[i],tCheck)
>   }
>   if (tSum>Math.PI) {
>   tMin = tCheck
>   } else {
>   tMax = tCheck
>   }
>   } while (Math.abs(tSum - Math.PI)>tMaxError)
>   return tCheck
> }
> var tRadii = new Array()
> for (var i=0; i<10 ; i++) {
>   tRadii.push(Math.random()*20+1)
> }
> var tRingRadius = getRingRadius(tRadii)
> var tSquaredRadius = tRingRadius * tRingRadius
> var tAngle = 0
> for (var i=0; i<10 ; i++) {
>   tCircle = this.attachMovie("circle", "circle"+i,
> this.getNextHighestDepth())
>   tCircle._width = tCircle._height = tRadii[i]*2
>   tThisAngle = Math.atan2(tRadii[i], tRingRadius)
>   tAngle += tThisAngle
>   tDistance = Math.sqrt(tRadii[i]*tRadii[i] + tSquaredRadius)
>   tCircle._x = 200 + tDistance * Math.cos(tAngle)
>   tCircle._y = 200 + tDistance * Math.sin(tAngle)
>   tAngle += tThisAngle
> }
>
> NB: my previous script had my max and min mixed up so it didn't work.
This
> one is correct.
>
> Danny
>
> ___
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
You guys are gods :)
Thanks so much! My problem was solved completely by slight modifications
to Danny's script. What i'd do without this list i don't know.

- Andreas
___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] a question of geometry

2006-09-18 Thread Andreas R

Danny Kodicek wrote:

I can email an image to anyone that wants it, or you can draw it like
this...

I think this is what you want...
Draw a point and a line vertically upwards of length R.
Draw a large letter V (inverted cone) upwards from the point.
Draw an arc, radius R to cut the V.
Where the arc cuts the vertical draw a circle, radius r, to meet the edges
of V.
The edges of V are tangents.
Draw radii to these tangents, making 90 degree angles with them.
Mark r and R on the diagram.
Now r/R = sin(A), where A is half the angle at the bottom of the V.

Let's say there are n of these small circles, so that
n*2*A = 360   (degrees)
or
n*2*A = 2*pi   (radians)

You can decide n and find A and then find r/R (the angles are usually in
radians).
You can then decide R and find r (or other way around).

Each time through the loop for <=n the new angle measured from
the vertical
in a clockwise direction is n*2*A.
The place to draw each circle is x=Rsin(n*2*A) and y=Rcos(n*2*A)



I enjoyed this one, so I came back to it and wrote a complete solution. Put
a symbol in the library with id 'circle', then run this script:

function getRingRadius(tArray:Array):Number {
var tMaxError = 0.1
var tMax = 1024
var tMin = 0
do {
var tCheck = (tMax + tMin) / 2
var tSum = 0
for (var i = 0; iMath.PI) {
tMin = tCheck
} else {
tMax = tCheck
}
} while (Math.abs(tSum - Math.PI)>tMaxError)
return tCheck
}
var tRadii = new Array()
for (var i=0; i<10 ; i++) {
tRadii.push(Math.random()*20+1)
}
var tRingRadius = getRingRadius(tRadii)
var tSquaredRadius = tRingRadius * tRingRadius
var tAngle = 0
for (var i=0; i<10 ; i++) {
tCircle = this.attachMovie("circle", "circle"+i,
this.getNextHighestDepth())
tCircle._width = tCircle._height = tRadii[i]*2
tThisAngle = Math.atan2(tRadii[i], tRingRadius)
tAngle += tThisAngle
tDistance = Math.sqrt(tRadii[i]*tRadii[i] + tSquaredRadius)
tCircle._x = 200 + tDistance * Math.cos(tAngle)
tCircle._y = 200 + tDistance * Math.sin(tAngle)
tAngle += tThisAngle
}

NB: my previous script had my max and min mixed up so it didn't work. This
one is correct.

Danny

___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
  

You guys are gods :)
Thanks so much! My problem was solved completely by slight modifications 
to Danny's script. What i'd do without this list i don't know.


- Andreas
___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] a question of geometry

2006-09-18 Thread Danny Kodicek
> I can email an image to anyone that wants it, or you can draw it like
> this...
>
> I think this is what you want...
> Draw a point and a line vertically upwards of length R.
> Draw a large letter V (inverted cone) upwards from the point.
> Draw an arc, radius R to cut the V.
> Where the arc cuts the vertical draw a circle, radius r, to meet the edges
> of V.
> The edges of V are tangents.
> Draw radii to these tangents, making 90 degree angles with them.
> Mark r and R on the diagram.
> Now r/R = sin(A), where A is half the angle at the bottom of the V.
>
> Let's say there are n of these small circles, so that
> n*2*A = 360   (degrees)
> or
> n*2*A = 2*pi   (radians)
>
> You can decide n and find A and then find r/R (the angles are usually in
> radians).
> You can then decide R and find r (or other way around).
>
> Each time through the loop for <=n the new angle measured from
> the vertical
> in a clockwise direction is n*2*A.
> The place to draw each circle is x=Rsin(n*2*A) and y=Rcos(n*2*A)

I enjoyed this one, so I came back to it and wrote a complete solution. Put
a symbol in the library with id 'circle', then run this script:

function getRingRadius(tArray:Array):Number {
var tMaxError = 0.1
var tMax = 1024
var tMin = 0
do {
var tCheck = (tMax + tMin) / 2
var tSum = 0
for (var i = 0; iMath.PI) {
tMin = tCheck
} else {
tMax = tCheck
}
} while (Math.abs(tSum - Math.PI)>tMaxError)
return tCheck
}
var tRadii = new Array()
for (var i=0; i<10 ; i++) {
tRadii.push(Math.random()*20+1)
}
var tRingRadius = getRingRadius(tRadii)
var tSquaredRadius = tRingRadius * tRingRadius
var tAngle = 0
for (var i=0; i<10 ; i++) {
tCircle = this.attachMovie("circle", "circle"+i,
this.getNextHighestDepth())
tCircle._width = tCircle._height = tRadii[i]*2
tThisAngle = Math.atan2(tRadii[i], tRingRadius)
tAngle += tThisAngle
tDistance = Math.sqrt(tRadii[i]*tRadii[i] + tSquaredRadius)
tCircle._x = 200 + tDistance * Math.cos(tAngle)
tCircle._y = 200 + tDistance * Math.sin(tAngle)
tAngle += tThisAngle
}

NB: my previous script had my max and min mixed up so it didn't work. This
one is correct.

Danny

___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] a question of geometry

2006-09-18 Thread John McCormack
I can email an image to anyone that wants it, or you can draw it like
this...

I think this is what you want...
Draw a point and a line vertically upwards of length R.
Draw a large letter V (inverted cone) upwards from the point.
Draw an arc, radius R to cut the V.
Where the arc cuts the vertical draw a circle, radius r, to meet the edges
of V.
The edges of V are tangents.
Draw radii to these tangents, making 90 degree angles with them.
Mark r and R on the diagram.
Now r/R = sin(A), where A is half the angle at the bottom of the V.

Let's say there are n of these small circles, so that
n*2*A = 360   (degrees)
or
n*2*A = 2*pi   (radians)

You can decide n and find A and then find r/R (the angles are usually in
radians).
You can then decide R and find r (or other way around).

Each time through the loop for <=n the new angle measured from the vertical
in a clockwise direction is n*2*A.
The place to draw each circle is x=Rsin(n*2*A) and y=Rcos(n*2*A)

Without geometry, where would we be?

John

pi=2.142
A=pi/n(in radians)
r=R*sin(A)
or R=r/sin(A)





___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] a question of geometry

2006-09-18 Thread Danny Kodicek
> I suppose you know the width/diameter of the circles?
>
> 1. First calulate the length of you line:
> ringLength=circle1Diameter+circle2Diameter etc
> 2. Calculate the ringRadius from ringLength (I don't remember the formula
> but it's high school math)
> 3. Calculate the angle that every circle should be on:
> circleXDiameter/ringLength*360
> 4. Place the circles by converting their angle to a vector and
> multiply it
> with the ringRadius (google search for angle to vector functions,
> possibly
> it's easier to find functions that convert radians to vectors)

This sounds pretty much like I would do it. I think you're going to need an
approximate solution - it'd be a nightmare to solve algebraically. Basically
if you have a set of circles with radius r(i), and want to place them on a
ring with radius R, the angle that each circle subtends at the centre of the
circle is 2*atan(r(i)/R). So you want to find R such that the sum of
atan(r(i)/R) is pi. Here's a function that ought to work (I'm arbitrarily
assuming your ring will never have a radius greater than 1024):


function getRingRadius(tArray:Array):Number {
var tMaxError = 0.1
var tMax = 1024
var tMin = 0
do {
var tCheck = (tMax + tMin) / 2
var tSum = 0
for (var i = 0; iMath.PI) {
tMax = tCheck
} else {
tMin = tCheck
}
} while (Math.abs(tSum - Math.PI)>tMaxError)
return tCheck
}

Danny

___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] a question of geometry

2006-09-18 Thread David Skoglund

I suppose you know the width/diameter of the circles?

1. First calulate the length of you line: 
ringLength=circle1Diameter+circle2Diameter etc
2. Calculate the ringRadius from ringLength (I don't remember the formula 
but it's high school math)
3. Calculate the angle that every circle should be on: 
circleXDiameter/ringLength*360
4. Place the circles by converting their angle to a vector and multiply it 
with the ringRadius (google search for angle to vector functions, possibly 
it's easier to find functions that convert radians to vectors)


I think this would create a image close to what you're after. You might want 
to tweak the 3:rd step to account for the "bent diameter" of the circles to 
get an exact fit.


/David Skoglund

___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] a question of geometry

2006-09-17 Thread neve_capricorn

unscribe
___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] a question of geometry

2006-09-17 Thread Andreas R
It's important to remember i don't expect a perfect circle. Perhaps my 
terminology is weak, i mean a ring of circles


http://andreas.rayon.no/temp/circleOfCircles.png

- A

Ron Wheeler wrote:

These circles will overlap each other.

If this is not what you want, then Charles is right. It is not 
possible to do what Andreas seems to be describing.


Perhaps Andreas should draw a picture by hand of what he actually 
wants this to look like.


Ron

Ron Wheeler wrote:
From what is said, is it true that you want to take a large circle, 
divide it up into a random number of pie shaped slices and then use 
the outer edges of the pies as diameters of smaller circles so that 
when the smaller circles are drawn, they form a circle of circles.


If so you need to decide how to break 360 degrees up into a number of 
angles.
Start at the 0 point (wherever you want the start to be) and find the 
intersection a line drawn from the center of the circle to the edge 
and then do the same for the next radius. The 2 points form the 
diameter of the first small circle. The small circle's radius is half 
the distance between the points and the centre of the small circle is 
at the midpoint between these 2 points.
Do this for each pair of radius lines and you will have a circle of 
circles.


Ron


Andreas R wrote:
To reiterate, there can be *any* number of circles of *any* size. 
The aim is to create a circular chain of circles where the overall 
diameter is a result of the circumference of the chain.


Alias™ wrote:
And does the number of circles vary? Will it always be the same 
number?


On 17/09/06, Andreas R <[EMAIL PROTECTED]> wrote:


The circles can be any size.

Alias™ wrote:
> Ok, are the circles all the same size, or do they have the same 
length?

>
> Alias
>
> On 17/09/06, Andreas R <[EMAIL PROTECTED]> wrote:
>>
>> smart people, help a less smart one out:
>>
>> I'm faced with a problem similar to the seven circles theorem
>> (http://mathworld.wolfram.com/SevenCirclesTheorem.html) in that 
i need
>> to arrange x number of circles along a circular path, making 
sure they
>> all touch their two neighbors. In this way, the path's radius 
is NOT

>> given, but is rather made up from the sum of all the circles'
diametres.
>>
>> I've boiled the problem down to this: I have a line of x length 
with y
>> number of segments of nonuniform length. I know the final 
length of the

>> line because i know the length of each individual segment.
>>
>> Now, i need to "bend" this line so that the end of the final 
segment
>> touches on the beginning of the first one. As such, each 
segment must

be
>> given an angle somehow based on the overall amount of segments and
their
>> individual lengths.
>>
>> Beyond this, i'm stumped. I've been pouring over mathworld and 
google

>> looking for such bendyness, and i've come up empty handed.
>>
>> Anyone have suggestions, possible solutions?
>>
>> Thanks,
>>
>> - A
>> ___
>> [email protected]
>> To change your subscription options or search the archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Adobe Consulting and Training
>> http://www.figleaf.com
>> http://training.figleaf.com
>>
> ___
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf

Re: [Flashcoders] a question of geometry

2006-09-17 Thread Ron Wheeler

These circles will overlap each other.

If this is not what you want, then Charles is right. It is not possible 
to do what Andreas seems to be describing.


Perhaps Andreas should draw a picture by hand of what he actually wants 
this to look like.


Ron

Ron Wheeler wrote:
From what is said, is it true that you want to take a large circle, 
divide it up into a random number of pie shaped slices and then use 
the outer edges of the pies as diameters of smaller circles so that 
when the smaller circles are drawn, they form a circle of circles.


If so you need to decide how to break 360 degrees up into a number of 
angles.
Start at the 0 point (wherever you want the start to be) and find the 
intersection a line drawn from the center of the circle to the edge 
and then do the same for the next radius. The 2 points form the 
diameter of the first small circle. The small circle's radius is half 
the distance between the points and the centre of the small circle is 
at the midpoint between these 2 points.
Do this for each pair of radius lines and you will have a circle of 
circles.


Ron


Andreas R wrote:
To reiterate, there can be *any* number of circles of *any* size. The 
aim is to create a circular chain of circles where the overall 
diameter is a result of the circumference of the chain.


Alias™ wrote:

And does the number of circles vary? Will it always be the same number?

On 17/09/06, Andreas R <[EMAIL PROTECTED]> wrote:


The circles can be any size.

Alias™ wrote:
> Ok, are the circles all the same size, or do they have the same 
length?

>
> Alias
>
> On 17/09/06, Andreas R <[EMAIL PROTECTED]> wrote:
>>
>> smart people, help a less smart one out:
>>
>> I'm faced with a problem similar to the seven circles theorem
>> (http://mathworld.wolfram.com/SevenCirclesTheorem.html) in that 
i need
>> to arrange x number of circles along a circular path, making 
sure they
>> all touch their two neighbors. In this way, the path's radius is 
NOT

>> given, but is rather made up from the sum of all the circles'
diametres.
>>
>> I've boiled the problem down to this: I have a line of x length 
with y
>> number of segments of nonuniform length. I know the final length 
of the

>> line because i know the length of each individual segment.
>>
>> Now, i need to "bend" this line so that the end of the final 
segment
>> touches on the beginning of the first one. As such, each segment 
must

be
>> given an angle somehow based on the overall amount of segments and
their
>> individual lengths.
>>
>> Beyond this, i'm stumped. I've been pouring over mathworld and 
google

>> looking for such bendyness, and i've come up empty handed.
>>
>> Anyone have suggestions, possible solutions?
>>
>> Thanks,
>>
>> - A
>> ___
>> [email protected]
>> To change your subscription options or search the archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Adobe Consulting and Training
>> http://www.figleaf.com
>> http://training.figleaf.com
>>
> ___
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/

Re: [Flashcoders] a question of geometry

2006-09-17 Thread Ron Wheeler
From what is said, is it true that you want to take a large circle, 
divide it up into a random number of pie shaped slices and then use the 
outer edges of the pies as diameters of smaller circles so that when the 
smaller circles are drawn, they form a circle of circles.


If so you need to decide how to break 360 degrees up into a number of 
angles.
Start at the 0 point (wherever you want the start to be) and find the 
intersection a line drawn from the center of the circle to the edge and 
then do the same for the next radius. The 2 points form the diameter of 
the first small circle. The small circle's radius is half the distance 
between the points and the centre of the small circle is at the midpoint 
between these 2 points.

Do this for each pair of radius lines and you will have a circle of circles.

Ron


Andreas R wrote:
To reiterate, there can be *any* number of circles of *any* size. The 
aim is to create a circular chain of circles where the overall 
diameter is a result of the circumference of the chain.


Alias™ wrote:

And does the number of circles vary? Will it always be the same number?

On 17/09/06, Andreas R <[EMAIL PROTECTED]> wrote:


The circles can be any size.

Alias™ wrote:
> Ok, are the circles all the same size, or do they have the same 
length?

>
> Alias
>
> On 17/09/06, Andreas R <[EMAIL PROTECTED]> wrote:
>>
>> smart people, help a less smart one out:
>>
>> I'm faced with a problem similar to the seven circles theorem
>> (http://mathworld.wolfram.com/SevenCirclesTheorem.html) in that i 
need
>> to arrange x number of circles along a circular path, making sure 
they

>> all touch their two neighbors. In this way, the path's radius is NOT
>> given, but is rather made up from the sum of all the circles'
diametres.
>>
>> I've boiled the problem down to this: I have a line of x length 
with y
>> number of segments of nonuniform length. I know the final length 
of the

>> line because i know the length of each individual segment.
>>
>> Now, i need to "bend" this line so that the end of the final segment
>> touches on the beginning of the first one. As such, each segment 
must

be
>> given an angle somehow based on the overall amount of segments and
their
>> individual lengths.
>>
>> Beyond this, i'm stumped. I've been pouring over mathworld and 
google

>> looking for such bendyness, and i've come up empty handed.
>>
>> Anyone have suggestions, possible solutions?
>>
>> Thanks,
>>
>> - A
>> ___
>> [email protected]
>> To change your subscription options or search the archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Adobe Consulting and Training
>> http://www.figleaf.com
>> http://training.figleaf.com
>>
> ___
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] a question of geometry

2006-09-17 Thread Charles Parcell

I think your problem is not possible. Here is why (hope I am able to
articulate).

Some basic background info:

  - The diameter of a circle is the distance from one edge of the circle
  to the furthest edge.
  - A line of circles edge to edge, so that their diameters are used,
  makes a strait line.
  - The radius of a circle is the distance from the center to any edge.

Lets do some simple math...

Diameter 1 = 10
Diameter 2 = 8
Diameter 3 = 7
Diameter 4 = 5

Thus, their sum = 30.  Now lets use this as the radius of our big circle
(BC).

BCc = 2 * 3.14 * 30 = 188.4
(where BCc is the big circle circumference)

BCd = 2 * 30 = 60
(where BCd is the big circle diameter)

First lets look at placing the original circle centers on the big circle's
path, so that their edges touch. It will quickly become clear that this is
not going to work.

188.4 / 4 = 47.1

The sum of the original four diameters would have to equal 47.1.  This is
obviously not correct.

Let see if we can do this by keeping all the circles inside the big circle.
So, not only do we want to have all four of our original circles be
touching, but their tangents need to touch the big circle as well. In
addition to all of this the last circle needs to also touch the first
circle.

The most optimal form of this would assume that all four of our original
circles have the same diameter. The sum of these circles would equal
2.4times the big circles diameter. Remember thought that this woulod
be the
optimal. So lets take a look at our numbers.

Optimal diameter sum = 2.41 * 60 = 144.6
** not needed info** Each unit circle's diameter = 144.6 / 4 = 36.15

So this means that the sum of our original circles has to equal at least
144.6 or greater.

Our circles diameter sum = 30 which is far less than the required 144.6.

See Circle Packing for optimal values.
http://mathworld.wolfram.com/CirclePacking.html

I hope that was somw what clear.

Charles P



On 9/17/06, Andreas R <[EMAIL PROTECTED]> wrote:


i need to arrange x number of circles along a circular path, making sure
they
all touch their two neighbors. In this way, the path's radius is NOT
given, but is rather made up from the sum of all the circles' diametres.


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] a question of geometry

2006-09-17 Thread Andreas R
To reiterate, there can be *any* number of circles of *any* size. The 
aim is to create a circular chain of circles where the overall diameter 
is a result of the circumference of the chain.


Alias™ wrote:

And does the number of circles vary? Will it always be the same number?

On 17/09/06, Andreas R <[EMAIL PROTECTED]> wrote:


The circles can be any size.

Alias™ wrote:
> Ok, are the circles all the same size, or do they have the same 
length?

>
> Alias
>
> On 17/09/06, Andreas R <[EMAIL PROTECTED]> wrote:
>>
>> smart people, help a less smart one out:
>>
>> I'm faced with a problem similar to the seven circles theorem
>> (http://mathworld.wolfram.com/SevenCirclesTheorem.html) in that i 
need
>> to arrange x number of circles along a circular path, making sure 
they

>> all touch their two neighbors. In this way, the path's radius is NOT
>> given, but is rather made up from the sum of all the circles'
diametres.
>>
>> I've boiled the problem down to this: I have a line of x length 
with y
>> number of segments of nonuniform length. I know the final length 
of the

>> line because i know the length of each individual segment.
>>
>> Now, i need to "bend" this line so that the end of the final segment
>> touches on the beginning of the first one. As such, each segment must
be
>> given an angle somehow based on the overall amount of segments and
their
>> individual lengths.
>>
>> Beyond this, i'm stumped. I've been pouring over mathworld and google
>> looking for such bendyness, and i've come up empty handed.
>>
>> Anyone have suggestions, possible solutions?
>>
>> Thanks,
>>
>> - A
>> ___
>> [email protected]
>> To change your subscription options or search the archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Adobe Consulting and Training
>> http://www.figleaf.com
>> http://training.figleaf.com
>>
> ___
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] a question of geometry

2006-09-17 Thread Alias™

And does the number of circles vary? Will it always be the same number?

On 17/09/06, Andreas R <[EMAIL PROTECTED]> wrote:


The circles can be any size.

Alias™ wrote:
> Ok, are the circles all the same size, or do they have the same length?
>
> Alias
>
> On 17/09/06, Andreas R <[EMAIL PROTECTED]> wrote:
>>
>> smart people, help a less smart one out:
>>
>> I'm faced with a problem similar to the seven circles theorem
>> (http://mathworld.wolfram.com/SevenCirclesTheorem.html) in that i need
>> to arrange x number of circles along a circular path, making sure they
>> all touch their two neighbors. In this way, the path's radius is NOT
>> given, but is rather made up from the sum of all the circles'
diametres.
>>
>> I've boiled the problem down to this: I have a line of x length with y
>> number of segments of nonuniform length. I know the final length of the
>> line because i know the length of each individual segment.
>>
>> Now, i need to "bend" this line so that the end of the final segment
>> touches on the beginning of the first one. As such, each segment must
be
>> given an angle somehow based on the overall amount of segments and
their
>> individual lengths.
>>
>> Beyond this, i'm stumped. I've been pouring over mathworld and google
>> looking for such bendyness, and i've come up empty handed.
>>
>> Anyone have suggestions, possible solutions?
>>
>> Thanks,
>>
>> - A
>> ___
>> [email protected]
>> To change your subscription options or search the archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Adobe Consulting and Training
>> http://www.figleaf.com
>> http://training.figleaf.com
>>
> ___
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] a question of geometry

2006-09-17 Thread Andreas R

The circles can be any size.

Alias™ wrote:

Ok, are the circles all the same size, or do they have the same length?

Alias

On 17/09/06, Andreas R <[EMAIL PROTECTED]> wrote:


smart people, help a less smart one out:

I'm faced with a problem similar to the seven circles theorem
(http://mathworld.wolfram.com/SevenCirclesTheorem.html) in that i need
to arrange x number of circles along a circular path, making sure they
all touch their two neighbors. In this way, the path's radius is NOT
given, but is rather made up from the sum of all the circles' diametres.

I've boiled the problem down to this: I have a line of x length with y
number of segments of nonuniform length. I know the final length of the
line because i know the length of each individual segment.

Now, i need to "bend" this line so that the end of the final segment
touches on the beginning of the first one. As such, each segment must be
given an angle somehow based on the overall amount of segments and their
individual lengths.

Beyond this, i'm stumped. I've been pouring over mathworld and google
looking for such bendyness, and i've come up empty handed.

Anyone have suggestions, possible solutions?

Thanks,

- A
___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] a question of geometry

2006-09-17 Thread Alias™

Ok, are the circles all the same size, or do they have the same length?

Alias

On 17/09/06, Andreas R <[EMAIL PROTECTED]> wrote:


smart people, help a less smart one out:

I'm faced with a problem similar to the seven circles theorem
(http://mathworld.wolfram.com/SevenCirclesTheorem.html) in that i need
to arrange x number of circles along a circular path, making sure they
all touch their two neighbors. In this way, the path's radius is NOT
given, but is rather made up from the sum of all the circles' diametres.

I've boiled the problem down to this: I have a line of x length with y
number of segments of nonuniform length. I know the final length of the
line because i know the length of each individual segment.

Now, i need to "bend" this line so that the end of the final segment
touches on the beginning of the first one. As such, each segment must be
given an angle somehow based on the overall amount of segments and their
individual lengths.

Beyond this, i'm stumped. I've been pouring over mathworld and google
looking for such bendyness, and i've come up empty handed.

Anyone have suggestions, possible solutions?

Thanks,

- A
___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com