Drawing a perfect circle that rotates

Hi
I tried to draw a circle while holding down the Shift-key. Then centered it inside a MovieClip named 'circle_mc'
Every frame I'm rotating it like this:
circle_mc.rotation += 5;
That seems pretty simple but the circle is not perfectly round. Why?
You can see the result here:
http://boostmode.com/dev/circle/circle.html
Any ideas?
Thanks
Rolf

I didn't find a solution to drawing the circle withing Flash. However I did manage to get a perfect circle by drawing the circle in Illustrator CC and then copy it and paste it in Flash.
Thanks for the help. And thanks for duplicating the experiment Ned.
I'm a little disappointed with Flash drawing capabilities.  
Heres the new circle drawn in Iluustrator:
http://boostmode.com/dev/circle/circle2.html
And the old one drawn in Flash:
http://boostmode.com/dev/circle/circle.html
Rolf 

Similar Messages

  • How to draw a perfect circle and how to make sure it is perfectly centered inside a square

    How to draw a perfect circle and how to make sure it is perfectly centered inside a square in Photoshop elements using the Ellipse option.

    1. Create a square canvas.
    2. With the Elipse tool, hold down Shift (Shift forces a circle). Draw the circle anywhere on the canvas (Shape 1 in this example).
    3. Simplify the circle layer
    4. Ctrl-click the layer to select the circle.
    5. Copy the selection to the clipboard (Edit > Copy).
    6. Deselect the selection.
    7. Paste from the clipboard (Edit > Paste). The pasted circle (Layer 1) will be centered.
    8. Delete the original circle layer.
    NOTE: Step 6 is the key. This guarantees that the pasted circle will be centered.
    If you want a circle completely within a square you can simply draw and simplify a circle on any shape canvas. Ctlrl-click the circle to to select it and copy to the clipboard.
    Then do File > New from Clipboard. This creates the circle cropped to a square on transparent background.

  • This is basic but it's killing me, draw perfect circles inside each other

    Hello,
    I'm trying to draw a perfect circle in PS, I know you hold shift and drag the eclipse tool, to create a 2nd circle, I contracted it, added a new layer and filled it, I continued but I noticed as I went to the 3rd circle, it stopped being a perfect circle, what is the perfect way to do this? I even tried using the Ellipse vector tool but no luck. Here's what I did so far.
    Thanks in advance.

    Edit: Actually same method as post #1 but with a stroke style applied.
    Here I have used a grid so I could easily line up the center cross hairs when I started the shape. I used a layer style on my shapes. In this case, it's stroke with the fill set to 0%.

  • The System Preference:Desktop&Screensaver will not open. I get a rotating circle that never stop rotating. I have to do a Force Stop.

    The System Preference:Desktop&Screensaver will not open. I get a rotating circle that never stop rotating. I have to do a Force Stop.

    Quit System Preferences if it's running. In the Finder, hold down the option key and select
    Go ▹ Library
    from the menu bar. From the Library folder, delete the following item, if it exists: 
    Caches/com.apple.systempreferences
    and move the following item to the Desktop:
    Preferences/com.apple.desktop.plist
    Launch System Preferences and test. If you still have the issue, put the item on the Desktop back where it came from and post again. Otherwise, delete the item.

  • My iphone 4 screen has been frozen (on that rotating circle thing it does right before it turns off) for about 6 hours now!

    This morning it was working fine and then it went to the lock screen and I tried to "slide to unlock" and it wouldn't go. Then it became frozen on the lock screen and I tried everything from holding the lock button to try to shut it down, plugging it in to the wall, plugging it into the computer. Then I just left it in my room for about 30 minutes and when I came back to get it, it was doing that rotating circle thing it does before it shuts down and its been doing that for about 6-7 hours now!! I have absolutely no control over my phone. I tried putting it out in the sun to drain the battery quicker and eventually shut off but that hasnt been working either! The frickin phone wont turn off!! Does anyone know what to do about this?! Thanks:)

    Sorry. Jail breaking an iOS device is an unauthorized modification. The terms of use for this forum prohibit discussing unauthorized modifications. You'll have to find help elsewhere.

  • Possible screen hardware fault - three perfect circles look like suction cup marks

    I have an iMac 27-inch, mid 2011. I purchased the machine in October 2011.
    I have always looked after my screen by protecting it from dust with a light cover but suddenly today I notice three perfect circles - like suction cup outlines. Two of them are identical in size 5cm across sitting side by side. The other one is in the left bottom quadrant and is about 3cm across - looks like there may have been writing across the top arc but is too small to make out.
    I am assuming these marks are from the manufacturing/assembly process when the glass was suction-cupped to put onto the machine. Why have they become visible suddenly now nearly 4 years later?
    I tried to clean them off with a isopropyl alcohol free wipe but nothing comes off. The circles are also casting a shadow onto the screen contents. There doesn't appear to be any raised surface to these marks.  They don't budge. But now I have like a white cloud of where I tried to clean them off when the screen was on and hot. I'm hoping this doesn't last.
    What can I do?

    Additional note to my above query...
    The screen has a large amount of what looks to be condensation - that appears like a big milky cloud - this slowly shrunk and then disappeared after shutting down.
    How is there condensation in the centre where the circular suction cup marks have suddenly appeared? Is my screen laminate separating or something?

  • Drawing elements in circles

    Hi friends,
    I am trying to draw elements in incremental circles starting with a small circle, meaning incrementing the no of elements in the next outer circle. The problem is that before properly filling a circle, my program is drawing another outer circle and putting elements in it. So, the circles seems to be broken.
    The description seems to be confusing. Please have look at the code.
    import java.awt.Color;
    import java.awt.EventQueue;
    import java.awt.Graphics;
    import java.util.ArrayList;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class CircularDrawingNew extends JPanel
         public static void createUI()
              JFrame f = new JFrame("Circular Drawing New");
              f.add(new CircularDrawingNew());
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              f.setSize(1100, 900);
              f.setLocationRelativeTo(null);
              f.setVisible(true);
         public static void main(String[] a)
              EventQueue.invokeLater(new Runnable() {
                   @Override
                   public void run()
                        CircularDrawingNew.createUI();
         @Override
         public void paintComponent(Graphics g)
              super.paintComponent(g);
              int totalElements = 0;
              int elementsPerRing = 9;
              int location = 500;
              double verticalGap = 10.0;
              double radius = 40.0;
              System.out.println("==================================== START ==============================");
              int count = 0;
              int circleCount = 0;
              ArrayList<Color> colors = new ArrayList<Color>();
              colors.add(Color.GREEN);
              colors.add(Color.YELLOW);
              colors.add(Color.RED);
              int k = 1;
              int space = 80;
              limit:
              for (; ;)
                   double circumference = 2 * 3.14 * radius;
                   System.out.println("Circumference : " + circumference + " element count is : " + elementsPerRing + " cc is : " + circleCount + " space is : " + space);
                   for (int j = 0; j < elementsPerRing; j++)
                        if (totalElements > 750)
                             break limit;
                        if (count == 3)
                             count = 0;
                        g.setColor(colors.get(count));
                        double x = location + radius * Math.cos(Math.toRadians(verticalGap));
                        double y = location + radius * Math.sin(Math.toRadians(verticalGap));
                        g.fillOval((int) x, (int) y, 10, 10);
                        g.setColor(Color.black);
                        g.drawString(String.valueOf(k), (int) x, (int) y);
                        verticalGap += 360 / elementsPerRing;
                        k++;
                   count++;
                   circleCount++;
                   radius += 30;
                   double d = (circumference / space);
                   elementsPerRing += (int)d;
                   totalElements += elementsPerRing;
                   if(circleCount >= 6 && circleCount <= 8)
                        space = space + 20;
                   else if(circleCount >= 8 && circleCount <= 10)
                        space = space + 40;
                   else if(circleCount > 10)
                        space = space + 60;
                   else
                        space = space + 10;
              System.out.println("==================================== DONE ==============================");
    }

    Your entire problem is rounding errors and truncation. Your algorithm was correct, but you ineffectively mixed int and double types of numbers together and relied on autoboxing to do the right thing for you---DON'T DO THAT! When you mix a double with an int, you are going to do int math and then it will be converted to an int if that is what it takes as the destination variable. You have several places in your code where you just take any number and do some math with any other number and you where caught by it this time. Learn how number systems interact and errors that are inherent in each number system.
    Here is your type corrected code (now working as you desire--without any significant modifications other than number type corrections):
    import java.awt.Color;
    import java.awt.EventQueue;
    import java.awt.Graphics;
    import java.util.ArrayList;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class ForumJunk extends JPanel{
      public static void createUI(){
        JFrame f = new JFrame("Circular Drawing New");
        f.add(new ForumJunk());
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setSize(1100, 900);
        f.setLocationRelativeTo(null);
        f.setVisible(true);
      public static void main(String[] a){
        EventQueue.invokeLater(new Runnable(){
        public void run(){
          ForumJunk.createUI();
      public void paintComponent(Graphics g){
        super.paintComponent(g);
        int totalElements = 0;
        int elementsPerRing = 9;
        int location = 440;
        double verticalGap = 10.0;
        double radius = 40.0;
        System.out.println("==================================== START ==============================");
        int count = 0;
        int circleCount = 0;
        ArrayList<Color> colors = new ArrayList<Color>();
        colors.add(Color.GREEN);
        colors.add(Color.YELLOW);
        colors.add(Color.RED);
        int k = 1;
        double space = 80.0;
        limit:
        while(true){
          double circumference = 2.0 * Math.PI * radius;
          System.out.println("Circumference : " + circumference + " element count is : " + elementsPerRing + " cc is : " + circleCount + " space is : " + space);
          for(int j = 0; j < elementsPerRing; j++){
            if(totalElements > 750) break limit;
            if (count == 3) count = 0;
         g.setColor(colors.get(count));
         double x = location + radius * Math.cos(Math.toRadians(verticalGap));
         double y = location + radius * Math.sin(Math.toRadians(verticalGap));
            g.fillOval((int) x, (int) y, 10, 10);
            g.setColor(Color.black);
            g.drawString(String.valueOf(k), (int) x, (int) y);
            verticalGap += 360 / (double)elementsPerRing;
            k++;
          count++;
          circleCount++;
          radius += 30.0;
          double d = (circumference / space);
          elementsPerRing += (int)d;
          totalElements += elementsPerRing;
          if(circleCount >= 6 && circleCount <= 8) space = space + 20;
          else if(circleCount >= 8 && circleCount <= 10) space = space + 40;
          else if(circleCount > 10) space = space + 60;
          else space = space + 10;
        System.out.println("==================================== DONE ==============================");
    }BTW: you may notice that I changed the name--I do that with any project I load off of the forums--and I also change your whitespace formatting to allow me to see more of your code on the screen.
    Oh, I did change your empty for loop to a while(true)--just my preference again--and I changed you location from 500 to 440 to cernter better in the display.

  • What do I do after Iphoto crashed and will not reload?  I only get a black screen and a circle of rotating bars.

    How do I bring up iPhoto after it seemed to crash while I was using it?  All I get now is a black screen with a circle of rotating bars.  I have closed it, and restarted after putting the machine to sleep and after shutting it off altogether; no luck.   Everything else is working fine. 

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Drawing and Filling Circle and Polygon.

    I have searched about creating these but cannot understand properly. 
    Let SetPixel(X,Y) be the function to set the pixel. I am working in unity3d for drawing on texture.
    Allow time to reverse.

    besides what Armin said
    which setpixel function do you mean ?
    the bitmap.setpixel or the Win32 setpixel ?
    also why would you want it in vb when you don't plan to use vb ?
    I am writing class library for unity3d in vb.net.
    "SetPixel(x,y)" is just a procedure that sets pixel on (x,y). It is enough for drawing.
    I am not dealing with color or anything. Just need to set pixels at right position.
    I tried and found this: (It is to draw non-filled circle)
    Public Function Apply(Texture As Texture2D) As Texture2D Implements Image.Appliments.Apply
    Dim x0 As Integer = Me.X
    Dim y0 As Integer = Me.Y
    Dim x As Integer = Radius
    Dim y As Integer = 20
    Dim RadiusError As Integer = 1 - x
    While x >= y
    Texture.SetPixel(x + x0, y + y0, Color)
    Texture.SetPixel(y + x0, x + y0, Color)
    Texture.SetPixel(-x + x0, y + y0, Color)
    Texture.SetPixel(-y + x0, x + y0, Color)
    Texture.SetPixel(-x + x0, -y + y0, Color)
    Texture.SetPixel(-y + x0, -x + y0, Color)
    Texture.SetPixel(x + x0, -y + y0, Color)
    Texture.SetPixel(y + x0, -x + y0, Color)
    y = y + 1
    If RadiusError < 0 Then
    RadiusError = RadiusError + 2 * y + 1
    Else
    x = x - 1
    RadiusError = RadiusError + 2 * (y - x) + 1
    End If
    End While
    Texture.Apply()
    Return Texture
    End Function
    Allow time to reverse.

  • There is a metal circle that goes under my home button. What is that for? How do i properly place the home button on the iPod Touch?

    I need help!!

    It's possible that Fiona doesn't know what you mean. I don't.
    However, I wonder if you mean the small circle (that isn't metal) at the top of the screen.
    That's a camera.
    The only thing at the bottom of the iPod is the Home button - there's nothing underneath it. You can see in the picture, a recessed circle with a printed grey square inside it - the Home button.
    (I have noticed that pictures of the 2nd gen Touch - which I own - do not show the small (also not metal) circle at the top left above the screen. It's a light sensor.)
    So if your iPod does not look exactly like the one in the picture, can you post a picture of yours, with this small metal circle thing too?

  • I have an iphone 4s and when I try to connect it to my shared libraries; I get an icon of a circle that only fills up halfway.  I have an ipad and it connects to the shared library without a problem.  My library is much larger than the capacity of either

    I have an iphone 4s and when I try to connect to my shared library I see an icon of a circle that only becomes half full.  It does not connect.  I also have an ipad, which connects without incident. My itunes library is larger than the capacity of both devices, so that cannot be the issue.  How can I get the phone to connect with my shared library?

    My husband and I are using the same iTunes account on all mac & pc computers, but the libraries are different on each machine.  We always manually manage our music (no auto sync).  iTunes is up to date on the PCs.  My husband uses our joint iTunes account on his pc, but once again, has a different collection in his library from those on the other machines.  He can't load any music from his PC to his iphone 4.  I can load music from my mac library to my iphone 4s, but cannot load from my pc library to my iphone 4s.  How can I switch my main library that it syncs with from the mac to the pc?
    Thanks

  • HT1527 when I try to download apps in my iphone , i get a spinning circle that won't go away and a icon that is gray and says "waiting". Any ideas how to solve?

    When I try to download apps in my iphone , I get a spinning circle that won't go away and a grey icon that says "waiting" .Any ideas how to fix the problem?

    First go into settings, Itunes and App store,  sign out and then sign in again! (This might not work)

  • Can I make my iphoto library a screensaver that rotates repeatedly selecting randomly

    I understand how to make one or more pictures my desktop picture.  But what I would like to do is have the pictures in my IPhoto library selected randomly be a screensaver that rotates across the screen when I am not using my computer.  How can I do that?

    The available options for SceenSavers are found in the Desktop and Screen Savers Peference Pane. Yes the iPhoto Library is available for use by screensavers, but what exactly is done with them is a matter for the Screensaver options there.

  • How can I get rid of a whirling circle that stops me using a document?

    How can I get rid of a whirling circle that stops me using a document?

    Hi Sally, let's start with this to see if it makes a difference...
    Bootup holding CMD+r, or the Option/alt key to boot from the Restore partition & use Disk Utility from there to Repair the Disk, then Repair Permissions.
    Restart & test.

  • [CS4/JS]: Draw three touching circles

    This little javascript just might be useful; perhaps not for everyone, though 
    Select a triangle (either closed or open, doesn't matter; as long as it has exactly 3 anchor points) and run this script. It'll draw three thin-lined circles with their centers on the triangle points, and their radii adjusted so all three of them touch each other.
    Copy, paste into a plain text editor -- Adobe's own ESTK Editor is good -- and save into Illustrator's Scripts folder, or anywhere else (but then you'd have to browse for it every time you want to run it). Save as "draw3circles.jsx" -- when saved in Illy's Scripts folder, it'll be visible next time you restart Illustrator.
    Select a triangle, run the script. If you don't have a valid selection, it'll do nothing at all.
    //DESCRIPTION:Draw Three Touching Circles on a Triangle
    // A Jongware Script, 30-Sep-2010
    if (app.documents.length > 0 && app.selection.length == 1 && app.selection[0].hasOwnProperty("pathPoints") && app.selection[0].pathPoints.length == 3)
         p1 = new point (app.selection[0].pathPoints[0].anchor);
         p2 = new point (app.selection[0].pathPoints[1].anchor);
         p3 = new point (app.selection[0].pathPoints[2].anchor);
         dc = p1.distance(p2);
         da = p2.distance(p3);
         db = p3.distance(p1);
         ra = da - (da + db + dc)/2;
         rb = db - (da + db + dc)/2;
         rc = dc - (da + db + dc)/2;
         black = new GrayColor(); black.gray = 100;
         if (ra)
              e = app.activeDocument.pathItems.ellipse (p1.y+ra,p1.x-ra,2*ra,2*ra); e.strokeWidth = 0.1; e.strokeColor = black; e.fillColor = NoColor;
         if (rb)
              e = app.activeDocument.pathItems.ellipse (p2.y+rb,p2.x-rb,2*rb,2*rb); e.strokeWidth = 0.1; e.strokeColor = black; e.fillColor = NoColor;
         if (rc)
              e = app.activeDocument.pathItems.ellipse (p3.y+rc,p3.x-rc,2*rc,2*rc); e.strokeWidth = 0.1; e.strokeColor = black; e.fillColor = NoColor;
    function point (arr)
         this.x = arr[0];
         this.y = arr[1];
         this.distance = function (pt) { return Math.sqrt ( (this.x-pt.x)*(this.x-pt.x) + (this.y-pt.y)*(this.y-pt.y) ) };

    I don't know yet what I might use it for, but it's fun! Give me a couple of hours...
    Thanks,
    Peter

Maybe you are looking for