How to rotate an oval graphic ?

Jacques Hausser Jacques.Hausser at unil.ch
Sun May 27 18:37:24 EDT 2007


>
> Hi list,,
>
> I've tried every possible way to do that, but no luck...
> Any help would be greatly apreciated...
>
> Thanks in advance,
> JB

Hi JB

Would be nice actually...
I had the same problem, and I made my oval
myself, on a preexisting graphic, style polygon (which can be rotated)
something like:

on ellipse a,b,alpha
   put the loc of graphic "Ellipse" into laloc
   repeat with i = 0 to 180
     put round(a*sin(2*i*pi/180)), round(b*cos(2*i*pi/180)) into line  
i of thepoints
   end repeat
   set the points of graphic "Ellipse" to thepoints
   set the loc of graphic "Ellipse" to laloc
   revrotatepoly the name of graphic "ellipse",alpha
end ellipse

a and b are half the length of each axes (x and y axes before  
rotation), alpha is the rotation angle.
I tried several number of points i (from 90 to 720) to avoid jagged  
borders, but the result is not fully convincing...

good luck anyway !

Jacques

******************************************
Prof. Jacques Hausser
Department of Ecology and Evolution
Biophore/Sorge (formerly Biology Building...)
University of Lausanne
CH-1015 Lausanne-Dorigny

tel:        ++ 41 21 692 41 62
fax:       ++ 41 21 692 41 65
E-Mail: jacques.hausser at unil.ch
*******************************************




More information about the use-livecode mailing list