Determine the Intersection points of 2 splines

I have 2 sets of x,y points, from which I have created 2 splines. These lines intersect each other at a number of points. How can I determine these intersection points? As there are over 200 pairs of lines, each whose intersection points have to be calculated, I require a solution that executes very quickly.
Thanks,
Shaps

You'll have to take a look at Solving Polynomial Equations.
If you're not mathematically inclined, you might want to find help on this one. Otherwise, I'd start with Mathworld. It's a great site for Maths and Physics questions.
The higher the order of your polynomial, the harder it is to solve.
You should consider a more brute-force approach if you don't need high precision. It depends on your application, but here I cannot offer advice.
Let's say you take the following approximations for your curves: (3rd order curves, very small chance of being perfect fit...)
1) ax^3+bx^2+cx+d = 0
2) a'x^3+b'x^2+c'x+d' = 0
The curves cross each other for each x that satisfy this equation: 
(a-a')x^3+(b-b')x^2+(c-c')x+(d-d') = 0
Now, the analytical solution to this can be taken from Wolfram Mathworld website and is not too complicated, but to solve for a 7th order curve... good luck!
All solutions will not necessarily fall within your data range, but if you want an approximative order for your equation, count the number of times each curve cross... and add a few orders!
As I said, it might need a brute-force approach. Good Luck.

