Best way to calculate these steps?

I have a canvas with something at a point and when the user enters in a new point, to move it to there. The issue is that i want to move it "evenly" and smoothly.
If abs( x - newX ) == abs( y - newY ), then there's no issue. Just move +/-1 in each direction. The issue becomes when the diff.'s in the x points is not the same as the diff's in the y points. What algorithm would i use to make it move in a straight line to the point, in consistent steps?

duffymo wrote:
DrLaszloJamf wrote:
Suppose you want to move from (x0,y0) to (x1, y1) as t goes from 0 to 1.
Then you want x(t=0) to be x0 and x(t=1) to be x1, so
x(t) = x0*(1-t) + x1*(t)Note that there is nothing magical about this being along the x-axis. The same reasoning yields:
y(t) = y0*(1-t) + y1*(t)
it's just a linear parameterization using simple shape functions where 0 <= t <= 1.
%translation:
Bullwinkle: Nuttin' up mah sleeve!

Similar Messages

  • By default, Teststand will not include the test step result in subsequence, is there any way to include these step result in report?

    By default, Teststand will not include the test step result in subsequence, is there any way to include these step results in report?
    Thanks
    Jacky

    Hi,
    If your subsequence is in a separate sequencefile, then check the properties of the sequencefile to make sure that the record has not been disabled.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Does Adobe Reader for iOS have the ability to open inbedded links to additional PDF docs?  If not, then what would be the best way to use these already created PDF's?

    Does Adobe Reader for iOS have the ability to open inbedded links created with Acrobat Standard to additional PDF docs?  If not, then what would be the best way to use these already created PDF's on an I Pad?

    driddy61,
    As of June 2014, none of the Adobe Reader mobile products support the hyperlink action for opening a separate PDF document.
    Adobe Reader for iOS
    Adobe Reader for Android
    Adobe Reader Touch for Windows 8
    In addition, the Reader mobile products do not open multiple windows/documents simultaneously, which would make the navigation between PDF documents nearly impossible. (Once a hyperlink takes you to a different PDF document, you have no way to go back to the original PDF document.)
    The only Adobe Reader product that fulfills your department's requirements is Adobe Reader XI (mostly for Windows/Mac desktop/laptop computers).  Acrobat Pro and Standard are paid products.
    Because you are in search of a less expensive device for your department, you could get a Windows tablet instead of a Windows desktop/laptop computer. Microsoft Surface Pro (that you've mentioned in your previous reply) is just one example.  You can also find other less expensive Windows tablets.
    Tablets
    However, please keep in mind that there are two different types of Windows tablets running two different operating systems.
    (a) A Windows tablet with an Intel-based processor running Windows 8.1 Pro
    Example: Surface Pro 3
    You can install and run traditional desktop apps (e.g. Adobe Reader XI) and new Windows Store apps ("Modern" or "Metro-style" apps).
    (b) A Windows tablet with an ARM-based processor running Windows RT 8.1
    Example: Surface 2
    You can only install and run Windows Store apps (e.g. Adobe Reader Touch) but not traditional desktop apps like Adobe Reader XI.
    In general, type (b) tablets are more affordable than type (a) tablets.  However, if you want to run Adobe Reader XI, you do need to check the technical specification of each tablet and make sure the following conditions are met.
    Processor: Intel
    Operating system:  Windows 8/8.1 or Windows 8/8.1 Pro, not RT
    Hope this helps you choose the right device for your department.  Please let us know if you have any questions about system requirements or supported features in the Adobe Reader products.

  • Best way to calculate a duration

    Hi Everybody,
    loading data I have to calculate a key figure as a duration..it means as result from the difference between a start and end timestamps..
    how do you think would be the best way to calculate this keyfigure?
    I would rather prefer to do it in the update rule..
    I am going to appreciate any idea.
    Best regard,
    FedeX

    Hi
    It all depends upon the requirement. If you have a separate key figure in cube and you are calculating the value in update run it will increase the size on the cube a bit and loading process but will help to run the query fast. But if you create a calculated key figure on cube when you execute the query the value is calculated when query is running and increase query execution time.
    So it’s a kind of trade off to see how often you run query and often you load cube
    Thanks

  • What is the best way to remove these unwanted items in PS CS5

    I have used the lasso tool.  I want to remove the power pole and the street sign.  If I use the lasso tool the letters behind the items are removed also.  What is the best way to do this.
    I know that I was sent a link to a video to show how to take two pictures from two angels  and merge them.  At this time I only have the one picture.
    thank you
    Mike

    function(){return A.apply(null,[this].concat($A(arguments)))}
    JJMack wrote:
    Adding empty Layers
    Cloning into the empty layers with ptotective selections
    Slections copy paste transform
    Bluing smudging paint
    You may come up with someting
    First thing you should do is to discard your phone an get a real camera
    Cover up
    JJ,
    I'm in the learning process and want to learn how you removed those items.  The steps in your post are they the ones I should follow and learn or are there additional steps that you took.  What information will be helpful and I will go from there to find the info.
    thanks
    Mike
    Also it would be nice to know how you did your animation.

  • What's the best way to link these up?

    I'd like to connect the mini, the 4 and the books on a small business network. I thought one would have to be like a server and the others like terminals. I found out that I can connect to any of them through the base station, but the operator has to know the user name and password for the machine they want to connect to. That is no problem as an administrator, but I don't want some operators to have access to all information. Could someone help me with the steps to set this up the most efficient way? Even a direction would be helpful as the support searches are difficult to muddle through...
    G5, 3powerbooks, mini, G4, imac, CD630, LC   Mac OS X (10.4.7)  

    First thing I learned, Mr. Radloff, is that I have a lot to learn. I am a plumber not an IT guy. I think I have a different idea of what a network is than what it really is. If I understood you correctly, I would go to each machine and place a home folder,(which I think is the house icon in the lower left of the finder window), with each of the users names, one for the boss, front desk, sales, etc. Then through Airport, each user would log onto "go to server" and be able to mount whatever folder I gave them access to. So we would all have the files that need to be shared, their stuff would have a back up and they could use any apps I placed in their folder. Did I get it? It looked as if biovisier's suggestion is similar but that there be just one user home folder and everyone has access to it. What the hec is a NFS?
    What I figured out today is that with Airport on, if I log onto the computers in Appletalk and choose guest, I can see the drop box for each machine. Have I stumbled upon the way to allow file sharing? This wouldn't allow me to have the database on one machine and access it from the others, but despite the lack of efficiency, it was easy to move files once I figured it out.
    These two functions are all I really want to do (file and application sharing).
    Thanks for the reply, I hope to learn more.

  • Best Way to analyse these logistic growth-lik​e pulses.

    My ultimate objective is to get the avg amount of time needed for these pulses to reach a steady-state (past the “knee” portion and into the horizontal/flat region)…see jpeg for reference.
    Originally, I was trying to differentiate “y” values to get the region where slope turns to approx zero. However it is not as simple as my data is about 5Hz and the increment is very little between data points (almost stair like pattern) that the differentiation function gives me basically zero all the way.
    I am thinking of resorting to brute-force method to calculate a running slope (Y/x) of data points of each region. However, there’s got to be a better way to do this using signal processing/math VIs. Anyone care to show me how to unleash the power of LabVIEW?
    Thanks,
    FOSCT
    Attachments:
    Sample Data.JPG ‏104 KB

    Hello FightOnSCTrojan
    I do not think there is a VI in LabVIEW capable of achieve that functionality as what you are looking for is a "steady state detection algorithm".
    I found this example but the block diagram is password protected, I wonder why??
    https://decibel.ni.com/content/docs/DOC-1117
    Regards
    Mart G

  • What's the best way to calculate table usage in Mb?

    Given a table structure, and knowing it will receive 30.000 new entries on each month, how do I calculate the table growth in kb?
    Also, how can I calculate initial disk ocupation from the table?
    Is there an equation or formula that I can apply using column definition as params?
    That's one of the tables on my application I have to calculate:
    CREATE TABLE "LOG_PESQUISA"
    (     "COD_LOG_PESQUISA" NUMBER(10,0) NOT NULL ENABLE,
         "TXT_PCHAVE" VARCHAR2(100),
         "IND_DIGITAL" NUMBER(1,0) NOT NULL ENABLE,
         "VLR_TOTALFISICO" NUMBER(9,0) NOT NULL ENABLE,
         "VLR_TOTALDIGITAL" NUMBER(9,0) NOT NULL ENABLE,
         "IND_FISICO" NUMBER(1,0) NOT NULL ENABLE,
         "TXT_CODIGO" VARCHAR2(50),
         "TXT_BOOLEAN_TYPE" VARCHAR2(3),
         "IND_DATA" NUMBER(1,0) NOT NULL ENABLE,
         "DAT_INI" DATE,
         "DAT_FIM" DATE,
         "COD_COLECAO" NUMBER(10,0),
         "COD_CREDITO" NUMBER(10,0),
         "VLR_EDICAO" NUMBER(5,0),
         "IND_TAMANHO" VARCHAR2(2),
         "IND_PUBLICADAS" NUMBER(1,0) NOT NULL ENABLE,
         "IND_SOBRAS" NUMBER(1,0) NOT NULL ENABLE,
         "IND_LUI" NUMBER(1,0) NOT NULL ENABLE,
         "IND_AUI" NUMBER(1,0) NOT NULL ENABLE,
         "COD_USU_INC" VARCHAR2(30) NOT NULL ENABLE,
         "DAT_INC" DATE NOT NULL ENABLE,
         "ID_CREDITO" NUMBER(10,0),
         "IND_PCHAVE" NUMBER(1,0) NOT NULL ENABLE,
         "IND_HEADLINE" NUMBER(1,0) NOT NULL ENABLE,
         "IND_LEGENDA" NUMBER(1,0) NOT NULL ENABLE,
         CONSTRAINT "LOG_PESQUISA_PESQUISA_PK" PRIMARY KEY ("COD_LOG_PESQUISA") ENABLE
    /

    The most accurate approach would be to
    1) Create the table
    2) Load it with some sample data. Make sure that the sample data is as close to reality as possible (i.e. if txt_pchave will be 90 characters 20% of the time, 50 characters 50% of the time, 10 characters 20% of the time and NULL 10% of the time, make sure your sample data reflects that).
    3) Query DBA_SEGMENTS to see how big the table is
    SELECT segment_name table_name, sum(bytes)/1024/1024 MB
      FROM dba_segments
    WHERE segment_name = 'LOG_PESQUISA'4) Multiply by the number of rows that you really expect. You might load 3,000 records in step 2, for example, so you'd multiply by 10 to get the size if you loaded 30,000 records.
    You can extend this to look at the size of the index(es) relatively easily. If you are doing more than straight inserts, you would also want to simulate that to account for things like row migration, empty blocks, etc.
    Justin

  • Best way to calculate maximum of many columns/values per row

    Hello,
    for a new report with some joined tables I have to calculate the last change date. Since every table has a creation and a (last) modification date, I need to get the maximum value from 8 columns to display it.
    Of course I can compare all values by pairs or create a PL/SQL function. But maybe there already exists a fast and easy way to gain this date?
    My query so far. Each of the tables has a cr_date and mod_date column:
    SELECT
        egvg.baugruppe_nummer || egvg.anlagennummer || egvg.geraetenummer AS systemnummer
        , '=' || egvg.baugruppe_nummer || egvg.anlagennummer || egvg.geraetenummer AS systemnr2
        , egvg.gebrauchsname AS gebrauchsname
        , NVL2(egvr.raumkode, '+' || egvr.raumkode, NULL) AS raumkode
        , egvg.lieferant AS lieferant
        , CASE egvgs.kabelanschluss WHEN 1 THEN 'ja' WHEN 0 THEN 'nein' ELSE NULL END AS kabelanschluss
        , egvges.nennleistung_kva AS nennleistung
        , NULL AS letzte_aenderung
        , CASE WHEN egvg.status_id = -1 THEN 'GERÄT GELÖSCHT' WHEN egvges.status_id = -1 THEN 'EDATEN GELÖSCHT' ELSE NULL END AS status
      FROM
        egv_geraete egvg
        LEFT JOIN egv_geraetestamm egvgs ON egvgs.id = egvg.geraetestamm_id
        LEFT JOIN egv_geraetestamm_edatenstamm egvges ON egvges.geraetestamm_id = egvgs.id
        LEFT JOIN egv_raeume egvr ON egvr.id = egvg.raum_id
        LEFT JOIN egv_edaten_sfp egvsfp ON egvsfp.id = egvges.sfp_idThank you,
    Stefan

    >
    This method works but is there an easier (faster) way to update another table with new data only?
    >
    Almost anything would be better than that slow-by-slow loop processing.
    You don't need a procedure you should just use MERGE for that. See the examples in the MERGE section of the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9016.htm
    MERGE INTO bonuses D
       USING (SELECT employee_id, salary, department_id FROM employees
       WHERE department_id = 80) S
       ON (D.employee_id = S.employee_id)
       WHEN MATCHED THEN UPDATE SET D.bonus = D.bonus + S.salary*.01
         DELETE WHERE (S.salary > 8000)
       WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus)
         VALUES (S.employee_id, S.salary*.01)
         WHERE (S.salary <= 8000);

  • What are my options for opening EPS files in Elements 13? What is the best way to convert these to another type of vector file?

    I "upgraded" from Photoshop Elements... uh... mad old... to Elements 13 when my work computer got "upgraded" to Win8. Now I can't open EPS files which is how I receive collateral from our ad agency. What other vector files will work, and how can I convert EPS to these? Please be gentle if this is a stupid question - I know enough to be dangerous, but I'm not an expert at design by any means. I'm just frustrated because this isn't quite the "dead" file type that Adobe thinks it is. What was the point of upgrading if I'm pretty much left in the lurch?
    Thanks to any and all who can help! Much appreciated . -ASI

    adriennesaia a écrit:
    I "upgraded" from Photoshop Elements... uh... mad old... to Elements 13 when my work computer got "upgraded" to Win8. Now I can't open EPS files which is how I receive collateral from our ad agency. What other vector files will work, and how can I convert EPS to these? Please be gentle if this is a stupid question - I know enough to be dangerous, but I'm not an expert at design by any means. I'm just frustrated because this isn't quite the "dead" file type that Adobe thinks it is. What was the point of upgrading if I'm pretty much left in the lurch?
    Thanks to any and all who can help! Much appreciated . -ASI
    What's important to understand is that Elements is a 'pixel' editor, not a 'vector' editor. As such, it has very limited 'vector' capacity (fonts, shapes...) What you are missing from older versions is the ability to convert vector items to standard pixel image file. To be able to open and work on eps files, you'd need Adobe Illustrator, which seems overkill for your purpose.
    So, your options are:
    - to request your ad agency to supply pdf format images instead of eps ones. My guess is that eps is beeing largely superseded by pdf, but I am not sure...
    - Use external tools to convert from eps to jpeg; a Google search would return free softwares like Irfanview or web based conversion.
    - You might want to keep (or reinstall) older Elements versions just for that purpose.

  • Best Way to calculate totals from query

    Could someone point me in the right direction to add up my
    data and distinctly show it in my query?
    I have a table with the following fields:
    id, team_id, compname, teamname, totallost
    I want to add up the "totallost" row where the "team_id" and
    "compname" fields are the same...then show the compname with the
    sum of the totallost once in my table and determine who is
    winning.

    Thank you for the great help. This code works well, but is
    there a way to display the highest totallost and differentiate
    between competition names? My example is for one compname, but the
    table will have multiple compname's and I want to build a table
    showing only the highest totallost for each compname.
    You guys have been a great help. I learned something new
    today already.

  • Authentication - Best way to implement these requirements?

    I'll be developing a J2EE application that will be deployed on OracleAS 10g. Oracle Internet Directory will contain usernames and passwords the be used for authentication, but application specific roles and privileges will be defined in the application database. Only a subset of users in OID will be allowed to access the application.
    I'm new to J2EE security, and unsure how to implement this. Will I need to develop a customised LoginModule?
    Please provide guidelines on how I should approach this.
    Thanks in advance ...
    Steve

    All JPA strategies require something (like a table or sequence object) be in the database, with table sequencing being the most portable, though EclipseLink does allow custom sequence stratgies where you could use something else, such as the UUID. Sequencing is described here described here http://wiki.eclipse.org/EclipseLink/Examples/JPA/PrimaryKey with a custom UUID example shown here http://wiki.eclipse.org/EclipseLink/Examples/JPA/CustomSequencing .

  • New UC560 and 3 ESW-540-24P Switches, best way to wire them

    We are installing a UC560 and 3 ESW-540-24P switches at a client in a couple of weeks.  I have installed many of these but have never installed one with multiple switches.  What is the best way to connect these together physically.  They will be all in the same rack.  Was just wondering the best way to "series" the switches together and what ports to plug them into.  Any suggestions would be appreciated.

    There is a Smart Design: Implementation Guide at :http://www.cisco.com/web/partners/sell/smb/tools_and_resources/smart_business_comm_system.html
    Implementation Guide
    Smart Business  Communications System 2.0 – Implementation Guide
    The implementation guide complements the SBCS 2.0 Design Guide through  the detailed guidance for SBCS 2.0 based Main Office deployment. This  document leverages the GUI configuration capability with easy-to-follow  step-by-step network deployment guidance using CCA v2.2. It also  includes an installation checklist to assist during the installation  process. It is recommended that users refer to the SBCS 2.0 Design Guide  for underlying design guidance and considerations.
    In this (figure 6) it shows a 48 and a 24 port switch connecting to each of the UC560 expansion ports (there are 2 GE ports for expansion on the 560).
    These could also be 2 48 port switches (96 total ports).  (In your scenario, I would connect 2 this way and the third to one of  those 2.)

  • What is the best way to manage multiple devices with one iMac - different users with seperate itunes accounts or one mac user with different itune logons and libraries?

    Hello
    I have just purchased an imac which I am very happy with.  In our household we also have two iphones (one mine and one husbands) and one ipod (my sons). We all have individual itunes accounts set up on our previous computer (not a mac). We have sepereate apps and music, although there may be the odd occasion where we would like to share a song (if this is possible) across devices.
    I am just wondering the best way to manage these devices using the new imac.  Should I create individual accounts to logon to the imac, then from within these launch our own itunes accounts and sync our devices with these.  Or should I be using one version of itunes, logging on to this with our different itunes usernames and storing things in libraries.
    Any help would be greatly appreciated. 
    Thanks

    I am presuming that we cannot share downloaded apps and music between accounts because of the copyright issue,
    Though I'm no copyright lawyer, as long as it's within a household, you can share content among users. Such sharing is, absent specific language preventing it not present in the iTunes Store terms of use, generally considered to be "personal use". So you can share apps and music amongst your users on your computer and with their devices. You just can't give any of that content to friends or relatives who don't live with you.
    What I am not clear on, it making sure that this appears in each itunes account - is it easy to find the file storage folders that match the itunes accounts and what would these be?
    The iTunes library and files are by default in a user's Home/Music folder. But you don't have to find the folder; in fact putting a file into the folder yourself won't add the file to iTunes. Just drag the file into the iTunes window. iTunes will copy it to the correct location.
    Regards.

  • What is the best way to consolidate data on two Macs?

    Hi All,
    About to embark on a small project to move all my data on to my MacBook before finally saying goodbye to my trusty iMac.  In order to do this I'll be upgrading the HDD on the MacBook to a large one and using Time Machine to restore all the original data onto the new drive.  This bit I'm good with as I did it before when I upgraded the drive on my old iMac. 
    The main problem I have is that the majority of my photos, music, videos and documents are on my old iMac and I'd like to discuss the best way to merge these with a smaller amount of data that the MacBook has on it.  Both machines are running Snow Leopard and I'm not aware of any tools that are currently available to do something like this although I am aware that Lion is supposed to have features that would consolidate everything to the cloud and might make things quite easy.  This is something I would be willing to spend the £30 or so doing so if anyone has any experience of using Lion to merge everything across Macs to the cloud please let me know if you feel this would be a suitable approach.
    Just to summarise the state my data is in currently and the approach I currently intend to take. 
    Have the Mobile Me service so Mail, Address Book, Calendars and all that stuff are all synced across both machines anyway. 
    Applications - Some stuff on the old Mac that I no longer user but nothing here that I really want to migrate.  Some specific application stuff is mentioned below. 
    Movies - This is the bit that I'm most concerned about.  Have a lot of legacy iMovie stuff on the old iMac which I'd like to keep.  iDVD as well.  Not sure of the best way to get this across and maybe it even warrants a separate discussion. Aside from that most of my older video stuff and projects are on the iMac with the newer stuff on the MacBook.  I'm unaware of any function to export and import this but I have a large HDD which I can use to copy stuff over and am going to look into this a bit further.  There will be a small amount of duplication here but this is manageable. 
    Documents - Will just copy these across and organise them as and when I need them.  Again, a small amount of duplication but this is manageable. 
    Music - Pretty much all my stuff the old iMac.  Can just export this and copy it onto the MacBook. 
    Pictures - Bit complicated this.  Most of my stuff on the old iMac but some newer albums on the new MacBook.  No duplication so presuming I can just export the library off the old iMac and import it on to the new MacBook. 
    No websites or anything like that. 
    iPhone currently syncs with iMac but once I have all the stuff over it should not be too hard to change this. 
    Just my user account on each machine that I really want to keep.  Shared documents and other users accounts all contain temporary stuff that I'm happy to lose or archive. 
    Given this is anyone able to offer advice as to 1) Whether this is the best approach? 2) Have I considered everything? 3) Are there any tools that might help me?
    Many thanks,
    Tom

    OK, seeing as no-one replied (presumably because a lot of this information is on the forums in bits elsewhere) here's how I've got on so far.
    Applications - just went through them.  About the only one I needed was my media server app.  Just downloaded and re-installed, had a quick look back though my email to find the license key and it all went on fine.  Installation never seemed quite right on my old machine so solved that problem too. 
    Movies - New iMovies just copied across the clips and projects into their respective folders.  Seems to have worked but haven't checked it all that thoroughly.  Some duplicate footage here but I can trim this out at some point when I get a chance to go through here. 
    Documents - Just copied these across. 
    Photos - used an app called iPhoto Library Manager.  You can download for free but have to pay to use the part that consolidates your libraries.  Possibly if I was willing to spend a bit more time I could have got away without using this but given I didn't know the state of my different libraries and just how many duplicates I had this was too much of a convenience to ignore.  Also got my library into a state where I can now spend a few hours organising it a bit better with Faces / Events etc. 
    Not attempted Music or iPhone sync yet as been stuck trying to solve a problem with my power adapter. 

Maybe you are looking for