![](/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) |
On 19 Nov 1999 13:22:23 -0500, ing### [at] home nl (ingo) wrote:
>Peter Popov wrote:
>
>>On 19 Nov 1999 05:08:04 -0500, ing### [at] home nl (ingo) wrote:
>>
>>Will you please explain how you will animate this? Will you change the
>>11*clock?
>
>11*clock.
>
>Ingo
Okay, I'll try to put up a #while loop to do it.
Peter Popov
ICQ: 15002700
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) |
ingo wrote:
>
> Peter Popov wrote:
>
> >On Fri, 19 Nov 1999 17:19:44 +0100, Remco de Korte
> ><rem### [at] xs4all nl> wrote:
> >
> >>I don't know if I understand your method exactly but I did a similar
> >>thing with a reasonable result using sin/cos-functions. ........
> >
> >But will this keep the distance between two consequitive spheres
> >constant? I don't think so, and unless your fish is made of natural
> >rubber, it's gonna hurt big time :)
>
> Exactly the reason why I don't want to use the sin / cos method.
>
> Ingo
>
> --
> Photography: http://members.home.nl/ingoogni/
> Pov-Ray : http://members.home.nl/seed7/
How much stress will that cause?
And you're not telling me that you've never had to stretch while moving
haven't you?
Anyway, it's probably bad physics for a robot, but it works (for me) in
an image.
If the distance between sphere's really would be the problem you could
easily change your calculations to provide for that. That wouldn't
change the fact that if you had a really 3D-body there still would be
some stretching (inside vs outside of curve).
Remco
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) |
>How much stress will that cause?
>And you're not telling me that you've never had to stretch while moving
>haven't you?
>Anyway, it's probably bad physics for a robot, but it works (for me) in
>an image.
That's true, but it's like YKYHBRTLW You create a motor using every part
..... even the ones that don't show ..... just for authenticity.
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
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) |
On 19 Nov 1999 13:22:23 -0500, ing### [at] home nl (ingo) wrote:
>Peter Popov wrote:
>
>>On 19 Nov 1999 05:08:04 -0500, ing### [at] home nl (ingo) wrote:
>>
>>Will you please explain how you will animate this? Will you change the
>>11*clock?
>
>11*clock.
>
>Ingo
//try this
#declare Pos=array[11]
#declare i=0;
#while (i<11) #declare Pos[i]=<i,0,0>; #declare i=i+1; #end
#declare i=1;
#while (i<11)
#declare Pos[i]=vrotate((Pos[i]-Pos[i-1]),<0,0,10*clock>)+Pos[i-1];
#declare i=i+1;
#end
Peter Popov
ICQ: 15002700
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) |
Peter Popov wrote:
>//try this
>
>#declare Pos=array[11]
>
>#declare i=0;
>#while (i<11) #declare Pos[i]=<i,0,0>; #declare i=i+1; #end
>
>#declare i=1;
>#while (i<11)
> #declare Pos[i]=vrotate((Pos[i]-Pos[i-1]),<0,0,10*clock>)+Pos[i-1];
> #declare i=i+1;
>#end
No, I'm afraid that's not what I'm looking for. What I expected to see is
the spheres arranged in a arc, about one quarter of a circle.
mmm, all spheres end up on a circle, the length of the arcsegment between
two spheres is known (1 in this case). The angle between the two vectors
circle will always go through the origin, where the first sphere is.
With this, I think the radius and centerposition of the circle can be
calculated. Once this circle is known, take the distance frome any sphere
on the x-axis to the origin. Take an arcsegment of the circle with the same
length and put the sphere there.
Would it work? I'll sleep over this and try if I can figure it out
tomorrow.
Thanks Peter for your effort.
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
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) |
On 19 Nov 1999 17:52:36 -0500, ing### [at] home nl (ingo) wrote:
>No, I'm afraid that's not what I'm looking for. What I expected to see is
>the spheres arranged in a arc, about one quarter of a circle.
>
>mmm, all spheres end up on a circle, the length of the arcsegment between
>two spheres is known (1 in this case). The angle between the two vectors
>circle will always go through the origin, where the first sphere is.
>With this, I think the radius and centerposition of the circle can be
>calculated. Once this circle is known, take the distance frome any sphere
>on the x-axis to the origin. Take an arcsegment of the circle with the same
>length and put the sphere there.
>Would it work? I'll sleep over this and try if I can figure it out
>tomorrow.
>
>Thanks Peter for your effort.
>
>Ingo
I got your intentions wrong. This should do what you want, as
described in your original post.
#declare Pos=array[11]
#declare i=0;
#while (i<11) #declare Pos[i]=<i,0,0>; #declare i=i+1; #end
#declare i=0;
#while (i<10)
#declare j=i+1;
#while (j<11)
#declare Pos[i]=
vrotate((Pos[j]-Pos[i]),<0,0,10*clock>)+Pos[i];
#declare j=j+1;
#end
#declare i=i+1;
#end
If it doesn't, I'll look at it tomorrow.
Peter Popov
ICQ: 15002700
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) |
ingo wrote:
>
> >How much stress will that cause?
> >And you're not telling me that you've never had to stretch while
> moving
> >haven't you?
> >Anyway, it's probably bad physics for a robot, but it works (for me)
> in
> >an image.
>
> That's true, but it's like YKYHBRTLW You create a motor using every
> part
> ..... even the ones that don't show ..... just for authenticity.
>
> Ingo
>
> --
> Photography: http://members.home.nl/ingoogni/
> Pov-Ray : http://members.home.nl/seed7/
I was obviously missing the point.
I would suggest a recursive macro.
Remco
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) |
Peter Popov wrote:
>I got your intentions wrong. This should do what you want, as
>described in your original post.
>
>#declare Pos=array[11]
>
>#declare i=0;
>#while (i<11) #declare Pos[i]=<i,0,0>; #declare i=i+1; #end
>
>#declare i=0;
>#while (i<10)
> #declare j=i+1;
> #while (j<11)
> #declare Pos[i]=
> vrotate((Pos[j]-Pos[i]),<0,0,10*clock>)+Pos[i];
> #declare j=j+1;
> #end
> #declare i=i+1;
>#end
Sorry but no, ten spheres end up at <10,0.9,0> and one at <10,0,0>.
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
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) |
I think there is a more serious problem with the sin cos solution.
The sin cos solution prevents non unique positions along the x axis. Many
kinds of aquatic animals, maybe some fish, would bend their bodies around so
much that there might be two points of the body at some given x.
Remco de Korte wrote:
> ingo wrote:
> >
> > I'm trying to animate the tail of an ASCII-fish. I figured out how to
> > do it
> > the long way but I'm looking for a short cut.
> >
> > Concider eleven spheres on a string from the origin to <10,0>.
> > around the current position of the second sphere.
> > 3. leave the first and second sphere in its position. rotate the whole
> > .
> > .
> > .
> > tenth
> > sphere.
> >
> > Now, is there a direct way to calculate the position of a sphere,
> > without
> > going through the above loop. What will the position of sphere 7 be
> > when
> >
> > Ingo
> >
> > --
> > Photography: http://members.home.nl/ingoogni/
> > Pov-Ray : http://members.home.nl/seed7/
>
> I don't know if I understand your method exactly but I did a similar
> thing with a reasonable result using sin/cos-functions. This gives a
> nice curve. The position of each sphere is based on its place in the
> string _plus_ a clock value. This way the first sphere will move also.
> This is easy to avoid by moving the whole string relative to the
> translation of this first sphere. Sounds far more complicated then it
> actually is 8)
>
> Groeten!
>
> Remco
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) |
ingo wrote:
>mmm, all spheres end up on a circle, the length of the arcsegment
>between two spheres is known (1 in this case)........
Got it, I think:
#declare Pos=array[11]
#declare i=0;
#while (i<11)
#declare Pos[i]=<i,0,0>;
#declare i=i+1;
#end
#declare Angle = radians(10*clock);
#declare Length = Pos[1].x-Pos[0].x;
#declare Radius = Length/Angle;
#declare Lcord = (Radius/sin(0.5*pi-(Angle/2)))*sin(Angle);
#declare Ccenter = <-0.5*Lcord, Radius, 0>;
#declare i=0;
#while (i<11)
#if (Pos[i].x=0)
// do nothing
#else
#declare L= Pos[i].x;
#declare Alpha= L/Radius;
#declare Pos[i]=
(vrotate(<0,-radius,0>,<0,0,degrees(Alpha)>))+Ccenter;
#end
#declare i=i+1;
#end
#declare i=0;
#while (i<11)
sphere{ Pos[i],0.2 pigment {rgb <1,0,0>}}
#declare i=i+1;
#end
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
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) |