01-14-2009 07:01 AM
Solved! Go to Solution.
01-15-2009 11:45 AM
Hi,
What sort of updates would the user be making to the "vertex"?
01-15-2009 11:59 AM
I'm not sure about a small red cross,
but I would try something with cursors.
Let me see if I can come up with something, I'll get back to you.
01-15-2009 12:41 PM
Heres the idea I had in mind (attached):
When the mouse is clicked on the graph, capture position, and (using invoke node) change that to (x,y).
Seperately, use peak finder to output an array of maxiums.
Find the difference in (x,y) values between each peak and the mouse click. This should output an array.
Find the minimum distance, using array max/min finder.
Use this outputted index to go back to the original array outputted by the peaks, and find out which peak that was.
Automatically move the peak there.
I know I've been rambling, so you can look at the example I attached if you dont understand.
*Note - you will need to do a little math to find the ACTUAL distance (pythagorean's theorem)
at the moment, I just found distance to nearest X, then to nearest Y
This is not the proper way to do it. Just add a little more code to what I gave you to implement pythagoreans theorem.
01-15-2009 12:51 PM
@cory K wrote:Note - you will need to do a little math to find the ACTUAL distance (pythagorean's theorem)at the moment, I just found distance to nearest X, then to nearest Y
This is not the proper way to do it. Just add a little more code to what I gave you to implement pythagoreans theorem.
Here you go. I fixed what I was talking about above.
01-15-2009 12:58 PM
An example using an event structure must have a loop. Otherwise it will not work properly. The "Run Continuously" toolbar button is not an acceptable substitute.
For (1) and (2) the simplest solution is, as already suggested, a cursor. I also would like a better explanation of what is meant with (3).
01-15-2009 01:42 PM
smercurio_fc wrote:An example using an event structure must have a loop. Otherwise it will not work properly.
I know. I was showing him how to implement the idea I had. That wasnt supposed to be copy&paste code.
01-19-2009 06:18 AM
01-19-2009 06:20 AM
Thanks a lot Cory K! I am impatiently waiting for your solution to my predicament.
Have a very pleasant day!
01-19-2009 06:31 AM