Spacing balls on a circle?

Hi
I need to draw a concentric circles with balls (like molecules), evenly
spaced from each other. How would I do that easily and quickly?
Thanx,
Rogier

In Rogier's revised post on the topic (which Ian closed off to replies), he added the following clarification:
"I would like to be able to add more balls, depending on the circle-radius. With every new ball added, the spacing needs to adjust correspondingly."
If all your balls are identical, here is one way:
Draw one ball.
Draw a straight vertical line, the intended radius of your circle.
Snap the top end of the line to the center of the ball. (Easiest to do with Smart Guides turned on.)
Make the straight line have no stroke, no fill. (It will be used for setting the transform origin.)
Group the ball with the straight line.
Making sure that the group is still the Appearance target, go to Effects>Transform&Distort>Transform to apply a live transform effect.
If you want N balls around your circle, set the Copies to N-1, and the rotation angle to 360/N. On the little "tic-tac-toe" grid showing the transform origin, click on the bottom center square. (This is why you grouped the ball with the vertical line, so that you could set the rotation origin to the correct location. The Transform live effect only has these 9 origin choices, so you have to set up your objects so that the origin you want is at one of these 9 positions relative to the bounding box of the object the effect is applied to.)
Turn on Preview to verify that it looks like you want, and if it does, click OK.
Now, if you want to adjust the radius of the circle, direct-select the bottom anchor point of the radius line, and shift-drag it up or down.
If you want to change the number of balls on your circle, double-click on the "Transform" row on the Appearance palette, so that it brings up the effect options dialog again, and change the number of Copies and the Angle.

