Points of intersection of the lines

Hi guys, I have a little problem. I have two sets of points, which sets two rectangles. I need to know what area they share. No idea how to do?

I found "Polygon Area.vi" function. but I need points of intersection of these two rectangles to compute the inner area for this function.

Thanks for any advice.

I just did a quick check and did not see the convex polygon in LV 2011 VI of Intersection.

It shouldn't be too hard to write your own.  You need to consider several possible cases: polygons do not intersect.  Polygons have exactly one thing in common (one is on an edge or one vertex on the other). Polygons have in common the segments in one or more edges. A polygon is completely contianied in the other. And if you showed polygons overlap but do not share an edge or a vertex.  If the polygons can be concave, additional complexity might be involved.

Some simple analytic geometry will allow you to locate the intersection of two straight lines formed by the edges of the polygons. You must then determine if the intersections are on the edge or outside the polygon. Once you have found the 4 (or zero) points of intersection which are relevant, you can use the Poylgon Area.vi, which is in LV 2011, to calculate the desired area.

Since you're using the student Edition, this is a school assignment?  If so, most of the participants on the Forums will not do your work for you because you don't learn something like that, but we'll help you learn LV

The steps I would take are: 1. define the case of polygons possible in your situation. 2 analytical hand geometry to make you understand the issues. 3. set the program, with possibly a flow chart or a diagram of the State, with regard to points 1 and 2. 4. write code to implement 3 LabVIEW.

Lynn

Tags: NI Software

