[Scilab-users] rotating animated rod in scilab
ol.bond
oleksiy.bond at gmail.com
Thu Jul 17 14:53:56 CEST 2014
Hi Mohammad,
You can use the following script:
fig=scf();
plot2d([-cos(0) cos(0)],[-sin(0) sin(0)],rect=[-1,-1,1,1],style=2)
fig.children.isoview='on';
fig.children.axes_visible = ["off","off","off"];
h=fig.children.children.children;
for q=1:N
theta = //calulation step
h.data=[-cos(theta),-sin(theta);cos(theta),sin(theta)];
sleep(100)//execution pausa in milisec step
end
Yours,
Alex
2014/07/15 17:34, Mohammad EL JAWAD [via Scilab / Xcos - Mailing Lists
Archives] ?????:
> hi all;
> i have a for loop that calculates an angle theta
> then i generate two matrix x=[-cos(theta) cos(theta)] and y=[-sin(theta)
> sin(theta)] in matlab i use the drawnow command inside the for loop to
> generate the animation of the rotating rod
> as you know the drawnow matlab function has no scilab equivalent and i
> was wondering if there is an way to generate the animation
> regards
> my code in matlab is something like that
>
> for q=1:N
> theta = //calulation step
> x=[-cos(theta) cos(theta)]
> y=[-sin(theta) sin(theta)]
> plot(x,y)
> drawnow
> end
> _______________________________________________
> users mailing list
> [hidden email] </user/SendEmail.jtp?type=node&node=4030914&i=0>
> http://lists.scilab.org/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the
> discussion below:
> http://mailinglists.scilab.org/Scilab-users-rotating-animated-rod-in-scilab-tp4030914.html
>
> To start a new topic under Scilab users - Mailing Lists Archives,
> email ml-node+s994242n2602246h53 at n3.nabble.com
> To unsubscribe from Scilab users - Mailing Lists Archives, click here
> <http://mailinglists.scilab.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2602246&code=b2xla3NpeS5ib25kQGdtYWlsLmNvbXwyNjAyMjQ2fDE2MDI0ODA1Mzg=>.
> NAML
> <http://mailinglists.scilab.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://mailinglists.scilab.org/Re-Scilab-users-rotating-animated-rod-in-scilab-tp4030931.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20140717/615470c8/attachment.htm>
More information about the users
mailing list