You are not logged in.
Pages: 1
------------
---------
----------
-------
Last edited by luca-deltodesco (2009-03-26 04:43:52)
The Beginning Of All Things To End.
The End Of All Things To Come.
Offline
Also the following code:
Matrix2x2 An(int n)
{
Real tn = t[n];
return Matrix2x2(cos(tn),-sin(tn),sin(tn),cos(tn));
}
Matrix2x2 Bn(int n)
{
Real tn = t[n];
return Matrix2x2(-sin(tn),-cos(tn),cos(tn),-sin(tn))*w[n];
}
Vector2 sn(int n)
{
Real tn = t[n];
return Vector2(cos(tn),sin(tn))*r[n];
}
Vector2 vn(int n)
{
Real tn = t[n];
return Vector2(-sin(tn),cos(tn))*r[n]*w[n];
}
//iterative methods:
Vector2 snr(int n, int k)
{
if(n==k) return Vector2(0,0);
return sn(k+1) + An(k+1)*snr(n,k+1);
}
Vector2 vnr(int n, int k)
{
if(n==k) return Vector2(0,0);
return vn(k+1) + An(k+1)*vnr(a,k+1) + Vn(k+1)*snr(a,k+1);
}
Vector2 sn0(int n)
{
return snr(n,0);
}
Vector2 vn0(int n)
{
return vnr(n,0);
}
//formula methods
Vector2 sn0eq(int n)
{
if(n==0) return Vector2(0,0);
Vector ret (0,0);
for(int i = 1; i<=n; i++)
{
Matrix2x2 mat (1,0,0,1);
for(int j = 0; j<=i-1; j++)
mat *= An(j);
ret += mat*sn(i);
}
return ret;
}
Vector2 vn0eq(int n)
{
if(n==0) return Vector2(0,0);
Vector ret (0,0);
for(int i = 1; i<=n; i++)
{
Matrix2x2 mat (1,0,0,1);
for(int j = 0; j<=i-1; j++)
mat *= An(j);
ret += mat*vn(i);
}
for(int i = 2; i<=n; i++)
{
Matrix2x2 mat (0,0,0,0);
for(int j = 1; j<=i-1; j++)
{
Matrix2x2 matsub (1,0,0,1);
for(int k = 1; k<=j-1; k++)
matsub *= An(k);
matsub *= Bn(j);
for(int k = j+1; k<=i-1; k++)
matsub *= An(k);
mat += matsub;
}
ret += mat*sn(i);
}
return ret;
}
The Beginning Of All Things To End.
The End Of All Things To Come.
Offline
Reminds me of my little flash thing: Spiral Artist but you have taken that idea much further.
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
Offline
Yes, that is precisely what i'm doing; only here i'm finding the position of those little circles at a time t, and also the velocity of any of those circles at time t
The Beginning Of All Things To End.
The End Of All Things To Come.
Offline
So ... there are some interesting tie-ins here. The circles can produce spirals such as the Cardioid (needs 2 circles), and so you should be able to figure the position and velocity along the cardioid.
"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman
Offline
Actually, upon further investigation, mine is not quite the same as yours, in yours to form the cardioid you need to have the second circle having a speed 2x greater, whereas in mine it needs to have the same speed:
In yours the circles rotate in themselves, and it is the position of the circle that is rotating with the previous circle.
In mine, the circle itself rotates, but it is the entire circle (and all it's children) that is rotating with the previous circle.
The Beginning Of All Things To End.
The End Of All Things To Come.
Offline
Can I download somewhere the spiral artist,because the next month we are hving a SCIENCE EXHIBITION,and I'm in the math ector and I thought very interesting to show the spiral artist to other people who come to visit us???
Se Zoti vete e tha me goje,se kombet shuhen permbi dhe,por SHqiperia do te roje,per te,per te luftojme ne.
God said that all nation exincts on the ground,but Albania will survive,for it,for it we are fighting.
Offline
Pages: 1