<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Le 04/12/2012 17:28, Jens Simon Strom a
      écrit :<br>
    </div>
    <blockquote cite="mid:loom.20121204T172713-738@post.gmane.org"
      type="cite">
      <pre wrap="">In version 5.3 I have written a script which produces an animated plot of a
magnetic field showing approx. 70 oscillating and rotating arrows. The arrows
are generated by the command 'arrows' in a loop. I used the 'pixmap' and the
'show_pixmap()' command resulting in a perfect calm and smooth movie.

Version 5.4.0 tells me that 'pixmap' is obsolete and 'drawlater' and 'drawnow'
shall be used instead. I have tried my best with the latter two plus 'xpause'
but never got a satisfying result - the animation performs like a defect silent
film projector. Deleting seem to be an issue.

Could anyone kindly  give me a hint how I can calm down the animation with
'drawlater' and 'drawnow' in a loop where arrows are drawn with 'arrows'?

'comet' might be a workarond but that would mean a new start from scratch.

Kind regards
Jens

   



_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>

</pre>
    </blockquote>
    does the sample code below solves the problem? Note that it does not
    use neither pixmap neither drawlater drawnow<br>
    <font color="#3333ff"> <br>
      clf();a=gca();a.data_bounds=[-1 -1;1 1]*10;<br>
      t=linspace(0,2*%pi,70);<br>
      n=110;<br>
      r1=linspace(0,1,n);<br>
      r2=linspace(1,10,n);<br>
      phi=linspace(0,%pi/2,n);<br>
      <br>
      k=1;<br>
      nx=[r1(k)*cos(t+phi(k));r2(k)*cos(t+phi(k))];<br>
      ny=[r1(k)*sin(t+phi(k));r2(k)*sin(t+phi(k))];<br>
      <br>
      <br>
      xarrows(nx,ny)// create the Segs entity<br>
      e=gce(); //get the handle on it<br>
      realtimeinit(0.05);<br>
      for k=2:n<br>
       realtime(k-1) //wait a little to slow down the loop if necessary<br>
       nx=[r1(k)*cos(t+phi(k));r2(k)*cos(t+phi(k))];<br>
       ny=[r1(k)*sin(t+phi(k));r2(k)*sin(t+phi(k))];<br>
          <br>
       e.data=[nx(:) ny(:)];//update arrow coordinates<br>
      end<br>
    </font><br>
    Serge Steer<br>
  </body>
</html>