Question: how to get the result of points in the 4 matrixs in the txt file?

restart;
with( plots ):
P := Array(1..51);
P1 := Array(1..51);
P2 := Array(1..51);
P3 := Array(1..51);
R := proc (s) options operator, arrow; 0.6e-1*(arctan(10*s/1.3-3.0)/Pi+1/2) end proc;
y := proc (s) options operator, arrow; evalf((-1)*0.6e-1*(arctan(10*s/1.3-3.0)/Pi+1/2)*cos(6*Pi*s/1.3)) end proc;
z := proc (s) options operator, arrow; evalf(0.6e-1*(arctan(10*s/1.3-3.0)/Pi+1/2)*sin(6*Pi*s/1.3)) end proc;
f := unapply( simplify(sqrt(1-((6*Pi/(2.6)*0.6e-1)*R(s))^2-(D(R))(s)^2)), s ):
for i from 1 to 51 do
  X := evalf(Int(f(s), s = 0 .. 0.26e-1*i));
  Y := y(0.26e-1*i);
  Z := z(0.26e-1*i);
  P[i] := [X,Y,Z];
  P1[i] := [X,
            Y+0.2e-1*Y/(Y^2+Z^2)^(1/2),
            Z+0.2e-1*Z/(Y^2+Z^2)^(1/2)];
  P2[i] := [X,
            evalf(Y+0.2e-1*Y*cos(2*Pi*1/3)/(Y^2+Z^2)^(1/2)-0.2e-1*Z*sin(2*Pi*1/3)/(Y^2+Z^2)^(1/2)),
            evalf(Z+0.2e-1*Y*sin(2*Pi*1/3)/(Y^2+Z^2)^(1/2)+0.2e-1*Z*cos(2*Pi*1/3)/(Y^2+Z^2)^(1/2))];
  P3[i] := [X,
            evalf(Y+0.2e-1*Y*cos(2*Pi*1/3)/(Y^2+Z^2)^(1/2)+0.2e-1*Z*sin(2*Pi*1/3)/(Y^2+Z^2)^(1/2)),
            evalf(Z-0.2e-1*Y*sin(2*Pi*1/3)/(Y^2+Z^2)^(1/2)+0.2e-1*Z*cos(2*Pi*1/3)/(Y^2+Z^2)^(1/2))];
end do:

display(
  [pointplot3d( P , color=red ),
   pointplot3d( P1, color=blue ),
   pointplot3d( P2, color=gold ),
   pointplot3d( P3, color=magenta )],
  axes=BOXED
);
 

I can get get the result of  points in the 4 matrixs,but  how to output the result in the txt file!

Need the help from somone!

Thank you!

 

     liu

 

 

 

Please Wait...