Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted

09-12-2019 11:59 PM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Labels:

Please help me, How can I find the intersection points (x,y) in the given figure.

please give some suggestions.

Highlighted
Options

09-13-2019 02:13 AM - edited 09-13-2019 02:16 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi Rajesh,

I guess you want to find the point [1, 2] as "intersection".

From what you have shown:

- Create an array of points (aka cluster of X and Y value) from your two input arrays.
- Test for any duplicate points in your point array (use Search1DArray…)

(When you want to calculate points where lines cross: this is simple mathematics you should have learned in school. Apply math…)

Best regards,

GerdW

using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win10+cRIO

GerdW

using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win10+cRIO

Highlighted
Options

** LabVIEW Champion. It all comes together in GCentral **

**What does "Engineering Redefined" mean??**

09-13-2019 02:39 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Your intersection is actually at one of the actual points and thus is a set of coordinates that occurs twice. Given this information, the solution us trivial. (In addition, the start and end points overlap to close the curve, so keep that in mind)

Programming is typically more interesting and should work with any finite set of arbitrary line segments. As a first step, generate two random lines defined by two points each and see if they cross (or touch), and if so where. Solve the general problem!

Highlighted
Options

09-13-2019 05:53 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Thanks, GerdW

But I have some doubts

Here it is clearly visible that where the line intersects so you suggest search for the intersect element. But if a graph is complicated with 10000 data-set then this might not work as it may be difficult to locate the point exactly

Suppose I need to calculate this intersection with online data then what I can do.

Thank you again.

Highlighted
Options

09-13-2019 06:08 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi Rajesh,

@Rajesh10 wrote:

Suppose I need to calculate this intersection with online data then what I can do.

Did you read Christians and my answer?

Apply basic math!

Best regards,

GerdW

using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win10+cRIO

GerdW

using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win10+cRIO

Highlighted
Options

09-13-2019 06:10 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Thanks altenbach

But the whole plot is a single line

Highlighted
Options

09-13-2019 06:53 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@Rajesh10 wrote:

Thanks altenbach

But the whole plot is a single line

No it isn't. It is a bunch of line segments between a series of points that are defined by an X array and Y array.

What you have is not really a LabVIEW problem. At least not yet. It is a Math/Geometry problem.

How would you find the answer if all you had was pencil and paper?

Highlighted
Options

** LabVIEW Champion. It all comes together in GCentral **

**What does "Engineering Redefined" mean??**

09-13-2019 10:13 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Once you solve the problem I gave you earlier, make it into a subVI, then go inspect every line segment in order and see if it touches any line segment you already looked at. You also need to deal with special cases (e.g. two lines overlap, two segments are identical, one point touched another line but the lines do not cross, one long line crosses several other segments, etc.).