Two Objects Following Each Other While Maintaining Minimum Distance

Hello,
I'm trying to solve a problem where I have one circle following another ( the first following the mouse ), yet maintain a minimum distance between the two circles.
The code is pretty simple. For the lead circle I'm moving it as follows on the movement of the mouse:
circle.x = event.stageX + 8.000000E-001 * ( circle.x - event.stageX );
circle.y = event.stageY + 8.000000E-001 * ( circle.y - event.stageY );
Then I'm moving the secondary circle as:
circle2.x = circle.x + 8.000000E-001 * ( circle2.x - circle.x );
circle2.y = circle.y + 8.000000E-001 * ( circle2.y - circle.y );
This works remarkably well, however, I want to be able to increase the distance between the two circles and enforce a minimum. If anyone can point me in the right direction I'd appreciate the assistance. Thanks.

Thanks for responding. To what are you referencing that I increase by .008, not following? Thanks.

Similar Messages

  • Cannot Align Two Objects On Each Other

    I have done a completely clean install of Creative Cloud CS6 on my mac on Mountain Lion. First time opening Illustrator, and I cannot center two vector objects on each other. Rather, when I click to center them (vertically or horizontally) it actually pushes them further apart! It also appears to be arbitrarily selecting another object on my art board when I select these two (there is no grouping overlap, it makes no sense). I've looked around before, and have 'align to selection' checked, and 'snap to grid/snap to point' unchecked in the 'view' dropdown. Going to try to trash my preferences, but this is literally the first time I've opened it, so I can't see how that would be an issue!
    I use this tool CONSTANTLY in what I do, so this is really troubling. Has anyone had a similar problem and fixed it? Thanks so much!!

    I held down Option+Command+Shift while opening Illustrator (as offered in another thread as a way to trash/reset preferences). I know it did this as I had changed the color scheme to light grey, and it's back to dark grey.
    Opened up original file. Now, I can center things horizontally alright, but vertically jumped the both of them way down the page.
    Created a new file. Could center horizontally, centering vertically did absolutely nothing—no jumping down the page, no doing what it should be doing...nada.

  • Image objects following each other--the easy way?

    I have a series of images that scroll up the screen. There are 35 or so of them and they follow each other like a filmstrip. I have been creating one layer and copying one motion path for each, staggering them in the timeline. This works great, but it's a drag if I decide to change the timing. I then have to go to each one and move it individually.
    Is there an easier way?

    well if your images are a fixed size, it should be too hard to work out the offset for each. But you can move the parent group around as you arrange your images, and then move it back to its start position when you're ready to roll (pun intended).
    I liked specialcases solution though, seems tricky to set up if you're unfamilar with the replicator but powerful. And once set up it woul dbe easy to replace the images at any later stage.
    adam

  • Link two LRT224 with each other using VPN

    What's the best way to connect two LRT224 with each other, which are in two different citys?
    Open VPN or IPSec?
    I think Gateway to Gateway should be the right mode, but I am very unsure with the lot of settings ...
    Solved!
    Go to Solution.

    Try the EasyLink VPN feature of LRT214/LRT224, which simplifies the site-to-site VPN setup.
    http://kb.linksys.com/Linksys/ukp.aspx?vw=1&docid=03cf456383fc4d958cf918110c7fcd42_How_to_configure_...
    EasyLink VPN works in the following way conceptually.
    1. At the primary site, enable EasyLink VPN Server (inbound tab on the Web GUI) and create an account (username/password) for each remote site.
    2. At a remote site, enable EasyLink VPN Client (outbound tab on the Web GUI), and enters the matching account credentials (username/password).
    3. The remote site will automatically reach out to the primary site to establish an IPsec tunnel.
    Note: LRT224 can support up to five EasyLink VPN peers in a star VPN topology.

  • How do I view two clips overlapping each other, each being semitransparent to see both at the same time, so that I can decide where to stop of the first clip and start of the second clip? Thanks.

    Basically I want to combine to clips with correct timings. For that I want to view the two clips overlapping each other, each being semitransparent to see both at the same time, so that I can decide where to stop of the first clip and start of the second clip? Thanks.

    see my reply in your other post:
    You're familiar with the TRIM-tool?
    http://help.apple.com/finalcutpro/mac/10.1/?lang=en#ver1632caff
    http://help.apple.com/finalcutpro/mac/10.1/?lang=en#ver1632d8e4
    http://help.apple.com/finalcutpro/mac/10.1/?lang=en#ver1632d9ae

  • HT201493 My family has multiple iphones registered to me,we would like to follow each other how do i do this.

    My family has mutiple iphones regitered to one account we would like to follow each other on find my friends cant get it to work.

    You will all need to use your own iCloud accounts.

  • Hello , I have a shot with two lips kissing each other , how can I keep

    Hello , I have a shot with two lips kissing each other , how can I keep the lips red and turn the rest of the face into black ? I tried shaping but the result was negative because the shape was moving all teh time , I tried color correction but the face and lips`s color was similar so I couldn`t do it with that , is there any other way ? Thanks so much

    You're gonna have fun with this because the HSL qualifiers probably won't see much separation between the areas that you want to isolate. You could try combinations of turning off Hue, Saturation, or Luminance. See what you get.
    Otherwise you're into a roto. (Manually tracked and animated User Shape)
    jPo
    Message was edited by: JP Owens

  • Both disc drives broke within two weeks of each other?

    I bought an imac and macbook pro about a year and a half ago and within two weeks of each other, both have broken. They have always been awkward to insert/eject disc to/from, but now they either don't accept discs in or wont spit them out. Surely this isn't coincidence as they get very different usage from each other. Also, i've just upgraded to 10.6.8. Is this a known problem? Can i request Apple fix these issues for free, as i don't really feel one and a half years is acceptable for the breakdown of both machines, especially as they get very little usage.
    Advice?

    AppleCare covers you for three years.

  • Two JTables changing each others data

    I have the following swing setup:
    JPanel mainPanel with GridLayout(0, 1)
    JPanel tablePanelA with BorderLayout
    JPanel tablePanelB with BorderLayout
    JTable tableA
    JTable tableB
    The tables are 2 rows by 7 columns, and are two distinct instances of a class i wrote that extends JTable. They look and act the same, but there are two seperate references. They both use JComboBoxes to allow selectable data in each of the 14 cells.
    I then have:
    tablePanelA.add(tableA)
    tablePanelB.add(tableB)
    mainPanel.add(tablePanelA)
    mainPanel.add(tablePanelB)
    This sets up my main panel with the two tables on it looking how I want it to look. Heres the problem. Whenever I change the data in a cell in either table, the corresponding cell in the other table changes to that same data item also. For example, if i change cell 0,4 in table A to "None", then cell 0,4 in table B will also change to "None". You only see the change on a refresh of the panel, by changing windows to and from the panel, etc. Any ideas on why my tables would be changing each others data?

    Any ideas on why my
    tables would be changing each others data?It sounds like you're sharing a single TableModel instance between the two tables. When one table updates the model, it fires a TableModelEvent which notifies both JTable instances to update their views.

  • Can two functions call each other?

    I'm converting some code and have run into two functions that call each other. While I seem to have converted both functions to plsql ok, they do not compile, seemingly because they ref each other. As soon as I de-reference one one function's call to the other function they both compile.
    I know that Oracle 10g supports recursion; and on the surface of things, this situation does not seem much different than recursion. If both functions are well formed, I would hope that they'd compile.
    I wasn't able to find much by searching the forums on this topic...but I'm hoping that someone will have some info on this issue.

    what happens when f2 sends 2 as parameter to f1 (i mean F1(2) in place of f1(1) ) at line 6 of f2).probably that what you expected ;) :
    SQL>  create or replace function f1 (i integer default 0)
         return integer
    as
    begin
         dbms_output.put_line ('In function f1');
         return case when i != 1 then f2 end;
    end f1;
    Warning: compiled but with compilation errors
    SQL>  show error
    Errors for FUNCTION F1
    LINE/COL ERROR                                                           
    6/31     PLS-00201: identifier 'F2' must be declared                     
    6/2      PL/SQL: Statement ignored                                       
    SQL>  create or replace function f2
         return integer
    as
         i integer;
    begin
         dbms_output.put_line ('In function f2');
         execute immediate 'begin :1 := f1(2); end;' using out i;
         return i;
    end f2;
    Createfunction successfully completed.
    SQL>  select f2() from dual
    select f2() from dual
    Error at line 1
    ORA-00036: maximum number of recursive SQL levels (50) exceeded
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8
    ORA-06512: at "MICHAEL.F1", line 6
    ORA-06512: at line 1
    ORA-06512: at "MICHAEL.F2", line 8

  • Two iphones  receiving each others text massages

    I have two iphones synced to the same computer receiving each others text massages, how do I fix it?

    On each phone go to Settings > Messages > Send and Receive and select only the phone number of the phone in question. Each phone should have only its own number selected. F each phone has its own unique email address you can select that as well. But do not select any phone number or email address that resides on a different phone.

  • Can these two attributes conflict each other?

    A Data Guard question: Can MAX_FAILURE and NET_TIMEOUT attributes conflict each other if we configure them simultaneously on a same LOG_ARCHIVE_DEST destination?
    Is there any overlap to them?

    Is it easier to ask someone else to look up the
    answer for you than to look it up yourself?
    http://www.oracle.com/pls/db111/homepage
    I encourage you to read it for yourself. You might
    just learn something else of value.
    Read the Doc - A Poem
    I need a guru who can do
      In one statement - a line or two,
    To write for me the fix i need
      to make me a hero, o yes indeed.
    I hack and I paste, can't show my true code
      But using your powers I'm sure you will know
    What is my issue, time is flying -  Tick-Tock...
      What do you mean, just go read the doc? RTFM - right? ;}

  • Compiling simultaneously two classes referencing each other

    Hi,
    When we want to compile 2 classes simultaneously in a package, we give command --
    javac package-name/*.java
    Suppose the two classes are ClassA and ClassB and ClassA has a reference of ClassB. So the compiler will finish compiling ClassB before compiling ClassA.
    But, if both the classes have each others' reference, how does compiler resolve this? Because, even in that case both classes get compiled
    Regards,
    Amit

    Lets say that compilation is done in 2 steps.
    The first step is done for all files first.
    Then the second step is done for all files.
    That means that for the second step the compile-time resolution has takes place.
    Two classes that refers to each other must go through the first step in
    the same compilation so that in the second step when
    they are referring to each other they are easily resolved.
    This is different from runtime resolution.

  • My friends iphone is set where i can locate but when i try to locate the phone the red dot shows up but we are texting each other while im trying to locate but cant

    Im trying to locate my friends iphone while we are texting each other but it only shows a red dot, why cant i locate it?

    Because you can text does not mean you can locate.
    Tow possiblities off the top of my head:
    Location Services turned off (check in Settings > Location Services)
    Restrictions are set for location (check in Settings > General > Restrictions)

  • IPV6 clients cannot ping each other while getting IP from DHCP server running in windows 2008

    I have two windows 7 clients and a windows 2008 server connected to a switch with static IP 172:16:5::1/64.
    DHCP server is configured with static IP 172:16:5::20/64
    when i statically assign IP to windows 7 clients like 172:16:5::21 & ::22, they can ping each other. if they get ip from DHCP server, they cannot ping each other.
    if i configure the gateway (172:16:5::1) in the clients manually, they can ping each other.
    is there any way we can make dhcp server to give gateway to the clients along with IP?

    From what I have gathered:
    IPv6 won't route because the DHCP server is setup in 'stateless' mode and the switches do not support IPv6. (
    "But if your routers are not IPv6 supported (yet), you can
    reconfigure DHCPv6 to Disable Stateless mode, and that'll issue IPv6 addresses that
    will eliminate the Ping problem." -
    http://www.networkworld.com/article/2228461/microsoft-subnet/setting-up-dhcpv6-to-dynamically-issue-ipv6-addresses-in-a-network.html)
    So you must change to 'disable stateless' mode. Which the only way I can THINK to do this is to uninstall DHCP and reinstall DHCP and select 'disable stateless' during the installation (which I haven't confirmed). (In
    case, “Disable DHCPv6 stateless mode for this server” option was selected duringrole installation" -
    http://blogs.technet.com/b/teamdhcp/archive/2009/03/03/dhcpv6-understanding-of-address-configuration-in-automatic-mode-and-installation-of-dhcpv6-server.aspx)
    zz.. but my understanding of DHCP is fragmented, please take what I find with a grain of salt. I am off to reinstall DHCP :] .. fun.
    Mediocre Access 2010 | (Baby) Beginner C Sharp | OK at Active Directory (2012) | Fragmented understanding of DNS/DHCP | Laughable experience with Group Policy | Expert question asker on MSDN Forums

Maybe you are looking for

  • GX60 Switchable Graphics Problem

    Hi, I bought a GX60 Notebook (with A10-4600M, HD7970 graphics), and installed a Win 8 Pro x64 copy I got from my Univ. I proceeded to install the drivers and it seems everything is working fine... Well, it only seems so - when I open AMD Catalyst and

  • 'Expand All' icon in a tree structure?

    Hi experts, If we create a tree UI element in ABAP WD, we automatically get a 'Collapse All' icon.Is it possible to have a 'Expand All' icon as well? thanks in advance, Pras

  • Iphone 4 will not charge... Help!!!

    I can sync the phone tried restore three times. Now the phone is dead. I can put it in dfu mode and itunes reads it and i have restored frome there. I have tried different wires and chargers. About November the screen shattered so I had it replaced n

  • Insert only the updated Fields

    I have a log table based on the master table. The master table have 50 fields. Any update in the master data has to be logged in a new table. So the master table will have only the last updated data. Any change in the master table to be inserted in t

  • Where within CS6 Photoshop will I find the folder and file to clear the scratch disk on my harddrive ???

    Where is the folder (and file) to erase the scratch disk ...