Similar Questions

  • Point of intersection between the line interpolated in Grapher

    How to find the point of intersection between interpolated lines using points offered as input to a file in grapher comps?

    What version of Mac OS X?

  • How to find the point of intersection of the two geometry?

    Hello
    Could someone give some suggestions on how to find the point of intersection of the two geometry?
    I need just point. (x, y, z)
    Thank you

    Can you post the full result of geometry returned?

    What you should have as a result:

    MDSYS. SDO_GEOMETRY (2001, 1, NULL, MDSYS.) SDO_ELEM_INFO_ARRAY (1,1,1), MDSYS. SDO_ORDINATE_ARRAY (2.0,2.0))

    Notice the sdo_intersection will use only the sdo_ordinate_array, even if the result is a point! (with the SDO_POINT is NULL.)

    where do you find these x, y, z values of?

    On your other question:

    -using the operator space sdo_relate (with mask = ANYINTERACT) will return in pairs, the result of the intersection of each anyinteracting polygon, line combination.

    -of course, these results will vary from point, multipoint, line or multiline even depending on how the interaction takes place.

    -try to explain a bit more what do you mean 'I want only points to return' of nit.

    Luke

  • Intersection of the line segments vs hitTest

    I am trying to improve the hitTest() function.

    I have a game in development that involves robots square, rectangular wall and blows of line segment turning forms and move. Without rotation, hitTest works fine, but with the rotation, problems arise.

    Rotation 0 and square walls robots work very well. There is a small amount of funkyness with a robot rotated by a corner of the wall, but it is not very sensitive.

    The big problem is the collision of two rotated square robots.

    Can I create a function to get the segments of line that make up each robot and verification to see if all intersect. This means finding the location of eight points (using height and width and some trig to deal with rotation), find the slope of eight lines and then by testing lines up to 16 times. It would be necessary to find the intersection of each pair of robots. These are the worst numbers, some colisions can be detected or removed before that time the algorithm, but this review will be performed each image on all the robots and the walls and shots (shots might be a single line segment, however)

    Right now I'm talking about 8 robots max, maybe the walls of perhaps 5-80, 6-20 shots on screen @ 30 fps.

    It is fairly easy to create, but before I spend a day code all this, I wonder if computing requirements will make it prohibitive.

    (If so, I'll probably have to move to the circular robots)

    I feel that there should be a simple formula to find if two rectangles on a Cartesian plane intersect, but I can't find one.

    You can use a base shape hittest.  gskinner has one that it is made public, or, you can create your own using the class' of bitmapdata hittest.

  • Calculation of the point of intersection of the circles giving NaN first "tour".

    See attachment.

    When I give the correct parameters as input, the output is always NaN.

    However, when I run the VI once again, the correct x, coordinated return.

    Obviously, this is not good behavior I want in my VI. What is wrong here?

    Thank you

    Marvin

    It's your use of local variables.  Even if a sequence structure is designed to make you think everything will be in order, it's just an illusion.  All local variables are read, from the VI is executed, but they are all zero until the calculations take place.  Connect your results and discharge the two people in the country and the structure of sequence and you will get what you expect.

    Oh and, in race conditions.  Something to keep in mind that you will learn to program in LabVIEW is that you rarely need a local variable.

  • How to find a point of intersection between two paths in the hierarchy? (2 G 11)

    Hi all!

    I need your help to write a hierarchical query.

    Suppose that we have a table hierarchycal as

    WITH h AS (SELECT 0 AS rn, to_number(NULL) AS prn, 'root' AS point_name   FROM dual
    UNION SELECT 1 AS rn, 0 AS prn, 'a' AS point_name  FROM dual
    UNION SELECT 2 AS rn, 1 AS prn, 'b' AS point_name  FROM dual
    UNION SELECT 3 AS rn, 1 AS prn, 'c' AS point_name  FROM dual
    UNION SELECT 4 AS rn, 2 AS prn, 'd' AS point_name  FROM dual
    UNION SELECT 5 AS rn, 3 AS prn, 'e' AS point_name  FROM dual
    UNION SELECT 6 AS rn, 2 AS prn, 'f' AS point_name  FROM dual
    UNION SELECT 7 AS rn, 3 AS prn, 'g' AS point_name  FROM dual
    UNION SELECT 8 AS rn, 6 AS prn, 'h' AS point_name  FROM dual
    UNION SELECT 9 AS rn, 5 AS prn, 'i' AS point_name  FROM dual
    UNION SELECT 10 AS rn, 7 AS prn, 'j' AS point_name  FROM dual
    UNION SELECT 11 AS rn, 10 AS prn, 'k' AS point_name  FROM dual)
    SELECT h.* 
    FROM h 
    CONNECT BY PRIOR h.rn=h.prn
    START WITH h.prn IS NULL
    

    I chose a single line, with rn = 11 for example, as a "starting point." After that I need to select one or more rows in this table under certain conditions. Whether rn = 8 and 9, for example. By the same query, to the next step, for each point that I chose by condition, I need to calculate, how far is it to the "starting point".

    I think, I need to find a point of intersection of the path from the root to the selected point along the same path of the "starting point". By comparing this tip I'll can understand which of them is closer to the "start".

    The only thing that I have arrived, it's trying to compare the results of sys_connect_by_path...

    Hello

    This indicates to what extent each of the nodes 'interest' are from the node of "start":

    WITH connect_by_results AS

    (

    SELECT CONNECT_BY_ROOT rn: the NURSE

    CONNECT_BY_ROOT SUBSTR (point_name,

    1

    8

    ) AS node_type

    rn AS ancestor

    LEVEL AS lvl

    H

    START WITH point_name = 'start '.

    OR point_name LIKE '% interest '.

    Rn = prn PRIOR CONNECTION

    )

    SELECT i.rn

    , MIN (i.lvl + s.lvl) - 2 AS distance

    Connect_by_results I have

    JOIN connect_by_results s ON s.ancestor = i.ancestor

    WHERE s.node_type = 'start '.

    AND i.node_type = 'interest '.

    GROUP BY i.rn

    ORDER BY i.rn

    ;

    Exit: (from your sample data, where 11 is the starting node):

    DISTANCE OF RN

    ---- --------

    8        7

    9        5

    14 3

  • How can I find several intersect between the number of lines

    Hello

    I created the table as below,

    CREATE TABLE "TRANS" (NUMBER (9.0) "TIDSET", "ITEM" NUMBER (9.0)); "."

    and insert valuse Trans table as below,

    insert into values trans (1,1) insert into values trans (1,3) insert into values trans (1.4); insert into values of trans (1.5); insert into trans values (1.6);
    insert into values trans (2.1); insert into values trans (2.2); insert into values trans (2, 4); insert into values trans (2,6), trans insert values (3,1);
    insert into values trans (3,2) insert into values trans (3.3) insert into values trans (3.6); insert into values trans (1, 2); insert into trans values (1,1);

    and now I have to find the intersection between the lines as below,

    Select tidset from whose point trans = 1
    intersect
    Select tidset in the point transwhere = 2
    intersect
    Select tidset from trans whose point = 3;

    If we have 1000 lines there is no way to find the intersect in this way, so I need to write a program to find the intersect as above without inserting the (item = N) manually each time, can you help me with this please?

    Thank you

    Hello

    user11309581 wrote:
    ... and now I need to find the intersection between the lines as below,

    Select tidset from whose point trans = 1
    intersect
    Select tidset in the point transwhere = 2
    intersect
    Select tidset from trans whose point = 3;

    If we have 1000 lines there is no way to find the intersect in this way,

    This is not true. The query you posted will work well for any number of lines. Perhaps you are really worried about the number of distinct values of the point.

    so I need to write a program to find the intersect as above without inserting the (item = N) manually each time, can you help me with this please?

    In a solution of Ivan, you probably mean "COUNT (DISTINCT point)" rather than "COUNT (*).
    In addition, if element values are predictable, you don't have to code in all hard; You can generate, like this:

    SELECT       tidset
    FROM       trans
    WHERE       item      IN (
                   SELECT     LEVEL
                   FROM     dual
                   CONNECT BY     LEVEL <= n
                 )
    GROUP BY  tidset
    HAVING       COUNT (DISTINCT item)     = n
    ;
    
  • Is it possible to quickly straighten the lines or remove several points in a line

    Hi, sorry not too sure how Word of the question.

    I'm studying for a master of science in geology and do seismic mapping. For storing my cards I exported the ArcGIS for I can bring together various and also outline maps. Then I exported the GIS maps in illustrator so I could try some of the smooth contours because they are extremely jaggedy due to the nature of the data.

    Is there a way to quickly smooth lines or mass delete points that make up the lines?

    I ask because I have 30 + cards and each card has perhaps 50lines with each line consisting of currently about 1000 points each...

    If I can't find a solution I will probably end up drawing on the shape with the pen tool and smoothing just in this way, as it should be much faster, and then deleting as many points.

    Any help much appreciated.

    I am currently using Illustrator CS5 and have access to CS4.

    Thank you

    And if you're good with the rounded tool, the pencil icon drop-down, you might be able to use it to refine the contours as well.

    It that they are actually fished segments, then you can select paths and use the brand

    Adjustable rounded tool your specifications, but you have ti experimenting wih to see how it works.

    Give him a little more work and you get this

  • How to move the ends of the lines slanted towards the limits of the purge

    Hi all

    I developed a script that deletes the page elements to the purge. To achieve this, that I collect all the elements of the page (with the exception of text blocks) located partially on the editing table, create a temporary mask and 'trim' with subtraction of Pathfinder function. However, this approach does not work with graphic lines so I'm trying to move the ends of the lines to the limits of the substantive area lost. (I guess these are simple straight lines consisting of two end points).

    screengrab.png

    I knew how to deal with orthogonal lines - it's pretty easy:

    if (theItem.constructor.name == "GraphicLine" && theItem.paths.length === 1) {
         path = theItem.paths[0];
         if (path.pathPoints.length === 2) {
              ep = path.entirePath;
              w = ep[1][0]-ep[0][0];
              h = ep[1][1]-ep[0 ][1];
              
              if (w > h) {
                   newEp = [ [ spreadWithBleedBounds[1], ep[0][1] ], [ spreadWithBleedBounds[3], ep[1][1] ] ];
                   path.entirePath = newEp;
              }
              else if (h > w) {
                   newEp = [ [ ep[0][0], spreadWithBleedBounds[0] ], [ ep[1][0], spreadWithBleedBounds[2] ] ];
                   path.entirePath = newEp;
              }
         }
    }
    

    This moves A1 - A2, B1 , B2, C1 , C2, D1 to D2.

    But how to treat skewed lines? How to calculate the coordinates of the point E2 and F2? Y at - it a magic formula? Or can someone point me to the right direction: for example a book to read?

    I assume this has something to do with geometry/trigonometry, but I haven't studied this kind of things at school. (I graduated from an art school - designed to draw naked models instead).

    If someone will answer my question, please do it on basic level since I'm a total noob in the present.

    Here's the script:

    if (Number(String(app.version).split(".")[0]) == 7) ErrorExit("This script can't work with InDesign CS5 so far.", true);
    
    var doc = app.activeDocument;
    var spreadBounds, spreadWithBleedBounds, gPartiallyOutOfSpreadItems;
    var ungroupErrors = 0;
    
    var originalHorUnits =  doc.viewPreferences.horizontalMeasurementUnits;
    var originalVerUnits =  doc.viewPreferences.verticalMeasurementUnits;
    doc.viewPreferences.horizontalMeasurementUnits = doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.INCHES;
    doc.viewPreferences.rulerOrigin = RulerOrigin.spreadOrigin;
    doc.zeroPoint = [0, 0];
    
    if (doc.layers.itemByName("Temporary Layer") == null ) {
         var tempLayer = doc.layers.add({name:"Temporary Layer"});
    }
    else {
         var tempLayer = doc.layers.itemByName("Temporary Layer");
    }
    
    UngroupAllGroups(doc.groups);
    
    DeleteObjectsOnPasteboard();
    ProcessSpreads(doc.spreads);
    ProcessSpreads(doc.masterSpreads);
    
    tempLayer.remove();
    
    doc.viewPreferences.horizontalMeasurementUnits = originalHorUnits;
    doc.viewPreferences.verticalMeasurementUnits = originalVerUnits;
    
    var msg = (ungroupErrors > 0) ? " Failed to ungroup " + ungroupErrors + " groups since they are too large." : "";
    alert("Done." + msg, "Trim Pages Script");
    
    //================================== FUNCTONS ===========================================
    function ProcessSpreads(spreads) {
         var spread, path, ep, w, h;
         for (var s = 0; s < spreads.length; s++) {
              spread = spreads[s];
              spreadBounds = GetSpreadBound(spread, false);
              spreadWithBleedBounds = GetSpreadBound(spread, true);
              
              gPartiallyOutOfSpreadItems = GetPartiallyOutOfSpreadItems(spread);
              
              var theItem, theMask, newItem;
              for (var i = gPartiallyOutOfSpreadItems.length-1; i >= 0; i--) {
                   theItem = gPartiallyOutOfSpreadItems[i];
                   if (theItem.constructor.name == "GraphicLine" && theItem.paths.length === 1) {
                        path = theItem.paths[0];
                        if (path.pathPoints.length === 2) {
                             ep = path.entirePath;
                             w = ep[1][0]-ep[0][0];
                             h = ep[1][1]-ep[0 ][1];
                             
                             if (w > h) {
                                  newEp = [ [ spreadWithBleedBounds[1], ep[0][1] ], [ spreadWithBleedBounds[3], ep[1][1] ] ];
                                  path.entirePath = newEp;
                             }
                             else if (h > w) {
                                  newEp = [ [ ep[0][0], spreadWithBleedBounds[0] ], [ ep[1][0], spreadWithBleedBounds[2] ] ];
                                  path.entirePath = newEp;
                             }
                        }
                   }
                   else {
                        theMask = CreateMask(spread);
                        try {
                             newItem = theMask.subtractPath(theItem);
                        }
                        catch (err) {
                             $.writeln("2 - " + err);
                             theMask.remove();
                        }
                   }
              }
         }
    }
    //--------------------------------------------------------------------------------------------------------------
    function IsPartiallyOutOfSpread(pageItem) {
         var result = false;
         if (pageItem.constructor.name == "TextFrame" ||
              pageItem.constructor.name == "Group" ||
              pageItem.parent.constructor.name == "Group")
         {
              return result;
         }
    
         var visBounds = pageItem.visibleBounds;
         if (visBounds[0] < spreadBounds[0] && visBounds[2] > spreadBounds[0] ||
              visBounds[1] < spreadBounds[1] && visBounds[3] > spreadBounds[1] ||
              visBounds[2] > spreadBounds[2] && visBounds[0] < spreadBounds[2] ||
              visBounds[3] > spreadBounds[3] && visBounds[1] < spreadBounds[3]  ) {
              result = true;
         }
         return result;
    }
    //--------------------------------------------------------------------------------------------------------------
    function GetSpreadBound(spread, bleed) { // including bleed -boolean
         if (bleed == undefined) bleed = false;
         
         with (doc.documentPreferences) {
              var topBleed = documentBleedTopOffset
              var leftBleed = documentBleedInsideOrLeftOffset;
              var bottomBleed = documentBleedBottomOffset;
              var rightBleed = documentBleedOutsideOrRightOffset;
         }
    
         var bFirst = spread.pages.item(0).bounds; // bounds of the first page
         var bLast = spread.pages.item(-1).bounds; // bounds of the last page
         return [     ((bleed) ? bFirst[0]-topBleed : bFirst[0]), 
                        ((bleed) ? bFirst[1]-leftBleed : bFirst[1]), 
                        ((bleed) ? bLast[2]+bottomBleed : bFirst[2]), 
                        ((bleed) ? bLast[3]+rightBleed : bLast[3])
                        ];
    }
    //--------------------------------------------------------------------------------------------------------------
    function CreateMask(spread) {
         var unitValue = new UnitValue (app.pasteboardPreferences.minimumSpaceAboveAndBelow, "mm");
         var unitValueAsInch = unitValue.as("in");
         var outerRectangleBounds = [spreadWithBleedBounds[0]-unitValueAsInch, 
                                                                spreadWithBleedBounds[1]-8.07, 
                                                                spreadWithBleedBounds[2]+unitValueAsInch, 
                                                                spreadWithBleedBounds[3]+8.07
                                                                ]; 
    
         var outerRectangle = spread.rectangles.add(tempLayer, undefined, undefined, {geometricBounds:outerRectangleBounds});
         var innerRectangle = spread.rectangles.add(tempLayer, undefined, undefined, {geometricBounds:spreadWithBleedBounds, fillColor:doc.swatches.item("Black"), fillTint:30});
         var mask = outerRectangle.excludeOverlapPath(innerRectangle);
         return mask;
    }
    //--------------------------------------------------------------------------------------------------------------
    function GetPartiallyOutOfSpreadItems(spread) {
         var allPageItems = spread.allPageItems;
         var partiallyOutOfSpreadItems = [];
         var currentItem;
         
         for (var i = 0; i < allPageItems.length; i++) {
              currentItem = allPageItems[i];
              if (IsPartiallyOutOfSpread(currentItem)) partiallyOutOfSpreadItems.push(currentItem);
         }
         
         return partiallyOutOfSpreadItems;
    }
    //--------------------------------------------------------------------------------------------------------------
    function DeleteObjectsOnPasteboard() {
         var objs = app.documents[0].pageItems.everyItem().getElements();
         while (obj=objs.pop()) {
              try {
                   if(obj.parent instanceof Spread || obj.parent instanceof MasterSpread){ obj.remove() }
              }
              catch(err) {
                   //$.writeln("2 - " + err);
              }
         }
    }
    //--------------------------------------------------------------------------------------------------------------
    function ErrorExit(myMessage, myIcon) {
         alert(myMessage, "Trim Pages Script", myIcon);
         exit();
    }
    //--------------------------------------------------------------------------------------------------------------
    function UngroupAllGroups(groups) {
         for (var i = groups.length-1; i >= 0; i--) {
              var gr = groups[i];
              if (gr.groups.length > 0) {
                   var subGroups = [];
                   for (var j = gr.groups.length-1; j >= 0; j--) {
                        subGroups.push(gr.groups[j].id);
                   }                    
                   try {
                        gr.ungroup();
                   }
                   catch(err) {
                        //$.writeln("1 - " + err);
                        ungroupErrors++;
                   }
              
                   for (var k = subGroups.length-1; k >= 0; k--) {
                        try {
                             doc.groups.itemByID(subGroups[k]).ungroup();
                        }
                        catch(err) {
                             //$.writeln("2 - " + err);
                             ungroupErrors++;
                        }
                   }
              }
              else {
                   try {
                        gr.ungroup();
                   }
                   catch(err) {
                        //$.writeln("1 - " + err);
                        ungroupErrors++;
                   }
              }
         }     
    }
    //--------------------------------------------------------------------------------------------------------------

    Thanks in advance.

    Kasyan

    Hi Kasyan!

    I was not trying to integrate this into your script, so you may need to adjust a little. The trick is to define a function that detects the point of intersection of two lines - and, of course, you must call it for lines that will not fail to cross the border of the page! (Otherwise, it would simply expand * any * the line upward and on the border.)

    I think it would be wise to predict a small mistake for lines that seem to run "up to" the edge of the page - I tested a line for 'x '.<= 0"="" on="" a="" line="" that="" appeared="" to="" start="" on="" 0;="" the="" control="" panel="" told="" me="" so.="" however,="" i="" didn't="" type="" that="" 0="" in;="" i="" dragged="" the="" line="" to="" the="" edge.="" apparently,="" it="" was="" *not*="" at="" precisely="" "0mm",="" but="" something="" like="" "0.001mm",="" because="" the="" script="" simply="" didn't="" "see"="" the="">

    My function comes from this page: http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/ and I did not test it does of orthogonal lines

    (but of course, you could add this in exceptional cases), and it's my script extending the line, with a small wrapper to configure things.

    The function tests * any * tail against * any * other line, so if we meet the page bounding box, I get the intersection with the purge of the side area where it crosses the bbox page.

    line = app.selection[0];
    // pg size in "regular" [y1,x1, y2,x2] format
    pagebbox = [0,0, app.activeDocument.documentPreferences.pageHeight,app.activeDocument.documentPreferences.pageWidth ];
    bleedDist = 5; //
    bleedbbox = [ pagebbox[0] - bleedDist, pagebbox[1] - bleedDist, pagebbox[2] + bleedDist, pagebbox[3] + bleedDist ];
    pt1 = line.paths[0].pathPoints[0].anchor;
    pt2 = line.paths[0].pathPoints.lastItem().anchor;
    // Start point:
    if (pt1[0] <= pagebbox[1] || pt1[0] >= pagebbox[3] ||
     pt1[1] <= pagebbox[0] || pt1[1] >= pagebbox[2])
    {
     if (pt1[0] <= pagebbox[1])
      intersectPt = IntersectionPt ( [pt1, pt2], [ [ bleedbbox[1], bleedbbox[0]], [bleedbbox[1], bleedbbox[2] ] ] );
    
     if (pt1[0] >= pagebbox[3])
      intersectPt = IntersectionPt ( [pt1, pt2], [ [ bleedbbox[3], bleedbbox[0]], [bleedbbox[3], bleedbbox[2] ] ] );
    
     if (pt1[1] <= pagebbox[0])
      intersectPt = IntersectionPt ( [pt1, pt2], [ [ bleedbbox[1], bleedbbox[0]], [bleedbbox[3], bleedbbox[0] ] ] );
     if (pt1[1] >= pagebbox[2])
      intersectPt = IntersectionPt ( [pt1, pt2], [ [ bleedbbox[1], bleedbbox[2]], [bleedbbox[3], bleedbbox[2] ] ] );
     line.paths[0].pathPoints[0].anchor = intersectPt;
    }
    // End point:
    if (pt2[0] <= pagebbox[1] || pt2[0] >= pagebbox[3] ||
     pt2[1] <= pagebbox[0] || pt2[1] >= pagebbox[2])
    {
     if (pt2[0] <= pagebbox[1])
      intersectPt = IntersectionPt ( [pt1, pt2], [ [ bleedbbox[1], bleedbbox[0]], [bleedbbox[1], bleedbbox[2] ] ] );
    
     if (pt2[0] >= pagebbox[3])
      intersectPt = IntersectionPt ( [pt1, pt2], [ [ bleedbbox[3], bleedbbox[0]], [bleedbbox[3], bleedbbox[2] ] ] );
    
     if (pt2[1] <= pagebbox[0])
      intersectPt = IntersectionPt ( [pt1, pt2], [ [ bleedbbox[1], bleedbbox[0]], [bleedbbox[3], bleedbbox[0] ] ] );
     if (pt2[1] >= pagebbox[2])
      intersectPt = IntersectionPt ( [pt1, pt2], [ [ bleedbbox[1], bleedbbox[2]], [bleedbbox[3], bleedbbox[2] ] ] );
     line.paths[0].pathPoints.lastItem().anchor = intersectPt;
    }
    
    function IntersectionPt (ln1, ln2)
    {
     var ua;
     var x1 = ln1[0][0], x2 = ln1[1][0], x3 = ln2[0][0], x4 = ln2[1][0];
     var y1 = ln1[0][1], y2 = ln1[1][1], y3 = ln2[0][1], y4 = ln2[1][1];
     ua = ((x4 - x3)*(y1 - y3) - (y4 - y3)*(x1 - x3))/((y4 - y3)*(x2 - x1) - (x4 - x3)*(y2 - y1));
    
     return [ x1 + ua*(x2-x1), y1 + ua*(y2-y1) ];
    }
    
  • How to draw the lines automatically

    In LabVIEW I must draw a line automatically (both vertically and horizontally) the user will define the vertical and horizontal number lines.

    Is this possible with LabVIEW

    Thanks in advance

    You move to the point of departure of the line using "move the pen", and then draw the line using "draw the line".

    Repeat for each line. (using for example a for loop and autoindexing on positions).

  • exclude all intersections of a member of the solution based on an intersection in the cube

    Is it possible to exclude all intersections of a member of the solution based on an intersection in the cube?

    Example of Dimensions

    Fund

    Center

    Activity

    Accounts

    Method

    F1

    C1

    A1

    Recipes

    Value

    F1-1

    C1-1

    A1-1

    R1

    Percent

    F1-2

    C1-2

    A1-2

    R1-1

    F1-3

    C1-3

    A1-3

    R1-2

    F2

    C2

    A2

    R1-3

    F2-1

    C2-1

    A2-1

    R2

    F2-2

    C2-2

    A2-2

    R2-1

    F2-3

    C2-3

    A2-3

    R2-2

    R2-3

    Fees

    E1

    E1-1

    E1-2

    E1-3

    E2

    E2-1

    E2-2

    E2-3

    For example, I would like to do something like this:

    =============================================================

    / * Fix on all members of level 0 and value *.

    DIFFICULTY (@LEVMBRS ("funds", 0), @LEVMBRS("Center", 0), @LEVMBRS("Activity", 0), @RELATIVE ("Revenue", 0))

    'Value')

    / * If the Level0 Fund (Center, Activity) toplevel value of revenue is 0 or #MISSING * /.

    IF (@CURRMBR ("funds")-> "Centre"->"activity"->"recipes"-> "Value" <. 00000001)

    / * Calculation of the judgment and DO NOT attach to any other point of intersection of the @CURRMBR (the "Fund") * /.

    / * or stop the calculation and move to the next member of the dimension of Fund in the fix * /.

    ENDIF

    / * increase or decrease the current level 0 value based on what percentage he composed of revenues (expenditure - revenue), do all Level1Fund-> income = Level1Fund-> expense * /.

    ("Value" > 0) IF

    'Value' = ('Value' * @PARENT (@CURRMBR ("funds"))-> 'Fees '->' Center '->' activity '->' value')

    / @PARENT (@CURRMBR ("funds"))-> 'Recipes '->' Center'-> 'activity '->' value ';

    ENDIF

    )

    ENDFIX

    =============================================================

    The reason why I need to do this is for each fund Level0, there are more 57 million level 0 (Center, activity), back combinations. And the script takes 6 hours for all funds of which 80% could be ignored. I'm currently using the script below to not do the math on anything is zero or missing, but it still needs to fix on all combinations of 57 million by the Fund.

    =============================================================

    / * Fix on all members of level 0 and value *.

    DIFFICULTY (@LEVMBRS ("funds", 0), @LEVMBRS("Center", 0), @LEVMBRS("Activity", 0), @RELATIVE ("Revenue", 0))

    'Value')

    / * If the current value is NOT 0 or #MISSING * /.

    ("Value" > 0) IF

    / * If the Level0 (Center, Activity) toplevel value of income fund is NOT 0 or #MISSING * /.

    IF (@PARENT (@CURRMBR ("funds"))-> "Centre"->"activity"-> "Fees"->"value" > 0)

    / * increase or decrease the current level 0 value based on what percentage he composed of revenues (expenditure - revenue), do all Level1Fund-> income = Level1Fund-> expense * /.

    'Value' = ('Value' * @PARENT (@CURRMBR ("funds"))-> 'Fees '->' Center '->' activity '->' value')

    / @PARENT (@CURRMBR ("funds"))-> 'Recipes '->' Center'-> 'activity '->' value ';

    ENDIF

    ENDIF

    )

    ENDFIX

    =============================================================

    I just thought if I could jump fixation on any intersection of this Fund, where the higher level of income is 0, I could save bugs by Level0 57 million Fund.

    I am interested to hear any questions, suggestions or criticism. I worked on it for several days and can't seem to find a good solution in addition to recommending this calc will run once a week, while the process is supposed to difficulty currently runs nightly.

    My apologies for the long-winded explanation, thanks for answer (s).

    Post edited by: BrandonNeel Has changed IF (@CURRMBR ("funds")-> "Centre"->"activity"-> "Recipes"->"value" > 0) TO IF (@PARENT (@CURRMBR ("funds"))-> "Centre"->"activity"-> "Fees"->"value" > 0)

    Hello

    Just another thing as well. With the help of @PARENT and @CURRMBR will be slow. In the calc example you provided I don't know why you use @CURRMBR. You set on LEV 0 funds anyway, so it will scroll each fund an and evaluate each in turn. Also, if you need the value of a Parent of a specified member, what you are doing, then using @PARENTVAL is much faster.

    You have specified the formula should be read;

    'Value' = ('Value' * @PARENTVAL ('Fund', 'Charge '->' Center '->' activity'-> 'Value'))

    / @PARENTVAL ("Fund", "recipes"->"Center"->"activity"->"Value");

    Thank you

    Anthony

  • The transformation that is inherited from the lines?

    I noticed that this new version of Illustrator CC 2015 had changed the functionality of how is she changing lines.

    For example, I have a line drawn at a 45 degree angle.  When you select this line with the Selection tool while keeping the SHIFT key and dragging a point with my mouse, the line is more in line with its original angle of 45 degrees.

    Can I change something in my preferences to return about the old features?  It is most annoying.

    This is to constrain the direction handles when moving from a path.

    If you want to move a point and keep the angle of 45 degrees (or any angle that has been pulled) just take the point (no need to change tools) and move it in the direction of the angle.

    No need to use the SHIFT key, the line is a form in this version and automatically snaps to the corner which is drawn in.

  • In Adobe Flash cc, is there a way to keep the 2 lines (pen tool or the line tool) which cross each other anchor at the intersection?

    I often use the tool/line pen tool and when I have the curve the line with the Selection tool it often crashes on nearby vector lines. Is any way to stop this? In Adobe Illustrator crossed lines drop anchor (at least for me).

    Is it possible to change it? or is there another tool pen / I do not know will not be the anchor on a different line whenever he touches?

    Hello

    You can use these tools in drawing mode of the object (available just below the color sample of fill/outline in the tools Panel when a drawing tool is selected) where several objects create the intersection points. But please note if draw oneself which intersect the lines then it will create an anchor point.

    Thank you!

    Mohan

  • can someone tell me why I can't update to El Capitan 10.11.2? the line "Show details" gets up and I click on it to make the update. When I do this, it just goes back to doing nothing, so I can never get past this point.

    can someone tell me why I can't update to El Capitan 10.11.2?

    When I try to update "updates available have changed" guest shows up.i click "Show details" prompt to complete the update and when I do that, it just goes back to doing nothing, so I can never get past this point. can someone help me with this, please?

    Thank you very much.

    In some cases, this error message is caused by a problem in the network. Restart your router as your device at wide band, if they are separated. If there is no change, see below.

    This procedure will remove some temporary and cache files. The files are generated automatically and do not contain any of your data. Sometimes they can become corrupted and cause problems like yours.

    Please, back up all data and read this message before doing anything.

    Triple-click anywhere in the line below on this page to select this option:

    /var/folders/zz/zyxvpxvq6csfxvn_n00000s0000068

    Right-click or Ctrl-click on the highlighted line and select

    Services ▹ reveal in Finder (or just to reveal)

    the contextual menu.* file should open with a selected subfolder. The subfolder has a long name beginning with "zyx" and ending with "68". Place this subfolder in the trash. Do not move other subfolders with similar names. You may be prompted for administrator login password. Restart the computer and empty the trash.

    * If you do not see the item context menu copy the selected text in the Clipboard by pressing Control-C key combination. In the Finder, select

    Go ▹ go to the folder...

    from the menu bar and paste it into the box that opens by pressing command + V. You won't see what you pasted a newline being included. Press return.

  • change the color of the line in a diagram 3D with points - e3DShapePoints

    How can I change the color of line in a type of diagram of e3DShapePoints? I want to use one of the global predefined palettes.

    I managed to change the color of line of brand via:

    Report.Sheets.Item (MySheetName). Objects.Item (MyDiagramName). Curves3D.item (MyCurveName). Shape.Settings.Marker.Line.Color.ColorIndex = eColorIndexGlobalColorPalette3

    but this will not have the legend color unfortunately. Apparently there is no object available within the parameters of the curve line.

    Any suggestions?

    If you cange the color in the definition of the curve of dialogue for 'points' this corresponds to the 'points' textcolor because no line is available. (oMyShape.Extensions.Label.Font.Color.ColorIndex = eColorIndexGlobalColorPalette1)

    Dim oMy3DAxisSystem, oMy3DCurve, oMyPos, oMyShape
    Call Report.NewLayout)
    Call Data.Root.Clear)
    Call DataFileLoad (DataReadPath & "Report_Data.tdm", "CT","" ")
    Set oMy3DAxisSystem = Report.ActiveSheet.Objects.Add (eReportObject3DAxisSystem, "My3DAxisSystem")
    Set oMyPos = oMy3DAxisSystem.Position.ByCoordinate
    oMyPos.X1 = 20
    oMyPos.X2 = 80
    oMyPos.Y1 = 20
    oMyPos.Y2 = 80
    Set oMy3DCurve = oMy3DAxisSystem.Curves3D.Add (e3DShapePoints, "MyNew3DCurve")
    Set oMyShape = oMy3DCurve.Shape
    oMyShape.DataStructure = e3DDataStructureMatrix
    oMyShape.XChannel.Reference = "[2] / [1].
    oMyShape.YChannel.Reference = "[2] / [2].
    oMyShape.ZChannel.Reference = "[2] / [3].
    oMyShape.Settings.Marker.Type = eMarkerCircle
    oMyShape.Settings.Marker.Filling.UseCurveColor = True
    Call oMyShape.Settings.Marker.Filling.SetPredefinedColor (ePredefinedColorred)

    oMyShape.Extensions.Label.Font.Color.ColorIndex = eColorIndexGlobalColorPalette1
    ' oMyShape.Settings.Marker.Line.UseCurveColor = True
    ' oMyShape.Settings.Marker.Line.Color.ColorIndex = eColorIndexGreen
    ' oMyShape.Settings.Marker.Filling.UseCurveColor = True
    ' oMyShape.Settings.Marker.Filling.ColorIndex = eColorIndexblack
    oMy3DAxisSystem.ColorLegend.Visible = True

    Call Report.Refresh)

    It's a little confusing.

    Hope this helps

    Winfried

Maybe you are looking for

  • When I open a tab I saw previous open tab, but I get an advertisement; I can close this tab, but how do I get rid of announce it?

    I have 8 tabs previously open when I click to open a new tab, but an announcement appears in the second block of the tab. I can hit the X to close, but the next time I open a new tab, one other advertising and sometimes several appear. I want to get

  • What happened to the R7000 1.0.6.28 firmware?

    I went to the download on netgear.com and site more see the firmware 1.0.6.28 or 1.0.5.XX. What happened to them? Should I be uninstall and go back to an older version?

  • Shift register Alternative

    Hello I try to have my program permanently store the last several minutes of data that my sensor collects and run a calculation to see if a certain fraction of it is greater than a threshold. What I know, I could store the values in the shift registe

  • LabVIEW command-line

    I have a program with several loops. How can I do a single loop will wait until another is finished before start? Thank you arithehun

  • USB ports no longer work after windows 10

    Hello Tried to solve the problem I have with my usb ports not recognizing not not the mobile hard drive trying to help pre Windows 10 answers but no luck. Please could someone advise or help me reinstall my usb drivers? for my system, now I win 10. T