![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Okay, this note may get a little complicated so forgive me if I confuse you.
I have written a macro that makes stacks of rings of spheres as seen in the
attached image. The macro adjusts the radius of the spheres in a ring
dependant on the radius of the ring because I wanted to make sure that all
spheres are tangential (touching each other at a tangent).
Now, what I would like to do is at the top of the "cylinder of spheres" is
start to make the rings, but so that every stack of it fits the profile i
have drawn in. Figuring out what the radius of the ring should be and the y
value of the ring is very difficult for me--especially since the sphere's
radius changes as the ring's radius gets smaller. I have attempted to
figure this out and in the second attached image you can see my initial
approach.
Initially I have thought to define a "path" for the profile by a polynomial
equation. I would then input an x-coordinate value into the function with
the equation and I would get a y-coordinate as an output. The problem is
that when you actually go and make this a macro, how can I determine the
change in the x value so it will give me the correct y value and STILL have
the sphere be tangential? In other words how do I determine the
x-coordinate to input into the function that gives me the appropriate y
value? Well I imagined that the change in x could be (as shown in the
diagram):
radius1*(sin theta1) + radius2(sin theta2)
I have figured out how to determine the radius for each sphere of any ring
size, but I simply can not figure out how to determine the "thetas" of which
to use for my equation. Am I way off? Is there an easier way to do this?
F. Audet has put up his Apple code which does something similar, and I have
looked at it, but I am trying to understand how I can figure the math so
that I can become more adept at making what I want. Thanks for your time
and help I appreciate it a great deal since it has helped me realize the
images I see in my head :)
Arie
Post a reply to this message
Attachments:
Download 'pathSpheres.jpg' (43 KB)
Download 'cylinderSpheres.jpg' (63 KB)
Preview of image 'pathSpheres.jpg'
![pathSpheres.jpg](/povray.binaries.images/attachment/%3C3bd2d492%40news.povray.org%3E/pathSpheres.jpg?ttop=443840&toff=10250&preview=1)
Preview of image 'cylinderSpheres.jpg'
![cylinderSpheres.jpg](/povray.binaries.images/attachment/%3C3bd2d492%40news.povray.org%3E/cylinderSpheres.jpg?ttop=443840&toff=10250&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Arie L Stavchansky
Subject: Re: Path with sphere attached. . . [MORE PROGRESS]
Date: 21 Oct 2001 13:51:47
Message: <3bd30b33@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
While muddling around, I have come up with this. You can start see the
effect I am after, but this is truly a linear inclination. I am looking to
acheive a curved inclination all the while my spheres remain tangential. I
just can't get enough of this stuff.
Arie
"Arie L. Stavchansky" <ari### [at] bellatlantic net> wrote in message
news:3bd2d492@news.povray.org...
> Okay, this note may get a little complicated so forgive me if I confuse
you.
>
> I have written a macro that makes stacks of rings of spheres as seen in
the
> attached image. The macro adjusts the radius of the spheres in a ring
> dependant on the radius of the ring because I wanted to make sure that all
> spheres are tangential (touching each other at a tangent).
>
> Now, what I would like to do is at the top of the "cylinder of spheres" is
> start to make the rings, but so that every stack of it fits the profile i
> have drawn in. Figuring out what the radius of the ring should be and the
y
> value of the ring is very difficult for me--especially since the sphere's
> radius changes as the ring's radius gets smaller. I have attempted to
> figure this out and in the second attached image you can see my initial
> approach.
>
> Initially I have thought to define a "path" for the profile by a
polynomial
> equation. I would then input an x-coordinate value into the function with
> the equation and I would get a y-coordinate as an output. The problem is
> that when you actually go and make this a macro, how can I determine the
> change in the x value so it will give me the correct y value and STILL
have
> the sphere be tangential? In other words how do I determine the
> x-coordinate to input into the function that gives me the appropriate y
> value? Well I imagined that the change in x could be (as shown in the
> diagram):
>
> radius1*(sin theta1) + radius2(sin theta2)
>
> I have figured out how to determine the radius for each sphere of any ring
> size, but I simply can not figure out how to determine the "thetas" of
which
> to use for my equation. Am I way off? Is there an easier way to do this?
>
> F. Audet has put up his Apple code which does something similar, and I
have
> looked at it, but I am trying to understand how I can figure the math so
> that I can become more adept at making what I want. Thanks for your time
> and help I appreciate it a great deal since it has helped me realize the
> images I see in my head :)
>
> Arie
>
>
>
Post a reply to this message
Attachments:
Download 'capTop.jpg' (81 KB)
Download 'capPersp.jpg' (43 KB)
Preview of image 'capTop.jpg'
![capTop.jpg](/povray.binaries.images/attachment/%3C3bd30b33%40news.povray.org%3E/capTop.jpg?ttop=443840&toff=10250&preview=1)
Preview of image 'capPersp.jpg'
![capPersp.jpg](/povray.binaries.images/attachment/%3C3bd30b33%40news.povray.org%3E/capPersp.jpg?ttop=443840&toff=10250&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> While muddling around, I have come up with this. You can start see the
> effect I am after, but this is truly a linear inclination. I am looking to
> acheive a curved inclination all the while my spheres remain tangential. I
> just can't get enough of this stuff.
>
> Arie
Hello Arie ! Pretty nicely done job, even if the goal you want to reach
is a curved profile. I find it very cool the way each sphere is tangantial
to each others... My macro don't work that perfectly.
(I posted another one. It is called dancer!)
Alex P
have a look at: ( some sphere modeling techniques stuff...)
http://astronomy.swin.edu.au/pbourke/modelling/spheremodel/
http://astronomy.swin.edu.au/pbourke/curves/classical/
Post a reply to this message
Attachments:
Download 'us-ascii' (2 KB)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thanks you Alex! This is an excellent resource. I appreciate it :)
Arie
"F.Audet" <flo### [at] sympatico ca> wrote in message
news:3BD### [at] sympatico ca...
While muddling around, I have come up with this. You can start see the
effect I am after, but this is truly a linear inclination. I am looking to
acheive a curved inclination all the while my spheres remain tangential. I
just can't get enough of this stuff.
Arie
Hello Arie ! Pretty nicely done job, even if the goal you want to reach
is a curved profile. I find it very cool the way each sphere is tangantial
to each others... My macro don't work that perfectly.
(I posted another one. It is called dancer!)
Alex P
have a look at: ( some sphere modeling techniques stuff...)
http://astronomy.swin.edu.au/pbourke/modelling/spheremodel/
http://astronomy.swin.edu.au/pbourke/curves/classical/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Thanks you Alex! This is an excellent resource. I appreciate it :)
>
> Arie
Oups, I read the other post before !!
Alex
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Wasn't it Arie L. Stavchansky who wrote:
>Okay, this note may get a little complicated so forgive me if I confuse you.
>
>I have written a macro that makes stacks of rings of spheres as seen in the
>attached image. The macro adjusts the radius of the spheres in a ring
>dependant on the radius of the ring because I wanted to make sure that all
>spheres are tangential (touching each other at a tangent).
>
>Now, what I would like to do is at the top of the "cylinder of spheres" is
>start to make the rings, but so that every stack of it fits the profile i
>have drawn in. Figuring out what the radius of the ring should be and the y
>value of the ring is very difficult for me--especially since the sphere's
>radius changes as the ring's radius gets smaller. I have attempted to
>figure this out and in the second attached image you can see my initial
>approach.
>
>Initially I have thought to define a "path" for the profile by a polynomial
>equation. I would then input an x-coordinate value into the function with
>the equation and I would get a y-coordinate as an output. The problem is
>that when you actually go and make this a macro, how can I determine the
>change in the x value so it will give me the correct y value and STILL have
>the sphere be tangential? In other words how do I determine the
>x-coordinate to input into the function that gives me the appropriate y
>value? Well I imagined that the change in x could be (as shown in the
>diagram):
>
>radius1*(sin theta1) + radius2(sin theta2)
>
>I have figured out how to determine the radius for each sphere of any ring
>size, but I simply can not figure out how to determine the "thetas" of which
>to use for my equation. Am I way off? Is there an easier way to do this?
>
>F. Audet has put up his Apple code which does something similar, and I have
>looked at it, but I am trying to understand how I can figure the math so
>that I can become more adept at making what I want. Thanks for your time
>and help I appreciate it a great deal since it has helped me realize the
>images I see in my head :)
I think it gets rather messy, but here are a few pointers:-
Firstly, note that the green lines in your diagram are parallel, so
theta1 and theta2 are equal. So
1. x = (r1 + r2)*sin theta
Now consider the ratio of r2 to r1. Because there are the same number of
spheres in each ring, the size of the spheres decreases by the same
ratio as the radius of the ring. Call the radius of the first ring "R",
then
2. r2/r1 = (R-x)/R
The polynomial path that you are trying to follow provides the
relationship between y and x
3. y = p(x)
And we can see that
4. tan theta = x/y
The values of r1 and R are known, so we now have a system of four
simultaneous equations involving four unknowns (x, y, r2, theta).
Reducing these gives (if my algebra is correct)
5. x = (r1 + (R - x)/(R * r1)) * sin(atan(x/p(x))
That's a horribly messy equation, but the only unknown in there is x, so
it should be soluble. The method of solution may well depend on the
nature of p(x). Good luck!
Once you've calculated x, obtain y from #3, r2 from #2, and theta (not
that you need it) from #4.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Arie L Stavchansky
Subject: Re: Path with sphere attached. . .
Date: 22 Oct 2001 10:54:03
Message: <3bd4330b@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thank you Mike. I have been messing around and thinking about you tips. I
think I'm almost there :)
Take a look
Arie
Post a reply to this message
Attachments:
Download 'sphereBowl.jpg' (24 KB)
Preview of image 'sphereBowl.jpg'
![sphereBowl.jpg](/povray.binaries.images/attachment/%3C3bd4330b%40news.povray.org%3E/sphereBowl.jpg?ttop=443840&toff=10250&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi Mike,
I have been looking at your equations and am confused on equation number
5. x = (r1 + (R - x)/(R * r1)) * sin(atan(x/p(x))
How can you define x with x in the right side of the equation?
Thanks,
Arie
"Mike Williams" <mik### [at] nospam please> wrote in message
news:5og### [at] econym demon co uk...
> Wasn't it Arie L. Stavchansky who wrote:
> >Okay, this note may get a little complicated so forgive me if I confuse
you.
> >
> >I have written a macro that makes stacks of rings of spheres as seen in
the
> >attached image. The macro adjusts the radius of the spheres in a ring
> >dependant on the radius of the ring because I wanted to make sure that
all
> >spheres are tangential (touching each other at a tangent).
> >
> >Now, what I would like to do is at the top of the "cylinder of spheres"
is
> >start to make the rings, but so that every stack of it fits the profile i
> >have drawn in. Figuring out what the radius of the ring should be and
the y
> >value of the ring is very difficult for me--especially since the sphere's
> >radius changes as the ring's radius gets smaller. I have attempted to
> >figure this out and in the second attached image you can see my initial
> >approach.
> >
> >Initially I have thought to define a "path" for the profile by a
polynomial
> >equation. I would then input an x-coordinate value into the function
with
> >the equation and I would get a y-coordinate as an output. The problem is
> >that when you actually go and make this a macro, how can I determine the
> >change in the x value so it will give me the correct y value and STILL
have
> >the sphere be tangential? In other words how do I determine the
> >x-coordinate to input into the function that gives me the appropriate y
> >value? Well I imagined that the change in x could be (as shown in the
> >diagram):
> >
> >radius1*(sin theta1) + radius2(sin theta2)
> >
> >I have figured out how to determine the radius for each sphere of any
ring
> >size, but I simply can not figure out how to determine the "thetas" of
which
> >to use for my equation. Am I way off? Is there an easier way to do
this?
> >
> >F. Audet has put up his Apple code which does something similar, and I
have
> >looked at it, but I am trying to understand how I can figure the math so
> >that I can become more adept at making what I want. Thanks for your time
> >and help I appreciate it a great deal since it has helped me realize the
> >images I see in my head :)
>
> I think it gets rather messy, but here are a few pointers:-
>
> Firstly, note that the green lines in your diagram are parallel, so
> theta1 and theta2 are equal. So
>
> 1. x = (r1 + r2)*sin theta
>
> Now consider the ratio of r2 to r1. Because there are the same number of
> spheres in each ring, the size of the spheres decreases by the same
> ratio as the radius of the ring. Call the radius of the first ring "R",
> then
>
> 2. r2/r1 = (R-x)/R
>
> The polynomial path that you are trying to follow provides the
> relationship between y and x
>
> 3. y = p(x)
>
> And we can see that
>
> 4. tan theta = x/y
>
> The values of r1 and R are known, so we now have a system of four
> simultaneous equations involving four unknowns (x, y, r2, theta).
> Reducing these gives (if my algebra is correct)
>
> 5. x = (r1 + (R - x)/(R * r1)) * sin(atan(x/p(x))
>
> That's a horribly messy equation, but the only unknown in there is x, so
> it should be soluble. The method of solution may well depend on the
> nature of p(x). Good luck!
>
> Once you've calculated x, obtain y from #3, r2 from #2, and theta (not
> that you need it) from #4.
>
> --
> Mike Williams
> Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Wasn't it Arie L. Stavchansky who wrote:
>Hi Mike,
>
>I have been looking at your equations and am confused on equation number
>
>5. x = (r1 + (R - x)/(R * r1)) * sin(atan(x/p(x))
>
>How can you define x with x in the right side of the equation?
That's the problem. That's what you get if you reduce the simultaneous
equations. I can't do any better it without knowing p(x).
Does it help if I rearrange it like this?
5a. x - (r1 + (R - x)/(R * r1)) * sin(atan(x/p(x)) = 0
Even if someone tells me what p(x) is, it's still going to be horrible
to solve for x. I'd be inclined to use some sort of numerical method to
obtain an approximation.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Arie L. Stavchansky" wrote:
>
> Hi Mike,
>
> I have been looking at your equations and am confused on equation number
>
> 5. x = (r1 + (R - x)/(R * r1)) * sin(atan(x/p(x))
Like if you say:
2*x + 1 = x
Now if you rearrange then you'll get:
2*x - x + 1 = 0 => x + 1 = 0 => x = -1
So he probably meant that you should
solve this equation with respect to x:
(r1 + (R - x)/R/r1)*sin(atan(x/p(x))) - x = 0
Unfortunately; I suspect that it is rather non-
trivial to find analytical solutions for it
(especially with higher degrees of your polynome).
Tor Olav
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |