[Scilab-users] Rotate an xarc figure

CRETE Denis denis.crete at thalesgroup.com
Wed Dec 19 18:26:41 CET 2012


Hello,
I don't know any command for rotating objects in a figure ("move" exists but it only performs a translation of a graphical object).
However, the following code probably draws a rotated ellipse (as for Lissajou's curves):
X=1; 
Y=0.5; 
the=0:%pi/100:2*%pi; 
the0=%pi/6; 
plot2d(X*cos(the),Y*cos(the-the0));
The principal axis of the ellipse are found at the=phi, where phi is solution of:
tan(2*phi)= Y^2*sin(2*the0)/(X^2+Y^2*cos(2*the0)); 
// 2 solutions %pi/2 apart
plot2d(X*cos(phi),Y*cos(phi-the0),style=-2)
plot2d(X*cos(phi+%pi/2),Y*cos(phi+%pi/2-the0),style=-3)

HTH
Denis

-----Message d'origine-----
De : users-bounces at lists.scilab.org [mailto:users-bounces at lists.scilab.org] De la part de Dang, Christophe
Envoyé : mercredi 19 décembre 2012 11:51
À : International users mailing list for Scilab.
Objet : [Scilab-users] Rotate an xarc figure

Hello,

I think this is a bit the same as
http://mailinglists.scilab.org/Plot-overlays-on-images-tt2617675.html
but as it was 2,5 years ago, I try again...

So, I work on ellipse fitting, and would like to display the regression model superimposed to the experimental points.

I extract the parameters of the ellipse and draw it with xarc, but cannot rotate it.

Is there an elegant way to do this or do I have to calculate some points and draw with xpoly (ro something else)?

-- 
Christophe Dang Ngoc Chan
Mechanical calculation engineer

Sidel Group 
Sidel Blowing & Services
Avenue de la Patrouille de France
Octeville-sur-Mer, BP 204
76053 Le Havre cedex, France

Tel: 33(0)2 32 85 89 32
Fax: 33(0)2 32 85 91 17

<http://www.sidel.com/>
<mailto:christophe.dang at sidel.com>


This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


_______________________________________________
users mailing list
users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



More information about the users mailing list