2014 dxdy logo

Научный форум dxdy

Математика, Физика, Computer Science, Machine Learning, LaTeX, Механика и Техника, Химия,
Биология и Медицина, Экономика и Финансовая Математика, Гуманитарные науки




На страницу Пред.  1 ... 9, 10, 11, 12, 13, 14  След.
 
 Re: Моделирование преобразования кривой...
Сообщение05.04.2010, 21:33 
Yu_K в сообщении #306628 писал(а):
У меня здесь нет возможности посмотреть. vvvv, можете показать картинки.


Вот каринка АКМ. Правда интересно посмотреть в динамике.
Изображение

 
 
 
 Re: Моделирование преобразования кривой...
Сообщение05.04.2010, 21:42 
AKM в сообщении #301328 писал(а):
Вычислительный смысл задачи может быть ещё и в том, чтобы хранить новые данные в виде приращений к данным предыдущего шага, и перевычислять не только координаты, но и приращения. Т.е. блок данных для каждой точки должен состоять из...
AKM,
а почему ты всё же работаешь с координатами, а не с приращениями, как сам же и предлагал?

 
 
 
 Re: Моделирование преобразования кривой...
Сообщение05.04.2010, 21:44 
Вот последняя картинка АКМ
Изображение

-- Пн апр 05, 2010 22:45:22 --

 
 
 
 Re: Моделирование преобразования кривой...
Сообщение05.04.2010, 21:50 
Аватара пользователя
Алексей К.,
a не помогли приращения. В Мапле делать надо. Или как-то по-умному. Вот автор темы что-то там ковыряет, наверное, расскажет однажды.

-- Пн апр 05, 2010 22:52:55 --

vvvv, и цитату тоже поправили бы в предпоследнем сообщении. Наверное, откушен закрывающий тэг.

 
 
 
 Re: Моделирование преобразования кривой...
Сообщение05.04.2010, 22:04 
Цитата:
Тупо провожу ориентированную окружность через соседние 3 точки, использую её кривизну и нормаль в средней точке. Нормаль будет кажется $$ \arg(z_2-z_1)+\arg(z_3-z_2)-\arg(z_3-z_1)+\frac\pi2 $$(т.е. касательная + 90).


А я кривизну считал по определению: угол между отрезками ломанной делил на длину двух отрезков ломанной.
Или записывал уравнение преобразованной кривой (первой).Теперь нужно организовать цикл или рекурсию.

 
 
 
 Re: Моделирование преобразования кривой...
Сообщение05.04.2010, 23:00 
Аватара пользователя
vvvv в сообщении #306681 писал(а):
А я кривизну считал по определению: угол между отрезками ломанной делил на длину двух отрезков ломанной.
Это не есть "по определению". Если Вы имеете в виду $k\stackrel{def}=\lim\limits_{\Delta s \to 0} \dfrac{\Delta\tau}{\Delta s}$, то там нет двух отрезков. И такую кривизну естественно приписать точке $z(s+\Delta s/2)$. Возьмём $\Delta s <0$, получим другую кривизну ("левую"). Из левой $k\left(s-\frac{|\Delta s|}2\right)$ и правой $k\left(s+\frac{|\Delta s|}2\right)$ делается нужная. Так что уточняйте свои определения. А при Digits:=50 и тысяче точек всё это, естественно, по барабану.

\color{red}\fbox{\color{black}А хаос с цитатами, замечу, у Вас только усиливается.} Кнопка Изображение к Вашим услугам.

 
 
 
 Re: Моделирование преобразования кривой...
Сообщение05.04.2010, 23:32 
А какую кнопку мне нужно нажать, чтобы разобраться какую и когда нажимать? :-)

-- Вт апр 06, 2010 00:34:17 --



-- Вт апр 06, 2010 00:34:21 --


 
 
 
 Re: Моделирование преобразования кривой...
Сообщение05.04.2010, 23:46 
Аватара пользователя
 !  Ваши шуточки неуместны. Здесь Вы чужой текст цитатой не оформили, как бы приписали себе.
