if i make an ellipse bounded by a rectangle. how can i rotate it ? as in if i have rx,ry,cx,cy,topleft x,toplefy, bottomrightx,bottomrighty
iused the formula
angle=taninverse(ry/rx)
and i keep adding the angle that is angle=angle + taninverse(ry/rx)
the angle is too small to see the difference.
please provide another formula to calctulate teh angle with the given parmeteres
to have a look at the ellipse with the bounded rectangle frame
http://svg-edit.googlecode.com/svn/branches/2.5.1/editor/svg-editor.html
Have you tried rotating by a larger angle to see what happens? Do the values of rx and ry change?
If not, you probably should compute ‘atan(ry/rx)’ and store the result in a variable like so:
Then when you rotate
Alternatively, rather than calculating the angle from ry and rx, you may wish to simply keep a value such as
This simply gives the angle to rotate through without a calculation. The advantage is that you can simply set this
deltavariable to any value you wish, large or small. As above, you can incrementangleby thisdeltavalue.