03-13-2013 12:27 PM
Well, thank you for your help, but I don't manage to make it work.
I'm so surpised that no one had that problem before me. If anyone has a solution, I'm listening 🙂
Thanks,
Sébastien
03-14-2013 04:59 AM
Hello Sébastien,
Where are you stuck at this moment?
03-14-2013 05:04 AM
Hi,
I'm still blocked at the same place.
I've got 4 points while drawing a ROI (Top, Left, Bottom, Right) and 1 other point which is the rotation of my rectangle and I'm not able to draw that rectangle in a XY graph.
Thanks,
Sébastien
03-14-2013 10:02 AM
Here's the simplest way I can think of to show how to rotate one point around another. Feed the center of your rectangle and the four corners into the code and you will get where the new corners should be.
03-15-2013 04:34 AM
Other things you have to keep in mind:
1) To show a rectangle (with Point 1= left top, Point 2= right top, Point 3= right bottom, Point 4= left bottom)
You have to Plot the whole rectangle around for an XY graph.
With this I mean (that when you're plotting point by point) you have to plot Point 1, Point 2, Point 3, Point 4 and again Point 1.
The last one is needed to close the rectangle.
2) To rotate the rectangle you have to define a "center point" of the non-rotated rectangle and you'll have to rotate around this.
When you have the "center point", then you can just use tst's code to rotate your 4 individual Points around that "center point".
03-15-2013 07:22 AM
Hi,
Thank you both of your for your answers.
I'm currently trying what you said.
Just to be sure, in tst's example, point 2 is the center like for my rectangle?
Thank you,
Sébastien
PS : I'll post later to confirm if yes or not I succeed to do it.
03-15-2013 07:48 AM
@Zepiii wrote:
Just to be sure, in tst's example, point 2 is the center like for my rectangle?
P2 rotates around P1, so P1 is the center and P2 would be the corner.
03-15-2013 09:51 AM - edited 03-15-2013 09:53 AM
Youhouw !
I've finally managed to do it.
However, I have a stupid question, but I'm blocked on this.
I was able to extract the diagonal with the tst's method, plot on a XY Graph which is PINK.
But I wanted the countour, so I extracted the XY and little bit earlier in the step of tst's method. I managed to do it and plot them in a XY graph which is BROWN.
However, the movement of flies is recorded and I'm ploting it a XY graph which is a PINK and I'm not able to melt my BROWN one (which are the countours and which is the part that interest me).
So how to melt a PINK XY Graph with a BROWN XY Graph?
Btw, I attached my VI. This might be useful for anyone else !
Can just check on the right side, the both XY graph are there and I really don't understand how to make them shown on the same one.
Maybe this make it more clear :
Thank you,
Regards,
Sébastien
@ThiCop : Thank you too, you also gave me precious help
03-15-2013 10:14 AM
I didn't look at the actual code, but generally brown clusters are made up of numeric values and pink ones are made of elements with variable sized (probably arrays in your case). You can see the exact data type of each wire if you hover over it with the context help window open.
It's important to understand which data types you have and what each one represents. Once you understand that, you will be able to merge them together meaningfully.
03-15-2013 10:46 AM
Hi,
Thank you for your answer.
To be honest, I'm quite lost in those cluster and array differences. I managed to change that "brown" to "pink" color with the For Loop that you used, but now the points XY graph aren't joined 😄 ?
I also screenshoted the help content from the brown wire.
I changed some settings, but it doesn't work. Any quick idea?
Thank you,
Sébastien