Hi guys, this is my first post 🙂
So basically i have 22 coordinates which i plot into a XY graph to make a "path". The problem is that i am not getting the "path" that i am looking for because i do not have enough coordinates to plot what i want, so i have to create or estimate more coordinates (with the coordinates that i already have) for my graph to be ok.
So i would like to generate the intersection point coordinates of some points so i can have the graph that i want. The first image is the path that i have and the second image is the path that i desire. you can take a look at my VI here.
If it wasnt clear, i would like to know how i can get "automatically" the intersection coordinate of 2 other consecutive coordinates? I started with a case structure to modify the estimation of coordinates, so if i have a D in the text file it means i will have a straight line so i dont need to calculate the intersection point, however if i have a C it means that i want to calculate the intersection point of 2 coordinates.
You can use the text file to get the coordinates i am ploting.
Thanks for your help.
I'll have a look at it later, but what point density do you want on your lines? Is it sufficient to define the correct edges?
What's the exact definition of the three numeric columns?
Thank you Altenbach for your answer,
I changed the text file so everyone can use it, and i made the changes you propose.
So to begin with, the numeric columns, the first one is the X coordinate, the second one is the Y coordinate and the third one is the
length of the wire path (physical wire) so the code after unbundel by name is to set the "metric step" between the points i want to plot, then the case structure sets the increment of the points or the path they have to follow so they can reach each coordinate. So as you can see in the images i posted before, i can plot all right angles but it is manually, like indexing manually every point of each corner, in reallity if you use mi VI you will get the path i have right now, so basically my goal is to get all right angles but automatically.
This Vi i use to get all right angles , but as you can see its ..... well....not that good, but the idea is there.
You can find the coordinates with a point instead of a coma.
I tried to simplify your VI a little bit:
Still lot to improve, just wanted to show how to do calculation with (numeric) clusters and where to place constant operations out of loops…
Now it's your turn to add some comments on what to do in each case (C or D) and what is the expected result for each of the cases!
Thank you Altenbach,
That gave me some ideas, is there a way to do it not using complex numbers representation?
I am trying to do that but i am not getting any succes in that . What i am getting is a straight line
and not the path i want, i think it should be easy, but i am having troubles to see what i am doing wrong haha.
There is nothing special about complex numbers, in fact you could just do a literal translation in a minute starting with my code. Your code is very different, for example it has a FOR loop inside the case structure. Mine doesn't.