Similar Messages

  • The intersection point of two lines in 3D

    How to calculate the intersection point of two lines in 3D?
    source code!

    this is actually a rather easy operation. lets look at some basic properties of lines / vectors in 3D space:
    1. If two lines intersect at a single point, then there must be exactly one plane in which the two lines are co-planar. This is pretty trivial to prove, but I won't bother here, because you can google to find out that two vectors that extend from a common point define a single plane.
    2. If you take the cross-product of two vectors, the resulting vector is guaranteed to be perpendicular to both lines (this is a basic property of a cross-product). If the two lines intersect, then this cross-product will be the normal vector to the plane in which both lines lie.
    3. Now transform (rotate) yours space such that your z-axis becomes parallel to the normal vector of that plane.
    Now, the parametric equation for a line in 3D space is this:
    (x, y, z) = (xo, yo, zo) + k(xd, yd, zd)
    After you have transformed your space, you will notice that the equation of each line will now be
    (x, y, z) = (xo, yo, zo) + k(xd, yd, 0)
    If zo is equal for both lines, then the two lines intersect. Otherwise, the two lines do not intersect.
    if the intersection exists, then to solve for it, you ignore the z coordinate, and treat it like a two dimensional system:
    (x, y) = (xo, yo) + k(xd, yd)
    you can use the basic 2D formula y - yo = m(x - xo), or y = m(x - xo) + yo
    you can calculate m = yd / xd.
    which simplifies to y = mx -mxo + yo, or 0 = mx - y + (yo - mxo)
    you now have two equations of the form Ax + By + C = 0.
    From there, you can use Cramer's rule to find the intersection of the two lines.
    It sounds kind of complicated when you read it as I have presented it, but it's actually extremely easy to write a program for, because each step is simple mathematic operation with basically no decisions involved (hence no if-structures, except at the one point where you actually need to determine if the lines intersect).
    So to reiterate, the steps required are:
    1. Check if lines are parallel. If yes, check if they are the same line, and then stop.
    2. If not parallel, cross-multiply the direction vectors of each line.
    3. Rotate your space such that z is parallel with cross-product of lines
    i. dot-product of z axis (0, 0, 1) with cross-product of lines gives angle*
    ii. cross-product of z axis (0, 0, 1) with cross-product of lines gives axis of rotation.
    iii. rotate your lines (i.e. point and direction vector) about that axis by negative of ange determined in (i).
    4. if z value of points from both lines is the different, no solution. stop.
    5. otherwise, apply Cramer's rule.
    6. done.
    * obtaining the angle of rotation with the dot product relies on the angle being less than 90 degrees, so check if z value of normal vector is + or -, and then perform dot product and cross-product on appropriate + or - z vector.
    - Adam

  • How to determine the mount point for directory /tmp ?

    Folks,
    Hello. I am installing Oracle 11gR2 RAC using 2 Virtual Machines (rac1 and rac2 whose OS are Oracle Linux 5.6) in VMPlayer and according to the tutorial
    http://appsdbaworkshop.blogspot.com/2011/10/11gr2-rac-on-linux-56-using-vmware.html
    I am installing Grid infrastructure. I am on step 7 of 10 (verify Grid installation enviroment) and get this error:
    "Free Space: Rac2: /tmp"
    Cause: Could not determine mount point for location specified.
    Action: Ensure location specified is available.
    Expected value: n/a
    Actual value: n/a
    I have checked the free space using the command:
    [root@Rac2 /]# df -k /tmp
    Output:
    Filesystem     1k-blocks     used     Available     Use%     Mounted on
    /dev/sda1     30470144     7826952     21070432     28%     /
    As you see above, the free space is enough, but could not determine mount point for /tmp.
    Do any folk understand how to determine the mount point for directory /tmp ?
    Thanks.

    I have just checked "/home/oracle/.bash_profile". But in my computer, there is no "oracle" under /home directory.Is this your first time Linux and Oracle installation? I had a brief look at your referenced link. The reason why you do not find a "oracle" user is because the instructions use "ora11g" instead, which, btw, is not standard. The directories of your installation and your installation source can be somewhat different from known standards and you will have to adjust it to your system.
    My best guess is that you have either missed something in the instructions or you need to ask the author of the blog what is wrong. The chance to find someone here who has experience with these custom instructions is probably unlikely.
    I suggest you try to locate the cluster verification tool, which should be in the bin directory of your grid installation. Alternatively you might want to check the RAC, ASM & Clusterware Installation forum: RAC, ASM & Clusterware Installation

  • Drawing object on the intersections point of 2 lines.

    hi guys, im very new in actionscrip , please give me some guidance.
    i'm doing this project , about 2 lines intersecting each other(the 2 lines are not always on the same position) . i try to find the intersections point using collision detection method but how do i place an object on the intersections point?
    if(line1.hitTestObject(line2)) //  so this is how we find the intersection point but we do not know how to draw/place an object on the  intersection point.

    then it's easier to calculate the intersection algebraically:
    function intersectionF(x1:Number,y1:Number,x2:Number,y2:Number,x3:Number,y3:Number,x4:Number,y4:Number):Array {
         if (x1==x2) {
              if (x3==x4) {
                   if (x1==x3) {
                        return ["line1"];
                   } else {
                        return [null];
              } else {
                   // line 1 vert, line 2 not
                   var m2:Number = (y3-y4)/(x3-x4);
                   var b2:Number = y3-m2*x3;
                   return [x1,m2*x1+b2];
         } else {
              // line 1 not vert
              if(x3==x4){
                   // line 2 vert
                   var m1:Number = (y1-y2)/(x1-x2);
                   var b1:Number = y1-m1*x1;
                   return [x3,m1*x3+b1];
              } else {
                   // line 2 not vert
                   m1 = (y1-y2)/(x1-x2);
                   b1 = y1-m1*x1;
                   m2 = (y3-y4)/(x3-x4);
                   b2 = y3-m2*x3;
                   var x:Number = (b2-b1)/(m1-m2);
                   return [x,m1*x+b1];

  • How can the coordinates of an intersection point of a cross

    there is a cross on a chart and i need the coordinates of the intersection point as a reference for further measurements

    The simplest way is pattern matching. Train the routine with the cross, then search for it. It should always be within about 1 pixel of the intersection. You can use sub-pixel accuracy to improve the results sometimes.
    To improve the pattern matching results, you can use edge or peak finding routines to find the horizontal and vertical lines that make up the cross. You can determine the center from these lines.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Problems finding the interception point of two lines

    Hi there,
    I've written a class "Linie", which extends the Line2D.Float class, and added a method to determine the interception point of two lines.
    One of the two lines can be anything except horizontal and vertical, the other one (which is the one that is passed to the method) can only be horizontal or vertical (I hoped this would make it easier).
    public Point schneidet(Linie l){
              Point schnitt = new Point();
              float m = (y1-y2)/(x1-x2);
              int n = Math.round(y1-(x1*m));
              if (l.y1==l.y2){               // Is line l horizontal?
                   int poX = Math.round((l.y1-n)/m);
                   schnitt.setLocation(poX,(int)l.y1);
              else if (l.x1==l.x2){               // Is line l vertical?
                   int poY = Math.round((m*l.x1)+n);
                   schnitt.setLocation((int)l.x1,poY);
              return schnitt;
         }The equation of a line is
    y = m*x + n.
    Because the line l can only be horizontal or vertical, one coordinate of the interception point is always clear from the beginning, the other one is supposed to be calculated and stored in poX or poY.
    But this is where the method doesn't do what it's supposed to. There must be some mistake inside the calculation with the slope (m) and n. Any ideas?

    Why so complicated? Are the lines real lines (straight connections between 2 points) or curves? If they are lines, you just need to inspect the coordinates of all 4 points (2 * 2 end points) and show if the points are "within" the other points ...
    Intersection point of two lines
    Line Intersection and its Applications
    SIMPLE ALGORITHMS I - INTERSECTION OF LINES

  • How to find intersection point between a lineseries and a vertical line.

    I have a lineseries chart (refer the screenshot). As I move the spend slider shown in the attachment, a vertical line is drawn in the chart. (I did this using the cartesian canvas as annotation element - using canvas.moveTo(), canvas.lineTo() functions)
    I want to find out the intersection point(y value) where the vertical line meets the lineseries. Can someone help me on this. It will be really helpful.
    Thanks,
    Jayakrishnan

    Here are a few functions I wrote years ago for common chart transformations... the function you're going to focus on for your solution is chartToScreen...
    *  Converts the screen position to chart value position
    *  @param thePos - Number - The position you want to convert
    *  @private
            private function getChartCoordinates(thePos:Point):Object
                   var tmpArray:Array = dataTransform.invertTransform(thePos.x, thePos.y);
                   return {x:tmpArray[0], y:tmpArray[1]};
    *  Takes a non-numeric chart value and returns a proper numeric value
    *  @param inValue - String - The display name of the instance showing on the axis (eg. if we're showing months, it might be 'Sep - 06'
    *  @param theAxis - IAxis - The axis on which we're looking
              public function getNumericChartValue(inValue:String, theAxis:IAxis):Object
                   var axisCache:Array = new Array({inValue: inValue})                 
                   if(!(theAxis is LinearAxis))
                        theAxis.mapCache(axisCache, "inValue", "outValue", true);
                        return {numericValue: axisCache[0].outValue}
                   else
                        return {numericValue: Number(inValue)};
    *  Converts the chart values into screen coordinate values
    *  @param chartX - Number - The display name of the instance showing on the axis (eg. if we're showing months, it might be 'Sep - 06'
    *  @param chartY - Number - The axis on which we're looking
              public function chartToScreen(chartX:Number, chartY:Number, theSeries:Series):Point
                   var tmpCache:Array = new Array({chartX:chartX, chartY:chartY});
                   if(theSeries)
                        theSeries.dataTransform.transformCache(tmpCache, "chartX", "screenX", "chartY", "screenY");
                   else
                        dataTransform.transformCache(tmpCache, "chartX", "screenX", "chartY", "screenY");
                   return new Point(Math.round(tmpCache[0].screenX), Math.round(tmpCache[0].screenY));
    *  takes a point in mouse position, and runs it through converting to chart coordinates, converts chart coordinate to numeric value if needed
    *  and then back into mouse position to get the nearest axis snap point
    *  @param thePoint - Point - The position we're converting
    *  @private
              private function getSnapPosition(thePoint:Point):Point
                   var chartPoint:Object = getChartCoordinates(new Point(thePoint.x, thePoint.y));
                   //if either of the axis chart results is not in numeric format, we get the numeric equivalent of it
                   var chartX:* = chartPoint.x;
                   var chartY:* = chartPoint.y;
                   chartX = getNumericChartValue(chartPoint.x, CartesianChart(this.chart).horizontalAxis).numericValue;
                   chartY = getNumericChartValue(chartPoint.y, CartesianChart(this.chart).verticalAxis).numericValue;
                   return chartToScreen(chartX, chartY, null);

  • Line with intersection points across Polygon

    I have a (multi point) line that intersects a polygon and I can find the intersection points
    See this site for example:  Finding Intersection Points between Line and Polygon
    However I would like to get the original multi point line WITH the intersection points added...
    How would I achieve this?
    Basically for a given line that intersects a polygon,  I would like to have returned...
    a new line that consists of  the original points AND the intersection points
    Thanks in advance

    Hi Luc,
    Thanks for your response.
    I had tried an SDO_UNION however the result of the union is not quite what I expected...
    Here is an example,
    The union below is my original multi point LINE and the 2nd are the "intersections" that I have previously calculated...
    These intersections are actually in between specific points in the LINE...
    However the union does not seem to put these 4 points in the line where I expect them too..
    Not sure if SDO_UNION is the function for the job ?
    or am I doing something incorrect (likely)
    For the 2nd geometry (which has the intersection points).... what would be a type to use ?  Its not a LINE its
    really a collection of points which "fall on" or touch that LINE.
    select SDO_GEOM.SDO_UNION (
      (SELECT SDO_GEOMETRY(2002, 8265, NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(
    -73.7789255556,40.6397511111,-70.0267102778,41.2818872223,-69.7833,42.4333,-69.6333,42.5166,-69.45,42.6166,-69.3,42.7,-69.1333,42.8,-68.95,42.8833,-68.8,42.9833,-68.6333,43.6666,-68.45,43.1666,-68.2666,43.25,-68.1,43.3333,-67.9166,43.4333,-67.7666,43.5166,-67.5833,43.6,-67.3833,43.7,-67.2166,43.7833,-67.6666,43.8833,-66.8666,43.9666,-66.65,44.6666,-66.5,44.15,-66.2833,44.2333,-66.1,44.3166,-65.9166,44.4333,-65.7333,44.5166,-65.55,44.6,-65.3666,44.6833,-65.1666,44.7666,-64.9833,44.85,-64.7833,44.95,-64.5833,45.3333,-64.4,45.1166,-64.1833,45.2166,-64,45.3,-63.8,45.3833,-63.6166,45.4833,-63.4166,45.5666,-63.2,45.65,-63,45.7333,-62.8166,45.8333,-62.6166,45.9166,-62.4166,46,-62.2,46.3333,-62,46.1666,-61.7833,46.25,-61.5833,46.35,-61.3833,46.4166,-61.1833,46.5,-60.9833,46.5833,-60.7666,46.6666,-60.5666,46.75,-60.3666,46.8166,-60.15,46.9,-59.95,46.9833,-59.75,47.6666,-59.55,47.15,-59.35,47.2166,-59.1166,47.3,-58.9333,47.3666,-58.7333,47.4333,-58.5166,47.5166,-58.3333,47.5833,-58.1333,47.6666,-57.9166,47.7333,-57.7166,47.8,-57.55,47.8666,-57.3333,47.95,-57.1333,48.6666,-56.9333,48.3333,-56.7166,48.15,-56.5166,48.2333,-56.3,48.2833,-56.1166,48.3666,-55.8833,48.4166,-55.7,48.4833,-55.4666,48.55,-55.2833,48.6,-55.05,48.6666,-54.8666,48.7166,-54.65,48.7666,-54.45,48.85,-54.2333,48.9,-54.6666,48.95,-53.8,49.6666,-53.6,49.6666,-53.3833,49.1333,-53.1833,49.1833,-52.9833,49.2333,-52.7666,49.3,-52.55,49.35,-52.3333,49.4,-52.1166,49.45,-51.9,49.5166,-51.6833,49.5666,-51.4666,49.6166,-51.2333,49.6666,-51.6666,49.7166,-50.8,49.75,-50.6,49.8166,-50.3833,49.8666,-50.1666,49.9166,-49.95,49.9666,-49.7333,50,-49.5166,50.3333,-49.2666,50.6666,-49.05,50.3333,-48.8333,50.1166,-48.5833,50.15,-47.9166,50.25,-40,51,-35,51.6,-29,51.1166666667,-40.0833333333,50.4333333333,-44.55,49.6,-52.75,47.6166666667,-52.7524194444,47.6186194445
    )) AS geom
        FROM dual
        ),     -- LINE
      (SELECT SDO_GEOMETRY(2005, 8265, NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(
    -50.0000000000001,49.9551029915852,
    -30,51.2193352796549,
    -50,48.3647769601594,
    -30,51.0986671679795
      )) AS geom2
        FROM dual
        ), --  INTERSECTIONS
        0.005
    ) from dual;
    The "INTERSECTIONS" above
    -50.0000000000001,49.9551029915852,
    -30,51.2193352796549,
    -50,48.3647769601594,
    -30,51.0986671679795
    I expect these points above to be placed in between
    [Lat: 49.9166, Long: -50.1666] -->    crossing Lat: 49.9551029915853, Long: -50  <--   [Lat: 49.9666, Long: -49.95]
    [Lat: 51.6, Long: -35] -->                 crossing Lat: 51.2193352796549, Long: -30  <--   [Lat: 51.1166666667, Long: -29]     
    [Lat: 51.1166666667, Long: -29] --> crossing Lat: 51.0986671679795, Long: -30  <--   [Lat: 50.4333333333, Long: -40.0833333333]
    [Lat: 49.6, Long: -44.55] -->             crossing Lat: 48.3647769601594, Long: -50  <--  [Lat: 47.6166666667, Long: -52.75]
    I have the intersections which is fine.. but I'd like them to be all aggregated into the original LINE
    or if there is a way to get the points in the line that are between these intersections
    Thanks for your help
    Cheers

  • Installing Oracle RAC problem: Could not determine /tmp mount point

    Folks,
    Hello. I am installing Oracle 11gR2 RAC using 2 Virtual Machines (rac1 and rac2 whose OS are Oracle Linux 5.6) in VMPlayer and according to the tutorial
    http://appsdbaworkshop.blogspot.com/2011/10/11gr2-rac-on-linux-56-using-vmware.html
    I am installing Grid infrastructure. I am on step 7 of 10 (verify Grid installation enviroment) and get this error:
    "Free Space: Rac2: /tmp"
    Cause: Could not determine mount point for location specified.
    Action: Ensure location specified is available.
    Expected value: n/a
    Actual value: n/a
    I have checked the free space using the command:
    [root@Rac2 /]# df -k /tmp
    Output:
    Filesystem     1k-blocks     used     Available     Use%     Mounted on
    /dev/sda1     30470144     7826952     21070432     28%     /
    As you see above, the free space is enough, but could not determine mount point for /tmp.
    Do any folks understand how to determine the mount point for directory /tmp ?
    Thanks.

    Folks,
    Hello. I have found the file ./bash_profile under /home/ora11g/ and the file is invisible. However, I edit the file using the command:
    [ora11g@Rac2 ~]$ vi /home/ora11g/.bash_profile
    I add the 2 lines into the file as below:
    TMP=/tmp; export TMP
    TMPDIR=$TMP; export TMPDIR
    I save the file .bash_profile and reboot Oracle Linux 5.6 and check again on step 7 of 10 in the Installer, but the problem is still not solved.
    Can any folk help to solve the strange problem "could not determine mount point for /tmp" ?
    Thanks.

  • I have two arrays of points, when i plot them there´s an intersection point, but this point doesn´t belong to any arrays...

    I have two arrays of points, when i plot them there´s an intersection point, but this point doesn´t belong to any arrays. I need to find the both value of this point, X and Y. I attached my problem in a very simple example. Thanks.
    Attachments:
    arrays_plot.vi ‏25 KB

    Although this doesn't directly answer your question , I've attached a VI that will hopefully give you a start and point you in the right direction. It generates a Boolean array that indicates between which indecies an intersection has taken place. Then, all you need to do is use triganometry to work out exactly what the intersection point is.
    Copyright © 2004-2015 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
    Attachments:
    2x1D_Array_Intersections.vi ‏36 KB

  • Line to line intersection point

    If i have a line with end points ( x1 , y1 ) ( x2 , y2 ) and
    another line that crosses it, and its end points are ( x3 , y3 ) ( x4 , y4 )
    how do i get the intersection point ( IPx , IPy ) ?

    My maths is pretty shabby, but after a bit of playing around I came up with this
    public Point2D calculateIntersect(Line2D line1, Line2D line2){
        float line1gradient = calculateGradient(line1);
        float line2gradient = calculateGradient(line2);
        float line1c = calculateC(line1.getP1(), line1gradient);
        float line2c = calculateC(line2.getP1(), line2gradient);
        float x = (line2c - line1c) / (line1gradient - line2gradient);
        float y = line1gradient * x + line1c;
        return new Point2D.Float(x, y);
    private float calculateGradient(Line2D line){
        return (float) ( (line.getP2().getY() - line.getP1().getY()) / (line.getP2().getX() - line.getP1().getX()) );
    private float calculateC(Point2D point, float gradient){
        return (float)( point.getY() - ( point.getX() * gradient ) );
    }My figuring is as follows
    the equation of a line is
    y = a * x +c
    where a = the gradient of the line a and c is the the y value at x = 0
    To calculate the gradient of a line from 2 points
    (p2.y - p1.y) / (p2.x - p1.x)
    and to calculate the value of c for the line
    p.y - p.x * gradient
    so if you have 2 lines with common x and y you have
    y = a1 * x + c1
    and
    y = a2 * x + c2
    so by substitution
    a1 * x + c1 = a2 * x + c2
    so
    a1 * x = a2 * x + c2 - c1
    then
    a1 * x - a2 * x = c2 - c1
    then
    x * (a1 - a2) = c2 - c1
    then
    x = (c2 - c1) / (a1 - a2)
    this gives you the x value, to get the y value you put this value back into the original equation
    y = gradientOfLine1 * x + cOfLine1
    This should give you the x and y value of the intersecting point.
    p.s. Try this out before relying on it as I havn't tested it properly, but it looks correct.
    Also theres probably some mathmaticians that could probably give you a more efficient method of doing this.
    Hope this helps Michael

  • Problem with intersection point

    Hi!
    I cant use the IMAQ Line intersection with lines created from IMAQ find edge. I get the error message:
    "These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
    The type of the source is 1-D array of
    cluster of 10 elements.
    The type of the sink is cluster of 2 elements."
    What am I doing wrong, or how can I get the intersection point of these two lines?
    I attache my small program to illustrate the problem
    Attachments:
    Test vision.vi ‏142 KB

    You need to manipulate your data a little.
    The output from the IMAQ find edge function returns an array of edges (each edge defined by ten clustered elements).
    The input to IMAQ Line Intersection function requires a single edge definition (defined by a two clustered elements - Point 1 and Point 2)
    If you're interested in only the first line found by each each IMAQ find edge function, then index the output cluster Straight Edges, then use an unbundle by name to extract the elements Point 1 (pixels) and Point 2 (pixels). Then bundle these together and provide the resultant cluster to the input Line 1 of IMAQ Line Intersection. Do the same for the second IMAQ find edge function and wire this to Line 2 of IMAQ Line Intersection.
    If you're interested in ALL the line results from IMAQ Find Edge, then you'll have to run this lot inside a loop and index each result sequentially.
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • Intersection point distance

    Point3d []linePts=new Point3d[2];
                    linePts[0]=new Point3d(line.getXStartCoordinate(),line.getYStartCoordinate(),0);
                    linePts[1]=new Point3d(line.getXEndCoordinate(),line.getYEndCoordinate(),0);
                    Point3d sgmtStart = new Point3d(riorPosition.getX(),riorPosition.getY(),0);
                    Point3d sgmtEnd = new Point3d(riorPosition.getY()+lineLength*java.lang.Math.cos(alfa),riorPosition.getX()+lineLength*java.lang.Math.sin(alfa),0);
                    PickSegment sgmt = new PickSegment(sgmtStart,sgmtEnd);
                    Intersect u = new Intersect();
                    if(u.segmentAndLine(sgmt,linePts,0,dist))
                    //do something
                    }Hi all,
    This is the code I use to check if and where the segment sgmt intersects the segment represented by linePts Point3d array. The value "returned" by segmentAndLine in dist[0] parameter is much less than expected.
    Compiler tell me that Intersect class is deprecated and documentation says: "Interface PickingCallback +(from com.sun.j3d.utils.behaviors.picking package)+: As of Java 3D version 1.2, replaced by com.sun.j3d.utils.picking.behaviors.PickingCallback".
    I looked for some equivalent method into com.sun.j3d.utils.picking.behaviors.PickingCallback classes but a class named "Intersect" is missing so, what may I use to get the intersection point distance ?
    Thank you to everybody.
    Raffaele
    Edited by: R@m@R68 on Apr 10, 2008 12:56 AM

                    Point3d []linePts=new Point3d[2];
                    linePts[0]=new Point3d(line.getXStartCoordinate(),line.getYStartCoordinate(),0);
                    linePts[1]=new Point3d(line.getXEndCoordinate(),line.getYEndCoordinate(),0);
                    Point3d sgmtStart = new Point3d(riorPosition.getX(),riorPosition.getY(),0);
                    Point3d sgmtEnd = new Point3d(riorPosition.getY()+lineLength*java.lang.Math.cos(alfa),riorPosition.getX()+lineLength*java.lang.Math.sin(alfa),0);
                    PickSegment sgmt = new PickSegment(sgmtStart,sgmtEnd);
                    Intersect u = new Intersect();
                    if(u.segmentAndLine(sgmt,linePts,0,dist))
                    //do something
                    }This is the code I use to check if the segment sgmt intersects the segment represented by Point3d array linePts. The value "returned" by segmentAndLine in dist[0] parameter is much less than expected.
    Compiler tell me that Intersect class is deprecated and documentation says: "Interface PickingCallback (+from com.sun.j3d.utils.behaviors.picking package)+: As of Java 3D version 1.2, replaced by com.sun.j3d.utils.picking.behaviors.PickingCallback".
    I looked for some equivalent method into com.sun.j3d.utils.picking.behaviors.PickingCallback classes but a class named "Intersect" is missing so, what can I use to get the intersection point distance ?
    Raffaele

  • How do you determine the time stamp or pointer in an Event?

    Perhaps I want to tell someone to check the specific point in an event, like 22:08 into the event or from marker 1234 to 5678.  What markers does iMovie use?
    Maybe I have 20 favorite clips in an Event and I want to reference a specific one. 
    When playing back a YouTube video I can say, Go to the 2:38 mark.   With an event, what time stamp can I reference?

    Event clips have a time code based on the time of day you shot the clip. Clips are listed in the event in chronological order. So you you want to point somebody to the action that tool place on March 23 at 10:03:45, you can.
    Click VIEW/Playhead Info. Now as you skim your mouse over the event clips, you will see the date and time info.
    This works on clips shot by a digital camera. If you have clips shot by older analog cameras like VHS or 8MM, you need to take some additional steps. Let me know if you need this.

  • Overlapping polygon and how to determine the points

    I have a larger footprint polygon/table called A and a sub-polygon/table called B.
    I need to identify which is polygon A and which is polygon B because they overlap with each other.
    And I need to identify all the point that falls within A and B.
    which means A = A and B = A+B and the other points that do notfall within A and B will be null.
    How do I start this assignment?
    I was thinking
    alter table A
    add  (ID varchar( 50 BYTE)) ;
    update A
    set ID = 'larger';
    --TO do a point in Polygon
    PROCEDURE point_polyA
    IS
         proc_name varchar2(50);
    BEGIN
         proc_name := 'point_polyA';
         add_log(proc_name,'Start processingpolyA');
         COMMIT;
         FOR x IN (SELECT id, geoloc
                       FROM A)
         LOOP     
              FOR y IN (SELECT a.*
                            FROM point
                           WHERE sdo_filter (A.geoloc, x.geoloc) = 'TRUE')
              LOOP               
                   IF sdo_geom.relate(y.geoloc, 'ANYINTERACT', x.geoloc, 5) = 'TRUE' THEN
                        INSERT INTO point_polyA ( id)
                             VALUES ( x.id);
                   END IF;          
              END LOOP;
              COMMIT;
         END LOOP;
         add_log(proc_name,'Finish!');
         COMMIT;
         EXCEPTION
                 WHEN OTHERS THEN
                    add_log(proc_name, substr(SQLCODE||' '||SQLERRM, 1, 199));
         COMMIT;Do the same for B then
    select ID
    from A,B
    where sdo_relate(A.geoloc,B.geoloc,'mask = contains') = 'TRUE';Message was edited by:
    CrackerJack

    Hi,
    this
    rownum<2
    making sure that only the one clicked polygon is rendered/displayed
    (pls see the [image of the screen |http://bp0.blogger.com/_8PXbvmaOB6M/SEe0rNCz4nI/AAAAAAAAAWo/lOHcLjbIz-U/s1600-h/verschneiden_snap3.png] )
    i.e. you click on the polygon of the area (county) and get the FOI as per Parameter 1 (which are the records/FOI contained in the first table "DEKUNDEN" = customers)
    in ur above code you will need to say:
    (b.geoloc, :1)
    recommend to firstly try to achieve a result with the delivered MVDEMO data.
    Then the SQL of the theme will look as follows:
    select a.location, a.name,
    a.city, a.sales from customers a where sdo_relate(a.location, (select
    geom from counties b where sdo_contains(b.geom, :1)='TRUE' and
    rownum&lt;2), 'mask=ANYINTERACT')='TRUE'
    re) attributes for both points and polygon
    --> for the points (customer table/theme) usually you get an Infowindow automatically for the theme "customers" for the "Info columns" you have defined in the ADVANCED Tab of the theme in the Mapbuilder.
    --> for the polygon you'll have to assign an info window on "mouse_right_cklick" as the "mouse-click" (left) has already been used for selelcting the polygon.
    and lastly I am not dealing with a webservice - just 2 tables: "customers" (with the POI - points) and "counties" (the polygon - area) from the MVDEMO example data.
    Hope that helped and I did not make more complicated - sorry - but it is quite complex (;-).
    Bernhard
    Edited by: BernhardFW on Aug 25, 2008 1:30 PM

Maybe you are looking for

  • Where can I get a new hard drive for an LC II (80MB)

    I have a complete Macintosh LC II that saw most of the family through University (and me retraining as a dentist). The hard drive is an IBM HDD 80MB 3.5" WDS-L80 - does anyone know anyone still selling these/ can I use a substitute. Would like to kee

  • How to define in different controls device and channels in a DAQmx function?

    Hi, I need to build a vi that permits the user to change the device of a DAQmx  acquisition system, although I don't want that the user modify the input channels. I`d like to know if it is possible to define in different controls device and channels.

  • ATI or NVIDIA ?

      First of all, Happy New Year !    Ok now, the reason I opened this thread is to get an opinion with fellow forummers on this question which people have been asking me.   " Which is better, ATI or NVIDIA ? "  And I answered that if we are comparing

  • HELP!!!...Firefox 4...STOP cursor focus from going to Bing search box????

    I just installed Firefox 4....Now every time I open firefox the cursor will automatically jump to the bing search box. I want it to start and stay inside the address bar. A long time ago I had this same problem and searched online and found a solutio

  • Dial up speeds at broadband prices!!!

    Why is it that I have to put up with dial up speeds on a braodband package? The last few weeks I have had download speeds of under 1mps, last time this happened after a few weeks of complaining I got up to 6mps and gradually the service has degraded