Similar Messages

  • What is this beach ball that keeps circling on mu screen

    A couple of items:  One my password won't allow me into my computer.  I can only gain access by going thru guest then change user then the screen revolves to my admin screen.  HELP    the other item:  what is this colorful beach ball that keeps running on my screen?  Please and Thank You  Donna

    You can use this extension to hide the pop-up that shows the URL of a link on hover and other data that previously appeared on the Status bar.
    *Status-4-Evar: https://addons.mozilla.org/en-US/firefox/addon/status-4-evar/

  • Help figuring out how to tell if an object is within a dynamically made circle

    Hello Everyone,
    I am currently in the middle of working on a project but sadly I am having a bit of trouble getting a few things figured out.
    Essentially what the project consists of is I have random balls appearing on the screen and moving around and I need to make it so that the user is able to draw a circle around the ball (may be more than one) and have that balls dissapear and count the number of balls circled.
    This project is being done in flash builder 4.5 and is being made for the android platform as part of a senior project.
    At this point this is where I am.. I have been able to randomly create the balls and give them a random movement. I have also been able to figure out how to allow the user to draw on the screen.
    What I am trying to figure out is how to make it so that if the user draws a circle around the balls make it so that I know these balls have been circled and make them dissapear and have the number of balls inside the area calculated.
    I have thought about making the entire background a grid and make it so that I can track somehow the line made by the user and then track the coordinate of the balls then if it is within that area it means that the ball has been circled but I would like something more efficient than that.
    I apologize if it is unclear for what I am looking for but a simple description is I am making a simple game where you are able to circle a moving item on screen, then once it is circled the item disappearsand you gain a point.
    Any help would be greatly appreciated.

    that's non-trivial.  just determining if your user drew a closed curve is non-trivial.  then deciding what's inside and what's outside that curve is non-trivial.
    that's not to say it can't be done or even, that it can't be done with flash.  it can.  but you're not going to get a short paragraph answer to this one unless there are significant assumptions you can use to simplify the problem.

  • 3D rotate around a circle preset ae6

    Hello thanks for looking in..
    I am messing with the (3D rotate around a circle) preset in AE6 and if you notice that the Browse Preset feature shows the 3D text completing a circle.. Yet, When I create a text layer, apply the preset effect there is a gap from the end of my last word typed to the start of the word typed.
    IE: TV Bug TV Bug TV Bug TV Bug  (space) beginning of TV Bug instead of looking as the preset does in Browse Presets. TV Bug in a complete circle and spaced evenly.
    I hope this is making sense...I want the "g" in Bug to be spaced as a contiunued circle, so that Last "g" in Bug should butt up to the first "T" in TV. As it stands now I type it out and apply the preset and there is a huge space between the last "g" in Bug and the first "T" in TV.
    What do I need to mess with too get the ends to meet?
    I added a couple of pics to help describe:
    First one is the preset
    2nd one is my challnege of the ends not meeting
    Thanks again
    NC

    RG thanks again for hopping in here. You are a great help and I am thankful to have you perusing these forums.  I did get it to work. Although I do have a question or two about adding one keyframe to create a seemless loop.
    1. I add one frame via End > Page Down. However, I am unclear on where to park the last keyframe to make it a seemless loop? I ended up adjusting the First Margin on that effect to get it to start at the point I desire and then hit END to place the last KeyFrame. I of course made my last keyframe spot on where it starts as to not have a "Jump" in text when it restarts.....
    2. The other thing is the effect on that goes from one speed and slows to a stop and then of course starts again when going back to the beginning. I used Ease In and Ease out however I do not have control over the speed. IE: One speed throughout... Any suggestions on that one RG?
    Regards
    NC

  • WIFI not working on iphone 4 after ios 7 upgrade

    I just upgrded my iphone 4 to ios 7.
    I am trying to set up my wifi with it and it's not working.
    How can I set up my wifi within ios 7 so it works on my iphone 4?
    It just keep sayiing "Unable to join network"
    Thanks in advance.
    I phone 4
    ios 7

    Well it asks for you to rotate the red ball around the circle, which I do and then the compass displays but there is no direction or bearing provided, just some co-ordinates in the bottom RH cnr. If I move it about or press the compass it does nothing !
    Also at the top there is a red arrow on a narrow white marker which if I press down on seems to give a white blob and then disappears. not clear what that is for either
    I have tried resetting the phone and not having true north marked, makes no difference to when I first tried it.

  • How can I associate unique information/ variables with different instances of attachMovie when creat

    I'm creating an interactive animation of an experiment, whereby the user has to detect if there is an oil well lying beneath the surface by selecting and drilling a series of coordination points on a map.
    I've done the first stage by setting up a background image containing a grid of 20 x 20 coordinate points, eg columns 1 - 20 and rows A - T. Over the top of this, I've created a dynamic array of clickable objects (open circles) and the centre of each one is  placed over a coordinate point, so when you mouseover a coordinate point, eg C3,  an open circle becomes visible and when you rollout, it becomes invisible again.
    However, I'm stuck on the next stage. I need to be able to assign unique variables to one or more clickable objects (open circles). Is it possible to do that? For example:
    a)give grid point coordinates to each object (open circle), so for example if someone rolls over the C3 coordinate, the open circle (object) associated with that coordinate, a message will display: "Click on the grid point to drill at C3"
    b)assign a variable to one or more objects, so that when an open circle is clicked, the animation associated with that coordination point will be triggered. There will be different animations, depending upon which object (point is clicked)
    There are other variables that will need to be setup, but if I know how to assign variables to one or more objects, I can probably figure out the rest.
    Here's a copy of my code so far:-
    //set up grid for solid array
    spacing = 5.75;
    cols = 20; // number of columns in grid
    rows = 20; // number of rows in grid
    leftMargin = 154;
    topMargin = 169;
    depth = 100; // starting point for depth
    for (i=1; i<=rows; i++) {                                                                                                        
    for (j=1; j<=cols; j++) {                                                                                                         
    current = attachMovie("openCircle_mc", "openCircle_mc"+i+"_"+j, depth++);
    current._x = leftMargin + ((i-1) * (spacing + current._width));
    current._y = topMargin + ((j-1) * (spacing + current._height));
    //open circle initially invisible, visible on rollOver
    current._alpha = 0;
    current.onRollOver = function() {
               this._alpha = 100;
    current.onRollOut = function() {
               this._alpha = 0;
    Below is the background and a rolled over instance of the 'openCircle' object at 'C3'.
    I'd very much appreciate some help. Thanks very much.
    Pippa

    you can assign properties (and methods) to movieclips:
    //set up grid for solid array
    spacing = 5.75;
    cols = 20; // number of columns in grid
    rows = 20; // number of rows in grid
    leftMargin = 154;
    topMargin = 169;
    depth = 100; // starting point for depth
    for (i=1; i<=rows; i++) {                                                                                                         
    for (j=1; j<=cols; j++) {                                                                                                          
    current = attachMovie("openCircle_mc", "openCircle_mc"+i+"_"+j, depth++);
    current._x = leftMargin + ((i-1) * (spacing + current._width));
    current._y = topMargin + ((j-1) * (spacing + current._height));
    current.row=i;
    current.col=j;
    current.oil = Math.floor(Math.random()*1.1);  // about 1/10 objects have oil=1, 9/10 oil=0
    //open circle initially invisible, visible on rollOver
    current._alpha = 0;
    current.onRelease=function(){
    trace(this.row+" "+this.col+" "+this.oil);
    current.onRollOver = function() {
               this._alpha = 100;
    current.onRollOut = function() {
               this._alpha = 0;

  • Problems with an array (attachMovie)

    I've created a 20 x 20 grid of objects (openCircles). They're set to 'alpha = 0', then 'alpha = 100' on rollover. This works for all of them except for the final one at the coordinate T,20 in the bottom right corner, as I'm not able to rollover over it. To test whether or not they all existed, I set them all to an initial value of 'alpha = 100' and they did all appear, but I'm still unable to rollover the one at T20.
    The other problem is that when an 'openCircle' is clicked, a 'filledCircle' (set up as another grid of invisible objects in the same place) is supposed to appear in its place. That doesn't happen. All of the objects are created and exist, using attachMovie, so it's maybe due to some logical error. See code:-
    I'd be grateful for any help. Many thanks.
    stop();
    //The purpose of this experiment is to locate a trap of oil. Only 30 exploration holes are allowed.
    //Use the grid coordinate to locate the borehole and then plot the depth
    //Drilled is set to false in the 1st(previous) frame
    //Rolling over a grid coordinate will reveal a borehole (open circle).
    //Click on the borehole (open circle) to start drilling
              //open circle will be removed
              //drilled is set to true for that coordinate
              //filled circle will appear in its place
    //set up variables for grid array of open circles (undrilled) and closed circles (drilled)
    var spacing:Number = 5.75;
    var cols:Number = 20; // number of columns in grid
    var rows:Number = 20; // number of rows in grid
    var leftMargin:Number = 154;
    var topMargin:Number = 169;
    var currentRow:Number = 0;
    var currentCol:Number = 0;
    for (i=1; i<=rows; i++) {                                                                                                         
    for (j=1; j<=cols; j++) {                                                                                                                              
              current = attachMovie("openCircle_mc", "openCircle_mc"+i+"_"+j,getNextHighestDepth());
              current._x = leftMargin + ((i-1) * (spacing + current._width));
              current._y = topMargin + ((j-1) * (spacing + current._height));
              current2 = attachMovie("filledCircle_mc", "filledCircle_mc"+i+"_"+j, getNextHighestDepth());
              current2._x = leftMargin + ((i-1) * (spacing + current2._width));
              current2._y = topMargin + ((j-1) * (spacing + current2._height));
              //open circle initially invisible, then visible on rollOver
              current._alpha = 0;
              //filled circles initially invisible
              currentCol2=(current2._x-leftMargin)/(spacing + current2._width);
              currentRow2=(current2._y-topMargin)/(spacing + current2._height);
                                     if (drilled[currentCol,currentRow]==true){
                                                      current2._alpha = 100;
                                                      }else{
                                                                current2._alpha=0;
              //open circle visible on rollover
              current.onRollOver = function() {
                                     this._alpha = 100;
                                     currentCol=(this._x-leftMargin)/(spacing + current._width);
                                     trace("current column ="+currentCol);
                                     currentRow=(this._y-topMargin)/(spacing + current._height);
                                     trace("current row ="+currentRow);
                                     if (drilled[currentCol,currentRow]==false){
                                              trace("Click on the grid point to drill at "+rowLabel[currentRow]+","+colLabel[currentCol]);
                                  }else{
                                              trace("Click on the grid point to review the core at "+rowLabel[currentRow]+","+colLabel[currentCol]);
                                  }     //end 'if-else'
              //open circle invisible on rollout
              current.onRollOut = function() {
                                     this._alpha = 0;
                                     trace("No grid point selected")
              //click on open circle - variable drilled becomes true
              current.onRelease=function(){
                        drilled[currentCol,currentRow]=true;
                        trace(drilled[currentCol,currentRow]);
                        this.removeMovieClip();
    This is an image of the grid showing an 'openCircle' visible when rolled over

    Thanks for the explanation. That was very helpful.
    However, I am having problems with the variables. I did as you suggested though and extended the (grid) layer, but had to create a separate keyframe for the code layer, as that code had to execute first before moving into the next frame. See below (I've also attached the fla, but if you need any more information, please let me know):
    In frame 2 of the animation, if an open circle mc is clicked, that mc is deactivated (removed), drilled becomes true for that coordinate, a filled circle becomes visible in its place and you enter another frame(3) (this is currently just a test frame), to later be used to implement the drilling animation for a clicked coordinate.
    It all seems to be working as it should, until the open circle is clicked and you enter frame 3. See below:
    All the instances of the openCircle mc's are still active in frame 3, so I guess I need to use removeMovieClip(). I know how to do that for a single instance, but howdo I execute that if they're in an array?
    I also don't want any instances of the filledCircles from frame 2 to be visible in frame 3. I'm not sure how to hide them temporarily in frame 3 and then have them visible again in frame 2?
    When I go back to frame 2 (using a back button), all of the filled circles in the array are visible, whereas only the ones that have been previously clicked (drilled = true) should be visible. However, when I return to frame 2 and do a trace to find out which coordinates are set to true/false, it seems that a whole row is now set to (drilled = true), whereas it should just be a single coordinate set to true. Oddly enough, the variable seems to working properly in frame 2 when the code is first executed, but then when I go to frame 3 and then re enter frame 2, it's not working as it should do. Below is the trace code that I've used:
    if (drilled[currentCol,currentRow] == false) {
                                            trace("Click on the grid point to drill at " + rowLabel[currentRow] + "," + colLabel[currentCol]);
                                  } else {
                                            trace("Click on the grid point to review the core at " + rowLabel[currentRow] + "," + colLabel[currentCol]);
    If you could help, I'd be very grateful! Very many thanks.
    http://synergese.co.uk/boreholes15.fla
    Message was edited by: Pippa01
    Sorry, Although the original question was correct, I've just unmarked it as correct. Maybe, I should have started it as a new thread?

  • To the left are 3 balls, red, yello, green, that go around in a circle. when i click on them it says download helper, what is that for and how do I learn more about them?

    to the left of the URL are 3 balls, red, yellow, green, that go around in a circle. when i click on them it says download helper, what is that for and how do I learn more about them?

    Thanks, this is very helpful, and resolved my question
    dan

  • Creating a circle with 100 equal spaced, equal sized wedges within it.

    I need to create a 100 wedges 'spinning wheel' graphic (like a pie chart but does not require pie chart functionality) with each wedge of equal size and spacing but can't seem to find a process that works. Any help greatly ppreciated.

    Welcome to the forum
    As mentioned above you can try using the "polar" grid tool: width/height = desired, concentric dividers = 0, radial dividers = 100
    Another approach would be the following:
    1.) Draw your circle at the desired size
    2.) With the line segment tool draw from the center of your circle out past the top edge
    3.) Select the newly drawn line only
    4.) Effect (menu) > Transform, Copies = 100, registration point = bottom, rotation = 3.6 (360/100)
    5.) Expand appearance on the line that has the Transform Effect applied to it
    6.) With all the lines and circle selected: Pathfinder > Divide
    7.) Ungroup
    8.) Do whatever you want now with the 100 individual wedges
    Hope something proves useful to your efforts, again welcome to the forum.

  • How to draw a 2d circle or 3d ball using opengl es

    hello i am not able to draw a ball using opengles and finding its center.
    and i have to move this ball using touch event or acclerometer. any suggestions please help

    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.setColor(Color.BLACK);
        int centerX = 200;
        int centerY = 200;
        int numPoints = 10;
        double radius = 100;
        double angleIncrement = Math.PI * 2 / numPoints;
        double tempAngle = 0.0;
        for (int i = 0; i < numPoints; ++i) {
            double x = Math.cos(tempAngle) * radius + centerX;
            double y = Math.sin(tempAngle) * radius + centerY;
            g.fillOval((int)x, (int)y, 5, 5);
            tempAngle += angleIncrement;
    }

  • HT1338 circle ball pops up at every move on my mac

    Every action i do on my Macbook pro.. standard issues from Apple.. now hangs.. the **** circul rainbow spinning ball pops up all the time.. even when typing this message .. it happeds 4 times making it really hard event to type.. the machine is only 4 months old..
    what can be possibly wrong?
    I'm only running the basic stuff like Pages Numbers and Internet Mozilla..
    What the ****..
    TD

    Hi..
    the machine is only 4 months old..
    Try  Starting up in Safe Mode.
    A Safe Mode boot deletes system caches that may help.
    A Safe Mode boot takes longer than a normal boot so be patient. Once you see the Desktop, click the Apple menu icon top left corner of the screen. From the drop down menu click Resetart.
    If that didn't help, since you are running Lion, use Lion Recovery to repair the startup disk if necessary, or reinstall the Mac OS X.
    edited by:  cs

  • How can i arrange circles in a space with minimum given spacing?

    with illustrator how can i arrange circular object in a space?
    look at the image i've done (with paint lol)
    say for example that i have 12 of 3 different sized circle and i want it auto-arranged in a square but with a space in between of 1 mm, how can i do that?
    [IMG]http://img543.imageshack.us/img543/6379/circles.png[/IMG][/URL]

    see here: http://forums.adobe.com/thread/732621?decorator=print&displayFullThread=true

  • Slow Mac with recurrent spinning ball of doom

    Please help,
    My Mac has always been slow since I had it and migrated my PC content to my Mac.  I have run EtreCheck and hope that this might illuminate the cause of my issues, but worry that it may not.  ANYTHING I ask the Mac to do will be slow and inevitably cause a spinning ball for a while.  I have kept the system up to date.  I have a lot of photos in iPhoto but can't imagine this can be the cause?
    Any help is much appreciated.  The Etrecheck output is below:
    Many thanks.
    Problem description:
    Slow Mac with poor internet connectivity and recurrent spinning circle of doom
    EtreCheck version: 2.1.6 (109)
    Report generated 16 January 2015 20:09:37 GMT
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Support] links for help with non-Apple products.
    Click the [Details] links for more information about that line.
    Click the [Adware] links for help removing adware.
    Hardware Information: ℹ️
      MacBook Pro (15-inch, Mid 2012) (Technical Specifications)
      MacBook Pro - model: MacBookPro9,1
      1 2.3 GHz Intel Core i7 CPU: 4-core
      4 GB RAM Upgradeable
      BANK 0/DIMM0
      2 GB DDR3 1600 MHz ok
      BANK 1/DIMM0
      2 GB DDR3 1600 MHz ok
      Bluetooth: Good - Handoff/Airdrop2 supported
      Wireless:  en1: 802.11 a/b/g/n
      Battery Health: Normal - Cycle count 110
    Video Information: ℹ️
      Intel HD Graphics 4000
      Color LCD 1440 x 900
      NVIDIA GeForce GT 650M - VRAM: 512 MB
    System Software: ℹ️
      OS X 10.10.1 (14B25) - Time since boot: 10 days 7:54:28
    Disk Information: ℹ️
      APPLE HDD ST500LM012 disk0 : (500.11 GB)
      EFI (disk0s1) <not mounted> : 210 MB
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      Macintosh HD (disk1) / : 498.88 GB (226.60 GB free)
      Core Storage: disk0s2 499.25 GB Online
      MATSHITADVD-R   UJ-8A8 
    USB Information: ℹ️
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Computer, Inc. IR Receiver
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Inc. BRCM20702 Hub
      Apple Inc. Bluetooth USB Host Controller
    Thunderbolt Information: ℹ️
      Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
      Mac App Store and identified developers
    Problem System Launch Agents: ℹ️
      [killed] com.apple.CallHistoryPluginHelper.plist
      [killed] com.apple.EscrowSecurityAlert.plist
      [killed] com.apple.icloud.fmfd.plist
      [killed] com.apple.Maps.pushdaemon.plist
      [killed] com.apple.printtool.agent.plist
      [killed] com.apple.scopedbookmarkagent.xpc.plist
      [killed] com.apple.spindump_agent.plist
      [killed] com.apple.telephonyutilities.callservicesd.plist
      8 processes killed due to memory pressure
    Problem System Launch Daemons: ℹ️
      [killed] com.apple.AssetCacheLocatorService.plist
      [killed] com.apple.ctkd.plist
      [killed] com.apple.emond.aslmanager.plist
      [killed] com.apple.ifdreader.plist
      [killed] com.apple.nehelper.plist
      [killed] com.apple.periodic-daily.plist
      [killed] com.apple.periodic-monthly.plist
      [killed] com.apple.periodic-weekly.plist
      [killed] com.apple.wdhelper.plist
      [killed] com.apple.xpc.smd.plist
      [killed] org.cups.cupsd.plist
      11 processes killed due to memory pressure
    Launch Agents: ℹ️
      [running] com.mcafee.menulet.plist [Support]
      [running] com.mcafee.reporter.plist [Support]
      [loaded] com.oracle.java.Java-Updater.plist [Support]
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist [Support]
      [running] com.bombich.ccchelper.plist [Support]
      [invalid?] com.mcafee.ssm.ScanFactory.plist [Support]
      [invalid?] com.mcafee.ssm.ScanManager.plist [Support]
      [running] com.mcafee.virusscan.fmpd.plist [Support]
      [loaded] com.microsoft.office.licensing.helper.plist [Support]
      [loaded] com.oracle.java.Helper-Tool.plist [Support]
      [running] com.oracle.java.JavaUpdateHelper.plist [Support]
    User Launch Agents: ℹ️
      [loaded] com.adobe.ARM.[...].plist [Support]
      [loaded] com.f-secure.sync.BTCloud.plist [Support]
      [loaded] com.google.keystone.agent.plist [Support]
    User Login Items: ℹ️
      iTunesHelper Application  (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
      Dropbox Application  (/Applications/Dropbox.app)
      Mail Application  (/Applications/Mail.app)
      BT Cloud Application  (/Applications/BT Cloud.app)
    Internet Plug-ins: ℹ️
      SiteAdvisor: Version: 2.0 - SDK 10.1 [Support]
      FlashPlayer-10.6: Version: 16.0.0.257 - SDK 10.6 [Support]
      QuickTime Plugin: Version: 7.7.3
      Flash Player: Version: 16.0.0.257 - SDK 10.6 [Support]
      Default Browser: Version: 600 - SDK 10.10
      CitrixICAClientPlugIn: Version: 11.1.0 [Support]
      SharePointBrowserPlugin: Version: 14.4.7 - SDK 10.6 [Support]
      Silverlight: Version: 5.1.30214.0 - SDK 10.6 [Support]
      MeetingJoinPlugin: Version: Unknown - SDK 10.6 [Support]
      JavaAppletPlugin: Version: Java 7 Update 71 Check version
    Safari Extensions: ℹ️
      SiteAdvisor [Installed]
    3rd Party Preference Panes: ℹ️
      Citrix online plug-in  [Support]
      Flash Player  [Support]
      Java  [Support]
    Time Machine: ℹ️
      Skip System Files: NO
      Mobile backups: OFF
      Auto backup: NO - Auto backup turned off
      Volumes being backed up:
      Macintosh HD: Disk size: 498.88 GB Disk used: 272.28 GB
      Destinations:
      My Book [Local]
      Total size: 2.00 TB
      Total number of backups: 0
      Oldest backup: -
      Last backup: -
      Size of backup disk: Excellent
      Backup size 2.00 TB > (Disk size 498.88 GB X 3)
    Top Processes by CPU: ℹ️
          6% WindowServer
          1% BT Cloud
          0% ocspd
          0% fontd
          0% AppleSpell
    Top Processes by Memory: ℹ️
      180 MB Mail
      113 MB com.apple.WebKit.WebContent
      103 MB BT Cloud
      94 MB Safari
      77 MB Google Chrome
    Virtual Memory Information: ℹ️
      41 MB Free RAM
      1.18 GB Active RAM
      1.16 GB Inactive RAM
      918 MB Wired RAM
      54.83 GB Page-ins
      725 MB Page-outs
    Diagnostics Information: ℹ️
      Jan 16, 2015, 01:20:19 PM /Users/[redacted]/Library/Logs/DiagnosticReports/Finder_2015-01-16-132019_[reda cted].crash

    1. This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve the problem. But with the aid of the test results, the solution may take a few minutes, instead of hours or days.
    Don't be put off by the complexity of these instructions. The process is much less complicated than the description. You do harder tasks with the computer all the time.
    2. If you don't already have a current backup, back up all data before doing anything else. The backup is necessary on general principle, not because of anything in the test procedure. Backup is always a must, and when you're having any kind of trouble with the computer, you may be at higher than usual risk of losing data, whether you follow these instructions or not.
    There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    3. Below are instructions to run a UNIX shell script, a type of program. As I wrote above, it changes nothing. It doesn't send or receive any data on the network. All it does is to generate a human-readable report on the state of the computer. That report goes nowhere unless you choose to share it. If you prefer, you can act on it yourself without disclosing the contents to me or anyone else.
    You should be wondering whether you can believe me, and whether it's safe to run a program at the behest of a stranger. In general, no, it's not safe and I don't encourage it.
    In this case, however, there are a couple of ways for you to decide whether the program is safe without having to trust me. First, you can read it. Unlike an application that you download and click to run, it's transparent, so anyone with the necessary skill can verify what it does.
    You may not be able to understand the script yourself. But variations of it have been posted on this website thousands of times over a period of years. The site is hosted by Apple, which does not allow it to be used to distribute harmful software. Any one of the millions of registered users could have read the script and raised the alarm if it was harmful. Then I would not be here now and you would not be reading this message. See, for example, this discussion.
    Nevertheless, if you can't satisfy yourself that these instructions are safe, don't follow them. Ask for other options.
    4. Here's a summary of what you need to do, if you choose to proceed:
    ☞ Copy a line of text in this window to the Clipboard.
    ☞ Paste into the window of another application.
    ☞ Wait for the test to run. It usually takes a few minutes.
    ☞ Paste the results, which will have been copied automatically, back into a reply on this page.
    The sequence is: copy, paste, wait, paste again. You don't need to copy a second time. Details follow.
    5. You may have started the computer in "safe" mode. Preferably, these steps should be taken in “normal” mode, under the conditions in which the problem is reproduced. If the system is now in safe mode and works well enough in normal mode to run the test, restart as usual. If you can only test in safe mode, do that.
    6. If you have more than one user, and the one affected by the problem is not an administrator, then please run the test twice: once while logged in as the affected user, and once as an administrator. The results may be different. The user that is created automatically on a new computer when you start it for the first time is an administrator. If you can't log in as an administrator, test as the affected user. Most personal Macs have only one user, and in that case this section doesn’t apply. Don't log in as root.
    7. The script is a single long line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, though you may not see all of it in the browser window, and you can then copy it. If you try to select the line by dragging across the part you can see, you won't get all of it.
    Triple-click anywhere in the line of text below on this page to select it:
    PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/libexec;clear;cd;p=({Soft,Hard}ware Memory Diagnostics Power FireWire Thunderbolt USB Bluetooth SerialATA Extensions Applications Frameworks PrefPane Fonts 1024 85 percent 20480 1 MB/s 25000 ports KiB/s DYLD_INSERT_LIBRARIES\ DYLD_LIBRARY_PATH 25 "` route -n get default|awk '/e:/{print $2}' `" 25 N\\/A down up 102400 25600 recvfrom sendto CFBundleIdentifier 25 25 25 1000 MB 'com.adobe.AAM.Updater-1.0 com.adobe.AAM.Updater-1.0 com.adobe.AdobeCreativeCloud com.adobe.CS4ServiceManager com.adobe.CS5ServiceManager com.adobe.fpsaud com.adobe.SwitchBoard com.adobe.SwitchBoard com.apple.aelwriter com.apple.AirPortBaseStationAgent com.apple.FolderActions.enabled com.apple.installer.osmessagetracing com.apple.mrt.uiagent com.apple.ReportCrash.Self com.apple.rpmuxd com.apple.SafariNotificationAgent com.apple.usbmuxd com.citrixonline.GoToMeeting.G2MUpdate com.google.keystone.agent com.google.keystone.daemon com.microsoft.office.licensing.helper com.oracle.java.Helper-Tool com.oracle.java.JavaUpdateHelper com.oracle.java.JavaUpdateHelper org.macosforge.xquartz.privileged_startx org.macosforge.xquartz.privileged_startx org.macosforge.xquartz.startx' '879294308 4071182229 461455494 3627668074 1083382502 1274181950 1855907737 2758863019 1848501757 464843899 3694147963 1233118628 2456546649 2806998573 2778718105 2636415542 842973933 2051385900 3301885676 891055588 998894468 695903914 1443423563 4136085286 523110921 2883943871 3873345487' 51 5120 files 4 1000 25 5120 -\\t PlistBuddy{,' 2>&1'}' -c Print' OSBundleRequired 1157 20 ' function f() { n++;sub(/^/,"^");gsub(/\./,"\\.");gsub(/\+/,"\\+");gsub(/\-/,"\\-");gsub(/\?/,"\\?");print|"sort|uniq";};function g(N,d) { if(n<N) print d;};' );N5=${#p[@]};p[N5]=` networksetup -listnetworkserviceorder|awk ' NR>1 { sub(/^\([0-9]+\) /,"");n=$0;getline;} $NF=="'${p[26]}')" { sub(/.$/,"",$NF);print n;exit;} ' `;f=(\\n%s{:\ ,\\n\\n}%s\\n '\nRAM details\n%s\n' %s\ %s '%s\n'"${p[50]}"'%s\n' '%s (UID %s) is using %s %s' '\nContents of %s\n   '"${p[50]}"'mod date: %s\n   '"${p[50]}"'checksum: %s\n%s\n' '\n   ...and %s more line(s)\n' 'RSSI: %s\nNoise: %s\nTx rate: %s\n' {Privacy,Mode}': %s\n' );S0() { echo ' { q=$NF+0;$NF="";u=$(NF-1);$(NF-1)="";gsub(/^ +| +$/,"");if(q>='${p[$1]}') printf("'"${f[5]}"'",$0,u,q,"'${p[$2]}'");} ';};s=(' s/[0-9A-Za-z._]+@[0-9A-Za-z.]+\.[0-9A-Za-z]{2,4}/EMAIL/g;/faceb/s/(at\.)[^.]+/\1NAME/g;/\/Shared/!s/(\/Users\/)[^ /]+/\1USER/g;s/[-0-9A-Fa-f]{22,}/UUID/g;' ' s/^ +//;/de: S|[nst]:/p;' ' {sub(/^ +/,"")};/er:/;/y:/&&$2<'${p[46]} ' 1s/://;3,6d;/[my].+:/d;s/^ {4}//;H;${ g;s/\n$//;/s: (E[^m]|[^EO])|x([^08]|02[^F]|8[^0])/p;} ' ' 5h;6{ H;g;/P/!p;} ' ' ($1~/^Cy/&&$3>'${p[47]}')||($1~/^Cond/&&$2!~/^N/) ' ' /:$/{ N;/:.+:/d;s/ *://;b0'$'\n'' };/^ *(V.+ [0N]|Man).+ /{ s/ 0x.... //;s/[()]//g;s/(.+: )(.+)/ (\2)/;H;};$b0'$'\n'' d;:0'$'\n'' x;s/\n\n//;/Apple[ ,]|Genesy|Intel|SMSC/d;s/\n.*//;/\)$/p;' ' s/^.*C/C/;H;${ g;/No th|pms/!p;} ' '/= [^GO]/p' '{$1=""};1' ' /Of/!{ s/^.+is |\.//g;p;} ' "${p[56]}"\ ' $0&&!/ /{f()} END{g(10,"^com\.apple\.")} ' ' { sub(/ :/,"");print|"tail -n'${p[48]}'";} ' ' NR==2&&$4<='${p[49]}' { print $4;} ' ' END { $2/=256;if($2>='${p[15]}') print int($2) } ' ' NR!=13{next};{sub(/[+-]$/,"",$NF)};'"`S0 21 22`" 'NR!=2{next}'"`S0 37 17`" ' NR!=5||$8!~/[RW]/{next};{ $(NF-1)=$1;$NF=int($NF/10000000);for(i=1;i<=3;i++){$i="";$(NF-1-i)="";};};'"`S0 19 20`" 's:^:/:p;' '/\.kext\/(Contents\/)?Info\.plist$/p' 's/^.{52}(.+) <.+/\1/p' ' /Launch[AD].+\.plist$/ { n++;print;} END { if(n<200) print "/System/";} ' '/\.xpc\/(Contents\/)?Info\.plist$/p' ' NR>1&&$3!~/0x|\.([0-9]{3,}|[-0-9A-F]{36}|apple\.launchctl\.(Aqua|Background|System))$/ { print $3":"$2;} ' ' /\.(framew|lproj)|\):/d;/plist:|:.+(Mach|scrip)/s/:.+//p ' '/^root$/p' "${p[56]}"\ ' /\.(bundle|component|framework|kext|mdimporter|plugin|qlgenerator|saver|wdgt)$/{f()} END{g(900,"^/System/")} ' ' /\.dylib$/!d;s/(\.|\+|\-|\?)/\\\1/g;s/^/^/p;' "${p[56]}"\ ' /Temp|emac/{next};/(etc|Preferences|Launch[AD].+)\// { sub(".(/private)?","");f();} END { split("'"${p[41]}"'",b);split("'"${p[42]}"'",c);for(i in b) print b[i]"\.plist\t"c[i];g(500,"Launch");} ' ' /^\/(Ap|Dev|Inc|Prev)/d;/(ok.+dle|\.(component|mailbundle|mdimporter|plugin|qlgenerator|saver|wdgt))$/p;' 's/Pr.+n //p' ' BEGIN{FS=":"};{ if($1~/\.kext$/) { s=system("'"${p[51]}"'\\ :'${p[53]}' "$1"/*/I*|grep -q Sa");if(!s) $1=$1" S";if(!$2) $2="'"${p[28]}"'";printf("'"${f[4]}"'",$1,$2);} else print;} ' p '{print $3"\t"$1}' 's/\'$'\t''.+//p' 's/1/On/p' '/Prox.+: [^0]/p' '$2>'${p[43]}'{$2=$2-1;print}' ' BEGIN { i="'${p[26]}'";M1='${p[16]}';M2='${p[18]}';M3='${p[31]}';M4='${p[32]}';} !/^A/{next};/%/ { getline;if($5<M1) a="user "$2"%, system "$4"%";} /disk0/&&$4>M2 { b=$3" ops/s, "$4" blocks/s";} $2==i { if(c) { d=$3+$4+$5+$6;next;};if($4>M3||$6>M4) c=int($4/1024)" in, "int($6/1024)" out";} END { if(a) print "CPU: "a;if(b) print "I/O: "b;if(c) print "Net: "c" (KiB/s)";if(d) print "Net errors: "d" packets/s";} ' ' /r\[0\] /&&$NF!~/^1(0|72\.(1[6-9]|2[0-9]|3[0-1])|92\.168)\./ { print $NF;exit;} ' ' !/^T/ { printf "(static)";exit;} ' '/apsd|BKAg|OpenD/!s/:.+//p' ' (/k:/&& $3!~/(255\.){3}0/)||(/v6:/&&$2!~/A/) ' ' $1=="op" {m=$3};$1~"lN" {N=$2};$1~"lR" {S=$2};$1~"Tx" {T=$2};$1~/^st/ {s=$2};$1~"li"&&$3!~"wpa2" {printf("'"${f[9]}"'",toupper($3))};END { if(S*N*T&&(S-N<'${p[25]}'||T<'${p[55]}')) printf("'"${f[8]}"'",S,N,T);if(s~/^r/&&m!~/^st/) printf("'"${f[10]}"'",m);} ' ' BEGIN { FS=":";p="uniq -c|sed -E '"'s/ +\\([0-9]+\\)\\(.+\\)/\\\2 x\\\1/;s/x1$//'"'";} { n=split($3,a,".");sub(/_2[01].+/,"",$3);print $2" "$3" "a[n]$1|p;b=b$1;} END { close(p);if(b) print("\n\t* Code injection");} ' ' NR!=4{next} {$NF/=10240} '"`S0 27 23`" ' END { if($3~/[0-9]/)print$3;} ' ' BEGIN { L='${p[36]}';} !/^[[:space:]]*(#.*)?$/ { l++;if(l<=L) f=f"\n   "$0;} END { F=FILENAME;if(!F) exit;if(!f) f="\n   [N/A]";"cksum "F|getline C;split(C, A);C=A[1];"stat -f%Sm "F|getline D;"file -b "F|getline T;if(T~/^Apple b/) { f="";l=0;while("'"${p[51]}"' "F|getline g) { l++;if(l<=L) f=f"\n   "g;};};if(T!~/^(AS.+ (En.+ )?text(, with v.+)?$|(Bo|PO).+ sh.+ text ex|XM)/) F=F"\n   '"${p[50]}"'"T;printf("'"${f[6]}"'",F,D,C,f);if(l>L) printf("'"${f[7]}"'",l-L);} ' ' s/^ ?n...://p;s/^ ?p...:/-'$'\t''/p;' 's/0/Off/p' ' END{print NR} ' ' /id: N|te: Y/{i++} END{print i} ' ' / / { print "'"${p[28]}"'";exit;};1;' '/ en/!s/\.//p' ' NR!=13{next};{sub(/[+-M]$/,"",$NF)};'"`S0 39 40`" ' $10~/\(L/&&$9!~"localhost" { sub(/.+:/,"",$9);print $1": "$9|"sort|uniq";} ' '/^ +r/s/.+"(.+)".+/\1/p' 's/(.+\.wdgt)\/(Contents\/)?Info\.plist$/\1/p' 's/^.+\/(.+)\.wdgt$/\1/p' ' /l: /{ /DVD/d;s/.+: //;b0'$'\n'' };/s: /{ /V/d;s/^ */- /;H;};$b0'$'\n'' d;:0'$'\n'' x;/APPLE [^:]+$/d;p;' ' /^find: /d;p;' "`S0 44 45`" ' BEGIN{FS="= "} /Path/{print $2} ' ' /^ *$/d;s/^ */   /;' ' s/^.+ |\(.+\)$//g;p ' '/\.(appex|pluginkit)\/Contents\/Info\.plist$/p' ' /2/{print "WARN"};/4/{print "CRITICAL"};' ' /EVHF|MACR|^s/d;s/^.+: //p;' ' $3~/^[1-9][0-9]{0,2}(\.[1-9][0-9]{0,2}){2}$/ { i++;n=n"\n"$1"\t"$3;} END { if(i>1) print n;} ' ' s/:[^:]+$//;s/ +([0-9]+)(.+)/\2: \1/p;' ' { gsub(/[()"]/,"",$3);if($2!="="||!$3) $3="N/A";print $3;} ' ' /es: ./{ s/^.+://;b0'$'\n'' };/^ +C.+ted: +[NY]/H;/:$/b0'$'\n'' d;:0'$'\n'' x;/: +N/d;s/\n.+//p;' ' 1d;/:$/b0'$'\n'' $b0'$'\n'' /(D|^ *Loc.+): /{ s/^.+: //;H;};/(By|m): /H;d;:0'$'\n'' x;/[my]: [AM]|^\/Vo/d;s/(^|\n) [ -~]+//g;s/(.+)\n(.+)/\2:\1/;s/\n//g;/[ -~]/p;' 's/$/:(0|\-(4[34])?)$/p' ' BEGIN{FS=":"};{ if($2) { $2="status: "$2;printf("'"${f[4]}"'",$1,$2);} else print $1;} ' );c1=(system_profiler pmset\ -g nvram fdesetup find syslog df vm_stat sar ps crontab iotop top pkgutil "${p[52]}\\" whoami cksum kextstat launchctl smcDiagnose sysctl\ -n defaults\ read stat lsbom 'mdfind -onlyin /' ' for i in ${p[24]};do ${c1[18]} ${c2[27]} $i;done;' pluginkit scutil dtrace profiles sed\ -En awk /S*/*/P*/*/*/C*/*/airport networksetup mdutil lsof test osascript\ -e netstat mdls kextfind );S1() { printf kMDItemContentTypeTree=com.apple.$1;};S2() { printf 'L*/Ca*/com.ap*.Saf*/E*/* -d 1 -name In*t -exec '"${c1[14]}"' :'$1' {} \;|uniq';};c2=(com.apple.loginwindow\ LoginHook ' /L*/P*/loginw*' "'tell app \"System Events\" to get properties of login items'|tr , \\\n" "`S2 CFBundleDisplayName`" '~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \)' '-F \$Message -k Sender kernel -k Message CSeq "I/O e"|sort|uniq -c' :${p[35]} :Label '{/,}L*/{Con,Pref}* -type f ! -size 0 -name *.plist -exec plutil -s {} \;' "-f'%N: %l' Desktop L*/Keyc*" therm sysload boot-args status " -F '\$Time \$(RefProc): \$Message' -k Sender Req 'fsev|kern|launchd' -k RefProc Rne 'Aq|WebK' -k Message Rne '08012|Goog|ksadm|probe|Roame|SMC:|smcD|sserti|suhel| VALI|ver-r|xpma' -k Message Req 'abn|bad |Beac|caug|corru|dead[^bl]|FAIL|fail|GPU |hfs: Ru|idle ex|inval|jnl:|last value [1-9]|NVDA\(|pagin|pci pa|proc: t|Roamed|rror|SL|TCON|Throttli|tim(ed? ?|ing )o|WARN' " '-du -n DEV -n EDEV 1 10' 'acrx -o comm,ruid,%cpu' '-t1 10 1' '-f -pfc /var/db/r*/com.apple.*.{BS,Bas,Es,J,OSXU,Rem,up}*.bom' '{/,}L*/Lo*/Diag* -type f -regex .\*[cght] ! -name .?\* ! -name \*ag \( -exec grep -lq "^Thread c" {} \; -exec printf \* \; -o -true \) -execdir stat -f:%Sc:%N -t%F {} \;|sort -t: -k2 |tail -n'${p[38]} '/S*/*/Ca*/*xpc* >&- ||echo No' '-L /{S*/,}L*/StartupItems -type f -exec file {} +' "`S1 "{bundle,mach-o-dylib}"`" "`S2 ${p[35]}`" "/e*/{auto,{cron,fs}tab,hosts,{[lp],sy}*.conf,mach_i*/*,pam.d/*,ssh{,d}_config,*.local} {,/usr/local}/etc/periodic/*/* /L*/P*{,/*}/com.a*.{Bo,sec*.ap}*t {/S*/,/,}L*/Lau*/*t .launchd.conf" list getenv /Library/Preferences/com.apple.alf\ globalstate --proxy '-n get default' -I --dns -get{dnsservers,info}\ "${p[N5]}" -P -m\ / '' -n1 '-R -l1 -n1 -o prt -stats command,uid,prt' '--regexp --files com.apple.pkg.*|sort|uniq' -kl -l -s\ / '-R -l1 -n1 -o mem -stats command,uid,mem' '+c0 -i4TCP:0-1023' com.apple.dashboard\ layer-gadgets '-d /L*/Mana*/$USER&&echo On' '-app Safari WebKitDNSPrefetchingEnabled' "+c0 -l|awk '{print(\$1,\$3)}'|sort|uniq -c|sort -n|tail -1|awk '{print(\$2,\$3,\$1)}'" -m 'L*/{Con*/*/Data/L*/,}Pref* -type f -size 0c -name *.plist.???????|wc -l' kern.memorystatus_vm_pressure_level '3>&1 >&- 2>&3' " -F '\$Time \$Message' -k Sender kernel -k Message CSeq 'n Cause: -' " -i '-app Safari UserStyleSheetEnabled' -name\ kMDItem${p[35]} '-nl -print' );N1=${#c2[@]};for j in {0..14};do c2[N1+j]=SP${p[j]}DataType;done;N2=${#c2[@]};for j in 0 1;do c2[N2+j]="-n ' syscall::'${p[33+j]}':return { @out[execname,uid]=sum(arg0) } tick-10sec { trunc(@out,1);exit(0);} '";done;l=({Restricted\ ,Lock,Pro}files POST Battery {Safari,App,{Bad,Loaded}\ kernel}\ extensions Heat System\ load boot\ args FileVault Diagnostic\ reports Log {Free\ space,Swap}' (MiB)' Activity 'CPU per process' Login\ hook 'I/O per process' Mach\ ports User Daemons Agents XPC\ cache Startup\ items {Admin,Root}\ access Bundles {,Inserted\ }dylibs Stylesheet Font\ issues Firewall Proxies DNS TCP/IP Wi-Fi 'Elapsed time (sec)' {Root,User}\ crontab {Global,User}' login items' Spotlight Memory Listeners Widgets Parental\ Controls Prefetching Nets Descriptors Bad\ plists I/O\ errors Memory\ pressure SMC Shutdowns 'High file counts' );N3=${#l[@]};for i in {0..8};do l[N3+i]=${p[5+i]};done;N4=${#l[@]};for j in 0 1;do l[N4+j]="Current ${p[29+j]}stream data";done;A0() { Q=5;v[2]=1;id -G|grep -qw 80;v[1]=$?;((v[1]))||{ Q=7;sudo true;v[2]=$?;((v[2]))||Q=8;};v[3]=`date +%s`;clear >&-;date '+Start time: %T %D%n';printf "Revision: %s\n\n" ${p[54]};};for i in 0 1;do eval ' A'$((1+i))'() { v=` eval "${c1[$1]} ${c2[$2]}"|'${c1[30+i]}' "${s[$3]}" `;[[ "$v" ]];};A'$((3+i))'() { v=` while read i;do [[ "$i" ]]&&eval "${c1[$1]} ${c2[$2]}" \"$i\"|'${c1[30+i]}' "${s[$3]}";done<<<"${v[$4]}" `;[[ "$v" ]];};A'$((5+i))'() { v=` while read i;do '${c1[30+i]}' "${s[$1]}" "$i";done<<<"${v[$2]}" `;[[ "$v" ]];};A'$((7+i))'() { v=` eval sudo "${c1[$1]} ${c2[$2]}"|'${c1[30+i]}' "${s[$3]}" `;[[ "$v" ]];};';done;A9(){ v=$((`date +%s`-v[3]));};B2(){ v[$1]="$v";};for i in 0 1;do eval ' B'$i'() { v=No;((v['$((i+1))']==0))&&v=;};B'$((3+i))'() { v[$2]=`'${c1[30+i]}' "${s[$3]}"<<<"${v[$1]}"`;} ';done;B5(){ v[$1]="${v[$1]}"$'\n'"${v[$2]}";};B6() { v=` paste -d: <(printf "${v[$1]}") <(printf "${v[$2]}")|awk -F: ' {printf("'"${f[$3]}"'",$1,$2)} ' `;};B7(){ v=`grep -Ev "${v[$1]}"<<<"$v"|sort`;};C0() { [[ "$v" ]]&&sed -E "$s"<<<"$v";};C1() { [[ "$v" ]]&&printf "${f[$1]}" "${l[$2]}" "$v"|sed -E "$s";};C2() { v=`echo $v`;[[ "$v" != 0 ]]&&C1 0 $1;};C3() { v=`sed -E "${s[63]}"<<<"$v"`&&C1 1 $1;};C4() { echo "Part $((++P)) of $Q done at $((`date +%s`-v[3])) sec">&4;};for i in 1 2 7 8;do for j in 0 2 3;do eval D$i$j'(){ A'$i' $1 $2 $3; C'$j' $4;};';done;done;{ A0;D20 0 $((N1+1)) 2;D10 0 $N1 1;B0;C2 27;B0&&! B1&&C2 28;D12 15 37 25 22;A1 0 $((N1+2)) 3;C0;D13 0 $((N1+3)) 4 3;D23 0 $((N1+4)) 5 4;D13 0 $((N1+9)) 59 $((N3+4));for i in 0 1 2;do D13 0 $((N1+5+i)) 6 $((N3+i));done;D13 0 $((N1+8)) 71 $((N3+3));D13 1 10 7 9;D13 1 11 8 10;B1&&D73 19 53 67 55;D22 2 12 9 11;D12 3 13 10 12;D23 4 19 44 13;B0&&{ D13 5 5 69 53;D13 5 54 30 56;C4;D23 5 14 12 14;C4;};D22 6 36 13 15;D22 20 52 66 54;D22 7 37 14 16;D23 8 15 38 17;D22 9 16 16 18;C4;B1&&{ D82 35 49 61 51;D82 11 17 17 20;for i in 0 1;do D82 28 $((N2+i)) 45 $((N4+i));done;C4;};D22 12 44 54 45;D22 12 39 15 21;D13 40 58 32 7;A1 13 40 18;B2 4;B3 4 0 19;A3 14 6 32 0;B4 0 5 11;C4;A1 17 41 20;B7 5;C3 8;B4 4 6 21;A3 14 7 32 6;B4 0 7 11;B3 4 0 22;A3 14 6 32 0;B4 0 8 11;B5 7 8;B3 7 7 73;B1&&{ A8 18 26 23;B7 7;B4 0 0 74;C3 23;};A2 18 26 23;B7 7;B4 0 0 74;C3 24;D13 4 21 24 26;B4 4 12 26;C4;for i in {0..3};do A1 0 $((N1+10+i)) 72;B7 12;B4 0 0 31;((i))&&{ B2 14;A4 39 57 70 14;B2 15;B6 14 15 4;};C3 $((N3+5+i));done;A1 24 22 29;B7 12;B2 14;A4 39 57 70 0;B2 15;B6 14 15 4;C3 29;C4;B3 4 13 27;A1 24 23 32;B7 13;C3 30;B3 4 0 65;A3 14 6 32 0;B4 0 16 11;A1 26 50 64;B7 16;C3 6;D13 25 37 32 31;A2 23 18 28;B2 16;A2 16 25 33;B7 16;B3 0 0 34;B2 21;A6 47 21&&C0;B1&&{ D73 21 0 32 19;D73 10 42 32 40;D82 29 35 46 2;};D23 14 1 62 42;D12 34 43 53 44;D12 22 20 32 25;D22 0 $((N1+14)) 51 33;D13 4 8 41 52;D12 21 28 35 34;D13 27 29 36 35;A2 27 32 39&&{ B2 19;A2 33 33 40;B2 20;B6 19 20 3;};C2 36;D23 38 55 68 50;D23 33 34 42 37;B1&&D83 35 45 55 46;D23 32 31 43 38;D12 36 47 32 48;D13 10 42 32 41;D13 37 2 48 43;A1 4 3 60;B2 30;A1 4 24 60;B2 31;B6 30 31 4;C3 5;D12 21 56 35 32;D12 21 48 49 49;B3 4 22 57;A1 21 46 56;B7 22;B3 0 0 58;C3 47;D22 4 4 50 0;D12 4 51 32 1;D23 22 9 37 57;A9;C2 39;C4;} 4>&2 2>/dev/null|pbcopy;exit 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    8. Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Click anywhere in the Terminal window and paste by pressing command-V. The text you pasted should vanish immediately. If it doesn't, press the return key.
    9. If you see an error message in the Terminal window such as "Syntax error" or "Event not found," enter
    exec bash
    and press return. Then paste the script again.
    10. If you're logged in as an administrator, you'll be prompted for your login password. Nothing will be displayed when you type it. You will not see the usual dots in place of typed characters. Make sure caps lock is off. Type carefully and then press return. You may get a one-time warning to be careful. If you make three failed attempts to enter the password, the test will run anyway, but it will produce less information. In most cases, the difference is not important. If you don't know the password, or if you prefer not to enter it, press the key combination control-C or just press return  three times at the password prompt. Again, the script will still run.
    If you're not logged in as an administrator, you won't be prompted for a password. The test will still run. It just won't do anything that requires administrator privileges.
    11. The test may take a few minutes to run, depending on how many files you have and the speed of the computer. A computer that's abnormally slow may take longer to run the test. While it's running, there will be a series of messages in the Terminal window like this:
    Part 1 of 8 done at … sec
    Part 8 of 8 done at … sec
    The messages won't be spaced equally apart in time, but they give a rough indication of progress. The total number of parts may be different from what's shown here.
    Wait for the final message
    [Process completed]
    to appear. If you don't see it within half an hour or so, the test probably won't complete in a reasonable time. In that case, close the Terminal window and report the last message you saw. No harm will be done.
    12. When the test is complete, quit Terminal. The results will have been copied to the Clipboard automatically. They are not shown in the Terminal window. Please don't copy anything from there. All you have to do is start a reply to this comment and then paste by pressing command-V again.
    At the top of the results, there will be a line that begins with the words "Start time." If you don't see that, but instead see a mass of gibberish, you didn't wait for the "Process completed" message to appear in the Terminal window. Please wait for it and try again.
    If any private information, such as your name or email address, appears in the results, anonymize it before posting. Usually that won't be necessary.
    13. When you post the results, you might see an error message on the web page: "You have included content in your post that is not permitted," or "You are not authorized to post." That's a bug in the forum software. Please post the test results on Pastebin, then post a link here to the page you created.
    14. This is a public forum, and others may give you advice based on the results of the test. They speak only for themselves, and I don't necessarily agree with them.
    Copyright © 2014 by Linc Davis. As the sole author of this work, I reserve all rights to it except as provided in the Use Agreement for the Apple Support Communities website ("ASC"). Readers of ASC may copy it for their own personal use. Neither the whole nor any part may be redistributed.

  • Why aren't the Balls Bouncing  ? HELP !

    Dear Java People,
    In doing a program that should have balls bouncing, I can see no balls bouncing !
    Below is the BallDemo class that has the bounce() method and the BouncingBall class that has the characteristics of a bouncing ball.
    There are no compilation errors which makes it a little bit
    difficult to find the error.
    Thank you in advance
    Stan
    import java.awt.*;
    //(d)
    import java.awt.Color;
    import java.util.Random;
    import java.awt.geom.*;
    //ex5.50 (a)
    import java.util.*;
    import java.io.*;
    * Class BallDemo - provides two short demonstrations showing how to use the
    * Canvas class.
    //(a) Change the bounce() method in the BallDemo class to let the user
    //choose how many balls should be bouncing
    //(b) Use a collection to store the balls
    //(c) Place the balls in a row along the top of the canvas.
    public class BallDemo
        private Canvas myCanvas;
        FormattedInput input;
         * Create a BallDemo object. Creates a fresh canvas and makes it visible.
        public BallDemo()
            myCanvas = new Canvas("Ball Demo", 600, 500);
            input = new FormattedInput();
            myCanvas.setVisible(true);
         * This method demonstrates some of the drawing operations that are
         * available on a Canvas object.
        public void drawDemo()
            myCanvas.setFont(new Font("helvetica", Font.BOLD, 14));
            myCanvas.setForegroundColor(Color.red);
            myCanvas.drawString("We can draw text, ...", 20, 50);
            myCanvas.wait(1000);
            myCanvas.setForegroundColor(Color.black);
            myCanvas.drawString("...draw lines...", 60, 70);
            myCanvas.wait(500);
            myCanvas.setForegroundColor(Color.blue);
            myCanvas.drawLine(200, 20, 300, 450);
            myCanvas.wait(500);
            myCanvas.setForegroundColor(Color.blue);
            myCanvas.drawLine(220, 100, 570, 260);
            myCanvas.wait(500);
            myCanvas.setForegroundColor(Color.green);
            myCanvas.drawLine(290, 10, 620, 220);
            myCanvas.wait(1000);
            myCanvas.setForegroundColor(Color.white);
            myCanvas.drawString("...and shapes!", 110, 90);
            myCanvas.setForegroundColor(Color.red);
                    // the shape to draw and move
            int xPos = 10;
            Rectangle rect = new Rectangle(xPos, 150, 30, 20);
            // move the rectangle across the screen
            for(int i = 0; i < 200; i ++) {
                myCanvas.fill(rect);
                myCanvas.wait(10);
                myCanvas.erase(rect);
                xPos++;
                rect.setLocation(xPos, 150);
            // at the end of the move, draw once more so that it remains visible
            myCanvas.fill(rect);
           //ex 5.48
           public void drawFrame()
             Dimension myDimension =new Dimension( myCanvas.getSize());
             //Rectangle rectangle = new Rectangle(10,10,myDimension.width,  myDimension.height);
             //page 136
            Rectangle rectangle = new Rectangle(10,10,580,480);
             myCanvas.fill(rectangle);
         * Simulates two bouncing balls
        public void bounce()
            int ground = 400;   // position of the ground line
            int numberOfBalls = 0;
            myCanvas.setVisible(true);
            ArrayList balls = new ArrayList();
            // draw the ground
            myCanvas.drawLine(50, ground, 550, ground);
            //ex 5.50 (a)
            System.out.println("Type in the number of balls you would like to see bouncing and hit enter");
              numberOfBalls = input.readInt();
             //(b)
             for(int i = 0; i < numberOfBalls; i++)
               //(c) (d)
            Random rg = new Random(255);
             BouncingBall newBall =  new BouncingBall(i + 100, 0, 16, new Color(rg.nextInt(255),rg.nextInt(255),rg.nextInt(255)), ground, myCanvas);
             //add the ball to the ArrayList object
            balls.add(newBall);
           for(int i = 0; i < numberOfBalls; i++)
                  BouncingBall ball = (BouncingBall)balls.get(i);
                  ball.draw();
              // make the balls bounce
              boolean finished =  false;
              while(!finished) {
               myCanvas.wait(50);           // small delay
               ball.move();
                // stop once ball has travelled a certain distance on x axis
                if(ball.getXPosition() >= 550 )
                    finished = true;
            }//move loop
                  ball.erase();
          }//for loop
        }//bounce method
    }//endof class
    ===================================================================
    import java.awt.*;
    import java.awt.geom.*;
    * Class BouncingBall - a graphical ball that observes the effect of gravity. The ball
    * has the ability to move. Details of movement are determined by the ball itself. It
    * will fall downwards, accelerating with time due to the effect of gravity, and bounce
    * upward again when hitting the ground.
    * This movement can be initiated by repeated calls to the "move" method.
    public class BouncingBall
        private static final int gravity = 3;  // effect of gravity
        private int ballDegradation = 2;
        private Ellipse2D.Double circle;
        private Color color;
        private int diameter;
        private int xPosition;
        private int yPosition;
        private final int groundPosition;      // y position of ground
        private Canvas canvas;
        private int ySpeed = 1;                // initial downward speed
         * Constructor for objects of class BouncingBall
         * @param xPos  the horizontal coordinate of the ball
         * @param yPos  the vertical coordinate of the ball
         * @param ballDiameter  the diameter (in pixels) of the ball
         * @param ballColor  the color of the ball
         * @param groundPos  the position of the ground (where the wall will bounce)
         * @param drawingCanvas  the canvas to draw this ball on
        public BouncingBall(int xPos, int yPos, int ballDiameter, Color ballColor,
                            int groundPos, Canvas drawingCanvas)
            xPosition = xPos;
            yPosition = yPos;
            color = ballColor;
            diameter = ballDiameter;
            groundPosition = groundPos;
            canvas = drawingCanvas;
         * Draw this ball at its current position onto the canvas.
        public void draw()
            canvas.setForegroundColor(color);
            canvas.fillCircle(xPosition, yPosition, diameter);
         * Erase this ball at its current position.
        public void erase()
            canvas.eraseCircle(xPosition, yPosition, diameter);
         * Move this ball according to its position and speed and redraw.
        public void move()
            // remove from canvas at the current position
            erase();
            // compute new position
            ySpeed += gravity;
            yPosition += ySpeed;
            xPosition +=2;
            // check if it has hit the ground
            if(yPosition >= (groundPosition - diameter) && ySpeed > 0) {
                yPosition = (int)(groundPosition - diameter);
                ySpeed = -ySpeed + ballDegradation;
            // draw again at new position
            draw();
         * return the horizontal position of this ball
        public int getXPosition()
            return xPosition;
         * return the vertical position of this ball
        public int getYPosition()
            return yPosition;
    }

    I'm not reading all of that. what do you see? here, try this out.
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.awt.geom.*;
    public class BallRoom extends Applet implements Runnable, MouseListener, ActionListener {
         Thread thread;
         Rectangle border;
         Ball[] theBalls;
         int numberOfBalls = 10;
         Image bufferedScreen;
         Graphics2D bufferedG;
         double xSpeed=3.0, ySpeed=0.0;
         double gravity=1.2;
         int bounds=600;
         int speed=50;
         Button fastBut=new Button("Faster"), slowBut=new Button("Slower");
         Panel controlPanel = new Panel();
         public void init() {
              fastBut.addActionListener(this);
              slowBut.addActionListener(this);
              controlPanel.setLayout(new GridLayout(1,2));
              controlPanel.add(fastBut);
              controlPanel.add(slowBut);
              this.add(controlPanel);
              addMouseListener(this);
              theBalls = new Ball[numberOfBalls];
              setSize(bounds,bounds);
              border = new Rectangle(0,0,getSize().width,getSize().height);
              setBackground(Color.white);
              for(int a=0;a<numberOfBalls;a++){
                   theBalls[a]=new Ball(Math.random()*bounds,Math.random()*bounds,Math.random()*40+5,new Color((int)(Math.random()*255),(int)(Math.random()*255),(int)(Math.random()*255)),border,gravity);
         public void start() {
              thread = new Thread(this);
              thread.start();
         public void run() {
              Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
              for(int a=0;a<numberOfBalls;a++){
                   theBalls[a].moveIt((int)(10-Math.random()*20),(int)(10-Math.random()*20));
              while(true){
                   for(int a=0;a<numberOfBalls;a++){
                        theBalls[a].moveIt();
                        for(int b=a+1;b<numberOfBalls;b++){
                             if(theBalls[a].intersects(theBalls)){
                                  swapSpeeds(theBalls[a],theBalls[b]);
                   repaint();
                   try{
                        thread.sleep(speed);
                   }catch(InterruptedException ex){
         public void swapSpeeds(Ball one, Ball two){
              double xVone=one.getxV();
              double yVone=one.getyV();
              double xVtwo=two.getxV();
              double yVtwo=two.getyV();
              one.setSpeeds(xVtwo,yVtwo);
              two.setSpeeds(xVone,yVone);
                   one.moveIt();
                   two.moveIt();
         public void paint(Graphics g) {
              g.setColor(Color.black);
              for(int a=0;a<numberOfBalls;a++){
                   theBalls[a].drawBall(g);
              Point2D.Double pointa=theBalls[0].getCenter();
              Point2D.Double pointb=theBalls[1].getCenter();
              double distance = pointa.distance(pointb);
              double deltaX = pointa.getX()-pointb.getX();
              double xSpot=theBalls[2].getX();
              double ySpot=theBalls[2].getY();
              g.drawString("X :"+String.valueOf(xSpot),20,20);
              g.drawString("Y :"+String.valueOf(ySpot),20,30);
              g.drawString("speed :"+String.valueOf(speed),20,40);
         public void update(Graphics g) {
              if(bufferedScreen==null){
                   bufferedScreen=createImage(getSize().width,getSize().height);
              bufferedG=(Graphics2D)(bufferedScreen.getGraphics());
              bufferedG.setColor(getBackground());
              bufferedG.fillRect(0,0,getSize().width,getSize().height);
              paint(bufferedG);
              g.drawImage(bufferedScreen,0,0,this);
    public void actionPerformed(ActionEvent e) {
              java.awt.Toolkit.getDefaultToolkit().beep();
              Button source = (Button)e.getSource();
              if(source==fastBut){
                   speed=speed-5;
                   if(speed<0){speed=0;}
              if(source==slowBut){
                   speed=speed+5;
         public void mousePressed(MouseEvent m){
              for (int a=0;a<numberOfBalls;a++){
                   if (theBalls[a].contains(m.getPoint())){
                        theBalls[a].setSpeeds( (5-(int)(Math.random()*10)),(int)(-40*(Math.random())) );
         public void mouseEntered(MouseEvent m){mousePressed(m);}
         public void mouseReleased(MouseEvent m){mousePressed(m);}
         public void mouseClicked(MouseEvent m){}
         public void mouseExited(MouseEvent m){}
    and this..
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    public class Ball extends Rectangle2D.Double {
         double a;                              //acceleration
         double yV=0, yVi=0, xV=0, xVi=0;     //velocity and initial velocity
         double t=1;                                       //time
         double roomWidth, roomHeight;
         double x_pos, y_pos;
         double ballDiam;
         double spring=.9;
         Rectangle room;
         Color color;
         Point2D.Double center;
         Ball(double x, double y, double diameter, Color color, Rectangle walls, double gravity) {
              a=gravity;
              room=walls;
              roomWidth=room.getSize().width;
              roomHeight=room.getSize().height;
              ballDiam=diameter;
              x_pos=x;
              y_pos=y;
              setRect(x,y,ballDiam,ballDiam);
              this.color=color;
              center = new Point2D.Double(x,y);
         public void moveIt() {
              setRect(xMove(),yMove(),ballDiam,ballDiam);
         public void moveIt(double x, double y) {
              setRect(xMove(x),yMove(y),ballDiam,ballDiam);
         public double xMove(double currentSpeed) {
              x_pos=getX();
              xV=currentSpeed;
              x_pos=x_pos+xV*t;
              return x_pos;
         public double xMove() {
              x_pos=getX();
              x_pos=x_pos+xV*t;
              if((x_pos<0) & ( xV<0  ) | ((x_pos>(roomWidth-ballDiam)) & ( xV>0  ))){
                   xV*= (-spring);
              return x_pos;
         public double yMove(double currentSpeed) {
              y_pos=getY();
              yVi=currentSpeed;
              yV=yVi+a*t;
              y_pos=y_pos+yV*t+.5*a*t*t;
              return y_pos;
         public double yMove() {
              double grav=a;
              if((y_pos>(roomHeight-(ballDiam+1)))|(y_pos<0)){ //negates gravity during impact
                   a=0;
                   if (y_pos<1 & y_pos>-.6){
                        yV=0;
              y_pos=getY();
              yVi=yV;
              yV=yVi+a*t;
              y_pos=y_pos+yV*t+.5*a*t*t;
              if((y_pos>(roomHeight-ballDiam)) & ( yV>0  )){
                   y_pos=roomHeight-ballDiam;
                   yV*= (-spring);
              if (y_pos<0 &  yV<0){
                   yV*= (-spring);
              a=grav;
              return y_pos;
         public void drawBall(Graphics g) {
              g.setColor(color);
              g.fillOval((int)getX(),(int)getY(),(int)ballDiam,(int)ballDiam);
              g.setColor(Color.black);
              g.drawOval((int)getX(),(int)getY(),(int)ballDiam,(int)ballDiam);
              g.drawString(String.valueOf(yV),(int)x_pos,(int)y_pos);
         public Point2D.Double getCenter(){
              center.setLocation(x_pos+.5*ballDiam,y_pos+.5*ballDiam);
              return center;
         public double getxV(){
              return xV;
         public double getyV() {
              return yV;
         public void setSpeeds(double x,double y){
              xV=x;
              yV=y;

  • Bouncing Ball Just Suddenly Stops Mid Bounce

    I have a application where each time you click the add ball button a new randomly colored ball is added to the jpanel. It works fine except that the balls suddenly stop at the same spot. I want them to continue to bounce for a longer period of time instead of like 8 bounces. It was going around withoutstopping prior to my getting the add new ball part working. I cannot seem to figure out what I did wrong. Also curious if anyone new of a tip as to how to get the balls to disappear once a button is clicked or their cycle runs out. Below is my code:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.util.*;
    import javax.swing.*;
    public class BounceBall{
        public static void main(String[] args) {
            JFrame frame = new BounceFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS  E);
            frame.setVisible(true);
    class BounceFrame extends JFrame {
        private BallCanvas canvas;
        public static final int WIDTH = 450;
        public static final int HEIGHT = 350;
        public BounceFrame() {
            setSize(WIDTH, HEIGHT);
            setTitle("BounceThread");
            Container contentPane = getContentPane();
            canvas = new BallCanvas();
            contentPane.add(canvas, BorderLayout.CENTER);
            JPanel buttonPanel = new JPanel();
            addButton(buttonPanel, "Add Ball",
                    new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    addBall();
            addButton(buttonPanel, "Exit",
                    new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    System.exit(0);
    class BallThread extends Thread {
        private BouncingBall b;
        public BallThread(BouncingBall aBall) { b = aBall; }
        public void run() {
            try {
                for (int i = 1; i <= 1000; i++) {
                    b.move();
                    sleep(5);
            } catch (InterruptedException exception) {
    class BallCanvas extends JPanel {
        private ArrayList balls = new ArrayList();
        public void add(BouncingBall b) {
            balls.add(b);
        public void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            for (int i = 0; i < balls.size(); i++) {
                BouncingBall b = (BouncingBall)balls.get(i);
                b.draw(g2);
    class BouncingBall {
        private Component canvas;
        private static final int XSIZE = 15;
        private static final int YSIZE = 15;
        private int x = 0;
        private int y = 0;
        private int dx = 2;
        private int dy = 2;
        public BouncingBall(Component c) { canvas = c; }
        Color color = getColor();
        public void draw(Graphics2D g2) {
            g2.setColor(color);
            g2.fillOval(x,y,30,30);   // adds color to circle
            g2.drawOval(x,y,30,30);   // draws circle
        public void move() {
            x += dx;
            y += dy;
            if (x < 0) {
                x = 0;
                dx = -dx;
            if (x + XSIZE >= canvas.getWidth()) {
                x = canvas.getWidth() - XSIZE;
                dx = -dx;
            if (y < 0) {
                y = 0;
                dy = -dy;
            if (y + YSIZE >= canvas.getHeight()) {
                y = canvas.getHeight() - YSIZE;
                dy = -dy;
            canvas.repaint();
        private Color getColor() {
            int rval = (int)Math.floor(Math.random() * 256);
            int gval = (int)Math.floor(Math.random() * 256);
            int bval = (int)Math.floor(Math.random() * 256);
            return new Color(rval, gval, bval);
        }Edited by: wnymetsfan on Dec 2, 2007 2:01 PM

    wnymetsfan wrote:
    Actually it is comiliable as I ran it numerous times today asI tried to fix it. No, it does not compile. Besides the obvious error:
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS  E);, a large part of the BounceFrame class seems to be missing: I don't see a addButton(...) anywhere.
    I posted here since it says new to java which I am. I also have posted here before with questions relatedto swing and 2D elements like graphs and no one else had an issue. It's not prohibited to post it here, but in the 2d forums, there are more people who know what they're talking about when it comes to 2D animations.
    Thanks for the links to the other forums I will post there. Sorry to bother you guys as I was not aware that New to Java meant only if it doesn't involves things like swing and 2DIt's not a bother: I merely said it for you to get help sooner.

Maybe you are looking for

  • How do I create a form in Adobe Reader

    Adobe retiring Forms Central on July 28, 2015. I would like to know what other alternatives Adobe offers.

  • Using text in a GUI without using .swing classes

    In a Java application, is there any way to create a text object that can be positioned in a GUI like an ImageIcon (using a class from the standard Java API)? For example, when using ImageIcon, you feed the x and y-coordinates, whereas with .swing, yo

  • Selling Motion separately

    Hi, I use Adobe Flash for animation. It is a really great program, but I just checked out Motion 3 on Apple.com and I think I like it MUCH better. The only thing is, it's bundled with Final Cut Studio, which costs, like, $1400. I am JUST interested i

  • Problem with Camera Raw

    I am using Photoshop CS6 v 13.0.1 x64. I have been using Photoshop for years, of course various versions. All updates have been installed. My OS is Windows 7 Pro X64 with all applicable updates. I just downloaded NEF files from my D2X and was opening

  • For loop 1 iteration execution time

    Hi, what is the time taken of for loop 1 iteration without code inside.How to calculate this Execution time.