Мне не жалко, но сообщение получается бестолковым, обсуждение непонятным.

 
 
 
 Re: Моделирование преобразования кривой...
Сообщение06.04.2010, 04:17 
Для кривой (трахоида), предложенной в моем предыдыщем посте получается такой мультик
http://www.youtube.com/watch?v=dLLvmWWaXS8.
Видно, что немного пропадает симметрия - из-за несимметрии аппроксимации первой производной и видна неустойчивость. Причем если взять центральные разности - то еще раньше развивается неустойчивость. Все должно по идее перейти в схлопывание двухлистной окружности (двух окружностей наложенных друг на друга).

 
 
 
 Re: Моделирование преобразования кривой...
Сообщение06.04.2010, 11:58 
Аватара пользователя
По просьбе нашего радиослушателя Yu_K передаём песню про гипотрохоиду.
код: (hypotrochoid.ps) [ скачать ] [ спрятать ]
  1. %!PS 
  2. %   Curve z(t) = R1*exp(i*w1*t) + R2*exp(-i*w2*t), as described in  
  3. %      http://www.mathcurve.com/courbes2d/hypotrochoid/hypotrochoid.shtml (see lines 251-279) 
  4. % ----- This part of code is borrowed from PS-library, presented by "Алексей К./dxdy.ru" ----- 
  5. % ----- Errors, iterations and main program (at the end) are due to         AKM/dxdy.ru  -----  
  6.  
  7. /Red  {1  0 0 setrgbcolor} bind def 
  8. /Red2 {1  0 1 setrgbcolor} bind def 
  9. /Green{0  .6 0 setrgbcolor} bind def 
  10. /Blue {0  0 1 setrgbcolor} bind def 
  11. /Black{0  0 0 setrgbcolor} bind def 
  12.  
  13. /ED {exch def} bind def 
  14.  
  15. /XYadd {% x1 y1 x2 y2  --> x1+x2 y1+y2 
  16.   3 -1 roll add 3 1 roll add exch 
  17. } bind def 
  18.  
  19. /XYsub {% x1 y1 x2 y2  --> x1-x2 y1-y2 
  20.   3 -1 roll sub neg 3 1 roll sub exch 
  21. } bind def 
  22.  
  23. /Polar {%   r phi --> x=r*cos  y=r*sin 
  24.   2 copy cos mul 3 1 roll sin mul 
  25. } bind def  
  26.  
  27. /ToPolar {% x y --> r  phi 
  28.    exch 2 copy dup mul exch dup mul add sqrt 3 1 roll 
  29.    2 index 0. eq {pop pop 0.} {atan} ifelse 
  30. } bind def 
  31.  
  32.  
  33. /Rpoint {%  Abs.Radius   (curr.point)  
  34.     gsave setlinewidth currentpoint newpath 
  35.           [] 0 setdash 1 setlinecap moveto 0 0 rlineto stroke 
  36.     grestore 
  37. } bind def 
  38.  
  39.  
  40. /Pstack {% 
  41.   count [exch dup (items on stack:) 3 -1 roll % S0 S1 ... S_n-1 [N (txt) N 
  42.       dup 3 add exch                          % S0 S1 ... S_n-1 [ i=n+3 n 
  43.       {dup index dup [ eq {pop (mark)} if exch} repeat 
  44.       pop] == flush 
  45. } bind def 
  46.  
  47. /Pdict {%  dict 
  48.   count 0 eq {currentdict} {dup type /dicttype ne {currentdict} if}ifelse {[3 1 roll]==} forall 
  49. } bind def 
  50.  
  51. /Args {%  /Title: N %                         0 1 2 3 (...) [...]  /Test 3 Args 
  52.     [ 3 1 roll        % a1 ... aN [ /T N 
  53.       dup 2 add exch  % a1 ... aN [ /T N+2 N 
  54.       {dup index dup [ eq {pop (mark)} if exch} repeat pop % 2009! 
  55.     ] == flush 
  56. } bind def 
  57.  
  58. /mm {595. mul 210. div} bind def 
  59.  
  60. /Ishow  {%   (r123) Ishow  : Prints 2-nd and next characters as index 
  61.    dup 0 1 getinterval search {%           % (rest) (1st) () true 
  62.      pop show dup stringwidth pop .6 mul   % (rest) dx 
  63.      currentpoint 4 1 roll add 3 1 roll    % xn yn (rest) 
  64.      gsave 
  65.        0 currentfont /ScaleMatrix get 0 get -.15 mul rmoveto currentpoint translate  
  66.        0.6 dup scale  0 0 moveto show  
  67.      grestore moveto  
  68.     } if 
  69. } bind def 
  70.  
  71. /XYdraw {% draw array [x y x y ...]  or --mark-- x y x y ... 
  72.    dup type /arraytype eq  
  73.    {aload length} 
  74.    {counttomark dup 2 add -1 roll pop} ifelse   
  75.    2 idiv 1 sub 3 1 roll moveto {lineto} repeat 
  76. } bind def 
  77.  
  78. /AppStr  {% <str1> <str2> appstr <str3> % borrowed from Ghostscript 
  79.     exch dup length 2 index length add string 
  80.     dup dup 4 2 roll copy 
  81.     length 4 -1 roll putinterval 
  82. }bind def 
  83.  
  84. % -------------- Iteration for one time step (AKM): 
  85. /Pstep {% k tau   --> dz ang(norm) 
  86.   90 sub exch DT mul exch 
  87. } def 
  88.  
  89. /Revers {[ exch aload length -2 4 {2 roll} for]} bind def          % [ PN ... P2 P1 
  90.  
  91. /Tstep  {% [x1 y1 x2 y2  ... xN yN] 
  92. DS exch /DS 0 def /I 0 def /DT Coeff def 
  93. /Kmax 0 def 
  94.    [ exch aload length /NN ED 
  95.      NN -2 roll 4 copy NN 4 add 4 roll           % DS [P1 PN ... P2 P1 PN 
  96.  
  97.      NN 2 idiv {%                                 % x3 y3 x2 y2 x1 y1 
  98. %/P1P2P3 6 Args  
  99.         6 copy XYsub exch atan 3 1 roll           % x3 y3 x2 y2 x1 y1 mu2 x1 y1 
  100.         6 index 6 index XYsub exch atan           % x3 y3 x2 y2 x1 y1 mu2 mu1 
  101.         2 copy sub sin 5 1 roll add 4 1 roll      % x3 y3 x2 y2 mu1+mu2 sin(rho) x1 y1  
  102.         7 index 7 index 4 2 roll XYsub            % x3 y3 x2 y2 mu1+mu2 sin(rho) x3-x1 y3-y1  
  103.         ToPolar 3 1 roll div 2 mul                % x3 y3 x2 y2 mu1+mu2 angref k 
  104.         dup abs Kmax gt {dup abs /Kmax ED} if  
  105.         3 1 roll sub                              % x3 y3 x2 y2 k tau 
  106.         3 index 3 index counttomark 4 roll        % [k2 nu2 x2 y_2 .... x3 y3 x2 y2 
  107.        } repeat pop pop pop pop 
  108.  
  109.        Ratio 0 ne {/DT 1 Kmax div dup mul Ratio mul def} if   % optionally redefine step 
  110.        counttomark 4 idiv {%                      % k_i nu_i x_i y_i 
  111.        gsave newpath Black .2 setlinewidth  
  112.             2 copy moveto 4 2 roll Pstep          % x_i y_i ds nu  
  113. %                1 index abs dup DSdraw gt {Npt mul} if DS add /DS ED  
  114.                 1 index abs dup DS gt {/DS ED}{pop} ifelse 
  115.             Polar 2 copy rlineto stroke  
  116.        grestore 
  117.        XYadd counttomark 2 roll                  %  
  118. /I I 1 add def 
  119.      } repeat 
  120. ] exch DS  add /DS ED 
  121. } def 
  122.  
  123. /RejectPT {%  [ P1 P2 P3 ... PN]  ---> [P1 ... PM] 
  124.    [ exch aload length /NN ED  /RJ false def         % RJ: previuos pt rejected 
  125.      NN -2 roll 4 copy NN 4 add 4 roll                         % [P1 PN ... P2 P1 PN 
  126.      NN 2 idiv {%                                              % x3 y3 x2 y2 x1 y1 
  127.         6 copy 3 index 3 index XYsub dup mul exch dup mul add  
  128.                       5 1 roll XYsub dup mul exch dup mul add  % ... rj1 rj2 
  129.         2 copy 0 le exch 0 le or 3 1 roll 
  130.         Reject le exch Reject le and or                        % ... ifreject 
  131.         RJ {pop false} if dup /RJ ED  
  132.         {pop pop} {pop pop 2 copy counttomark 2 roll} ifelse 
  133.      } repeat pop pop pop pop 
  134.   ] dup length 2 idiv /Npt ED 
  135. } def 
  136.  
  137. /Estep  {% [x1 y1 x2 y2  ... xN yN] 
  138.    /L 0 def /DS 99999999 def /Kmax 0 def 
  139.    [ exch aload pop 2 copy counttomark 2 roll   % [P1 PN ... P2 P1 
  140.      counttomark 6 sub 2 idiv {%                % ... x3 y3 x2 y2 x1 y1 
  141.         4 copy XYsub dup mul exch dup mul add sqrt 7 1 roll % ... DL x3 y3 x2 y2 x1 y1 
  142.         6 copy XYsub exch atan 3 1 roll           % DL x3 y3 x2 y2 x1 y1 mu2 x1 y1 
  143.         6 index 6 index XYsub exch atan           % DL x3 y3 x2 y2 x1 y1 mu2 mu1 
  144.         2 copy sub sin 5 1 roll add 4 1 roll      % DL x3 y3 x2 y2 mu1+mu2 sin(rho) x1 y1  
  145.         7 index 7 index 4 2 roll XYsub            % DL x3 y3 x2 y2 mu1+mu2 sin(rho) x3-x1 y3-y1  
  146.         ToPolar 3 1 roll div 2 mul abs dup        % DL x3 y3 x2 y2 mu1+mu2 angref |k| |k| 
  147.         9 -1 roll mul 2 div                       % x3 y3 x2 y2 mu1+mu2 angref |k| sin_phi/2 
  148.         dup 1 2 copy sub 3 1 roll add mul abs sqrt atan                       %... phi/2           
  149.         .03490658504 mul exch div L add dup /L ED % x3 y3 x2 y2 mu1+mu2 angref L 
  150.         neg 3 1 roll sub                          % x3 y3 x2 y2 -L tau 
  151.         Polar 3 index 3 index XYadd               % x3 y3 x2 y2 x2new y2new 
  152.         gsave newpath .2 setlinewidth  
  153.              4 copy 4 2 roll moveto lineto stroke  
  154.         grestore 
  155.         counttomark 2 roll                        % [P2' P1' ... P3 P2 
  156.        } repeat pop pop pop pop 
  157. } bind def 
  158.  
  159. /Counter {% 
  160.   Nsteps 6 string cvs ( / ) AppStr  N 6 string cvs AppStr 
  161.   Rmin 0 gt {(, Rmin = ) AppStr Rmin 16 string cvs AppStr} if  
  162.   Reject 0 gt {(, Npt = ) AppStr Npt 6 string cvs AppStr} if  
  163.   -275 310 moveto  
  164.   gsave 1 setgray -2 -4 rmoveto currentpoint 2 index stringwidth pop 30 add 28 rectfill grestore  
  165.   show 
  166. } def 
  167.  
  168. /MakePage {% 
  169. /Npage Npage 1 add def /Nsteps 0 def  
  170. save exch   
  171.    begin 
  172.      currentdict /Data0 known not {% 
  173.        w1 0 eq  {/w1 1 def} if 
  174.        /dt 360 Npt div def 
  175.        /dt2 dt 2. div def 
  176.        /Data0 [ 
  177.           0 dt 360 dt2 sub {dup w1 mul R1 exch Polar 3 -1 roll w2 mul neg R2 exch Polar XYadd} for  
  178.        ] def 
  179.      } {/w1 0 def /Npt Data0 length 2 idiv def} ifelse 
  180.      /DS 0 def 
  181.      Evolute  {/Coeff 0 def /Ratio 0 def /Pstep {90 sub 1. 3 -1 roll div exch} bind def} if 
  182.      Evolvent {/Coeff 0 def /Ratio 0 def /Tstep {Estep} def} if 
  183.      Reject 0 ge {Reject dup mul}{-1} ifelse /Reject ED 
  184.  
  185.      270 800 moveto (Page ) show Npage 3 string cvs show ( / ) show Npages show 20 770 moveto 
  186.         w1 0 ne {% 
  187.           gsave  /Symbol findfont 20 scalefont setfont 
  188.              (r1) Ishow ( = ) R1 15 string cvs AppStr (,  ) AppStr show 
  189.              (w1) Ishow ( = ) w1 15 string cvs AppStr (,  ) AppStr show    
  190.              (r2) Ishow ( = ) R2 15 string cvs AppStr (,  ) AppStr show 
  191.              (w2) Ishow ( = ) w2 15 string cvs AppStr (;  ) AppStr show currentpoint 
  192.           grestore moveto 
  193.         } if  
  194.         Ratio dup 0 lt exch 1. ge or {Red} if   
  195.         Ratio 0 ne {( Ratio=) show Ratio 15 string cvs show} if 
  196.         Ratio 0 eq Coeff 0 ne and {( Coeff=) show Coeff 15 string cvs show} if 
  197.         Evolute  {( Evolute.)  show} if 
  198.         Evolvent {( Evolvent.) show} if 
  199.      20 740 moveto Blue Title show  
  200.   
  201.      0 400 translate Black 
  202.            3 0 moveto 3 Rpoint 3 100 lineto 3 Rpoint stroke 
  203.            6 -5 moveto (0) show 4 95 moveto (100) show 
  204.      300 0 translate 
  205.           -10 0 moveto 10 0 lineto 0 -10 moveto 0 10 lineto stroke  
  206.  
  207.      /Rmin 0 def 
  208.      Evolvent Evolute or {1.2}{.6} ifelse setlinewidth 
  209.      Data0 XYdraw Evolvent not {closepath} if stroke Counter 
  210.      { Data0 Revers N 0 le {1}{N} ifelse {% 
  211.          Tstep  /Nsteps Nsteps 1 add def           % [Nsteps DS dup DSdraw gt] == 
  212.          Nsteps 1 eq {1 0 0 setrgbcolor} if 
  213.          DS DSdraw gt {% 
  214.             dup XYdraw Evolvent not {closepath} if stroke Counter 
  215.          /DS 0 def   currentrgbcolor 3 1 roll setrgbcolor 
  216.          } if 
  217.          Kmax Rexit mul 1 gt {/Rmin 1. Kmax div def exit} if 
  218.          Reject 0 ge {RejectPT} if   Npt 4 lt {exit} if 
  219.        } repeat  
  220.      } stopped % ------------------------------------------------------------------ 
  221.      {count {pop} repeat Red 0 0 moveto (Error occured) show}  
  222.      {dup XYdraw Evolvent not {closepath} if stroke 
  223.         EndPoints {Red2 aload length 2 idiv {moveto 4 Rpoint} repeat}{pop} ifelse 
  224.      } ifelse Counter 
  225.    end 
  226.    flush showpage 
  227. restore 
  228. } def 
  229. % ================================== MAIN PROGRAM ========================================= 
  230. /Npage 0 def /Npages 0 def 
  231. /Times-Roman findfont 20 scalefont setfont 
  232.  
  233. %        --------------------------------------- Set defaults: ---------------- 
  234. /R1  100 def  /w1 1 def  /R2 0 def  /w2 1 def 
  235. /Ratio 0.05 def  % shift = Rmin * Ratio   
  236. /Coeff 0 def     % shift = Coeff * cuvature 
  237. /Npt 120 def     % number of points on curve 
  238. /N 1000 def      % number of iterations 
  239. /DSdraw 20. def  % some distance between two drawn curves (somehow controls number of curves to draw) 
  240. /Rexit 0. def    % exit if Rmin < Rexit 
  241. /Reject -1 def   % if nonnegative reject 
  242. /Title () def  /Evolute   false def /Evolvent  false def  /EndPoints false def 
  243. %        ----------------- Fill array of dictionaries-pictures: ----------------- 
  244. % To include a picture enter dictionary of /key value paires: 
  245. %   << /key1 value1 /key2 value2 ....   /keyN valueN >>   
  246. %  Curve z(t) = R1*exp(i*w1*t) + R2*exp(-i*w2*t) can be set by, e.g. 
  247. %           /R1 100 /w1 1  /R2 20 /w2 1  /Npt  120 
  248. %  or simply give a set of points like  
  249. %           /Data0 [ X1 Y1 X2 Y2 X3 Y3 ... Xn Yn ]    (X1,Y1) NOT equal to (Xn,Yn) ! 
  250. %  Set  /Ratio .5 (value<1) to control step: Step = curvature_i * const, const= Ratio*Rmin,  
  251. %                           where Rmin is minimal radius of curvature, updated for every loop 
  252. %  Or set /Ratio 0 /Coeff 10:                Step = curvature_i * Coeff, Coeff not updated.    
  253. %  Set /Title (some text)  % v skobkah, according to PS string format 
  254. %  Set /N integer_value    % for total number of iterations 
  255. %  Set /Rexit  Rmin        % exit when minimal radius of curvature < Rexit 
  256. %  Set /Reject MinDist     % to reject close ajacent points 
  257. %  Set /DSdraw SomeDist    % to control how often the curve will be drawn (0., 10.5, 100... ) 
  258. %  Set /Evolute  true      % just to draw N evolutes 
  259. %  Set /Evolvent true      % just to draw N evolvents 
  260. %  There are 21 << dictionaries >> in this example, producing 21 pages of output 
  261. %  Any  << dictionary >> can be removed (commented, popped) or edited.  New one can be inserted. 
  262. % --------------------------------------------------------------------------------- 
  263. % ---------------- Start list of pictures; edit below this line ------------------- 
  264. % --------------------------------------------------------------------------------- 
  265.  <<  /R1 150 /w1 1  /R2 100 /w2 -6  /N 300 /Npt 360 >>   
  266.  
  267.  <<         /Title (Circle, R = 200 = 70.6 mm) 
  268.      /R1 70.6 mm /R2 0 /w2 1  /N 13  /Npt 36 /Ratio .5 sqrt             % --- circle (k=0) 
  269.  >> 
  270.  
  271.  <<  /R1 200 /R2 0 /w2 1  /N 13  /Npt 36 /Ratio .0 /Coeff 1000 >>   % --- circle (k=0) 
  272.  
  273.  <<  /R1 200 /R2 70 /w2 1  /N 3000 /Npt 60 /Ratio 0.04 >>           % --- ellipse 
  274.  
  275.  <<   /Title ( --------------- Test for rejection of close points -------------) 
  276.    /R1 200 /R2 70 /w2 1  /N 3000 /Npt 90 /Ratio 0.05  /Reject 7 >>           % --- ellipse 
  277.  
  278.  
  279.  <<  /R1 50 /R2 200 /w2 2  /N 1000 /Npt 60 /Ratio 0.1 >>   
  280.  
  281.  <<   /R1 250   /R2 80 /w2 2  /N 3000 /Npt 60 /Ratio 0.3          /DSdraw 50 >>   
  282.  
  283.  <<  /R1 200 /R2 60 /w2 2 /N 500  /Npt 60 /Ratio 0. /Coeff 40 /DSdraw 50 >>   
  284.  
  285.  <<  /R1 133.333 /R2 150 /w2 2 /N 5555 /Npt 120  /Ratio .3 /Rexit .5 /DSdraw 40 >>   
  286.  
  287.  <<  /R1 110  /R2 150 /w2 3 /N 1000 /Npt 80 /Ratio .2 >>   
  288.  
  289.  <<  /R1 208 /R2 75 /w2 5  /N 2000 /Npt 120 /Ratio .1 >>   
  290.  
  291. <<  /N 15 /Ratio .5  
  292.   /Data0 [99 0   99 99   0 99  -99 99  -99 0   -99 -99   0 -99   99 -99  ] 
  293.   /Title (Sample point set.) 
  294. >>   
  295.  
  296.  
  297. <<             /Title (Lemniscate + Reject=2) 
  298.    /Reject 2 /Ratio 0.05   /N 2000   /DSdraw 20 
  299.    % Fill data points: 
  300.    /Npt Npt 2 div round 2 mul cvi def 
  301.    /dt 180 Npt 2 sub div def /dt2 dt 2. div def 
  302.  
  303.    /Data0 [%  Calculate  data x1 y1 x2 y2 ... for lemniscate  
  304.      0 0 
  305.     -45 dt2 add dt 45 {% 
  306.      dup 2 mul cos   % fi r^2 
  307.         sqrt exch Polar 280 mul exch 280 mul exch 
  308.     } for 
  309.     0 0 
  310.     -45 dt2 add dt 45 {% 
  311.        dup 2 mul cos   % fi r^2 
  312.        sqrt exch Polar 280 mul exch 280 mul neg exch 
  313.     } for  ] 
  314. >> 
  315.  
  316. <<   
  317.    /R1 208 /R2 125 /w2 4 /N 100 /Npt 180 /Ratio .7  /DSdraw 20 
  318.      /Title (Ratio=0.7 is too big... but "selfcorrection" occurs?) 
  319. >>   
  320.  
  321. <<      /Title ( R(t) = A + b*cos(wt), b < A. ) 
  322.     %  
  323.     /a 200 def /b 100 def /w 6 def  
  324.     /Npt 120 def % number of points on curve 
  325.     /dt 360 Npt div def /dt2 dt 2. div def  
  326.     /Data0 [ 0 dt 360 dt2 sub {dup w mul cos b mul a add exch Polar } for ] 
  327.     /N 6000   /DSdraw 30 
  328.     /Ratio .1  
  329. >> 
  330.  
  331. <<      /Title ( R(t) = a + B*cos(wt), B>a. "Old-style" picture (no step correction).) 
  332.     %  
  333.     /a 100 def /b 320 def /w 4 def  
  334.     /Npt 160 def % number of points on curve 
  335.     /dt 360 Npt div def /dt2 dt 2. div def  
  336.     /Data0 [ 0 dt 360 dt2 sub {dup w mul cos b mul a add exch Polar } for ] 
  337.     /N 7500  
  338.     /Ratio 0. /Coeff 2. /DSdraw 200 
  339. >> 
  340.  
  341. <<      /Title ( R(t) = a + B*cos(wt), B>a. The same with step correction.) 
  342.     %  
  343.     /a 100 def /b 320 def /w 4 def  
  344.     /Npt 160 def % number of points on curve 
  345.     /dt 360 Npt div def /dt2 dt 2. div def  
  346.     /Data0 [ 0 dt 360 dt2 sub {dup w mul cos b mul a add exch Polar } for ] 
  347.     /N 7500  
  348.     /Ratio 0.2 /Coeff 2. /DSdraw 20  
  349. >> 
  350.  
  351.  <<  /R1 40 /R2 50 /w2 3 /N 4 /Npt 80 /Evolute true /Title (Rose's sequential evolutes) >>   
  352.  
  353.  <<  /R1 50 /R2 20 /w2 1   /N 3 /Npt 120 /Evolute true /Title (Ellipse's sequential evolutes) >>     
  354.  
  355.  <<  /R1 30 /R2 40 /w2 3 /N 1 /Npt 120 /Evolvent true >>   
  356.  
  357.  <<  /R1 15 /R2 20 /w2 3 /N 5 /Npt 80 /Evolvent true  
  358.      /Title (Infinite sequence of evolvents of any curve tends to logarithmic spiral) 
  359.  >>   
  360. % --------------------------------------------------------------------------------- 
  361. % ----------- end of pictures list; do not edit below this line ------------------- 
  362. % --------------------------------------------------------------------------------- 
  363. ] dup length 3 string cvs /Npages ED 
  364. {MakePage} forall 
  365. % ----------- (but two lines below can be removed :) 
  366. /Times-Roman findfont 100 scalefont setfont  
  367. 250 400 moveto (Bce!) show 366 449 moveto (.)dup show -10 0 rmoveto show 
  368. % (eof) 
upd: Теперь уже альбом на 21 песню.
AKM в сообщении #308417 писал(а):
Описание как баловаться, удалять мои и вставлять свои картинки --- строки 250 и ниже.

Заметил, что при скачивании (в IE) получается какой-то zip-образный нечитабельный текст. Нормальный PS-текст можно выковырять через кнопку "Цитата".

 
 
 
 Re: Моделирование преобразования кривой...
Сообщение06.04.2010, 13:25 
Ув. АКМ, я, дейсвительно, не знаю как правильно оформить цитату и не нашел как это сделать в правилах форума, так что это не шуточки :-(

 
 
 
 Re: Моделирование преобразования кривой...
Сообщение06.04.2010, 13:52 
Аватара пользователя
Она правильно оформляется сама при цитировании:
[quоte="bla-bla-bla"] ... собственно цитата ... [/quоte]

Вы, редактируя, откусываете то открывающее, то закрывающее [/quоte]. А то и оба (как в последний раз). (Я обычно не оставлял пометки о редактироовании).

Если Вы делаете её вручную, то в окне ответа рядом с кнопками B, i, u есть кнопка Quote, позволяющая заключить выделенный текст в цитату (без наворотов ="bla-bla-bla").

В окне предпросмотра видно, что цитата оформлена неправильно, причины легко обнаруживаются и исправляются. Часто это всего лишь нечаянно удалённая квадратная скобка.

 
 
 
 Re: Моделирование преобразования кривой...
Сообщение06.04.2010, 19:55 
АКМ, спасибо, теперь ясно.Впредь так и буду делать :-)

-- Вт апр 06, 2010 20:55:25 --

 
 
 
 Re: Моделирование преобразования кривой...
Сообщение09.04.2010, 14:55 
Yu_K, а как ты мульты делал? Научи пожалуйста)))

 
 
 
 Re: Моделирование преобразования кривой...
Сообщение09.04.2010, 15:58 
Что касается продолжения темы, то мне кажется нужно в процессе перестройки кривой выбрасывать или объединять те точки, которые оказались слишком близко.

Анимация в Макаде - ответ для Вас взят отсюда
http://otvety.google.ru/otvety/thread?tid=28ed4531873bdaab.

Анимация представляет собой быстро сменяющие друг друга кадры, при этом изменения в каждый следующий кадр вносятся с помощью переменной FRAME. Например, проследим как «сжимается» парабола y=a*x^2 при изменении а от 1 до 20. Присваиваем: a:=FRAME+1 (по умолчанию FRAME=0). Задаем функцию: y(x):=a*x^2. Строим график заданной функции, идем в меню инструменты – анимация – запись, откроется окошко «запись анимации», там задаем значение переменной FRAME от 0 до 20.
http://i073.radikal.ru/0910/97/4411cf5e4312.jpg
Выделяем прямоугольником часть графика, что будет отображена в анимации и жмем на кнопку анимировать. Анимация готова.
http://i030.radikal.ru/0910/9a/6c49769f95d7.jpg

 
 
 [ Сообщений: 206 ]  На страницу Пред.  1 ... 9, 10, 11, 12, 13, 14  След.


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group