From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-19-2005 10:26 AM
09-19-2005 10:39 AM
Take a look and the version 5 of that llb.
It plots a 3-d line in space. This may help you visualize what is happening.
The tricky part (for me) was figuring out an axis about which to rotate the object to get it pointed the way I wanted.
Somewhere in the code I sent is the VI that does that. In my *5 version I am trying to trace a spiral in space. So I had a two pints in space I needed to connect. Those two points drive my logic on finding the correct axis.
Gotta run!
Ben
09-19-2005 03:43 PM
Create transform is the VI that does the roatation.
Start by looking at the VI's that create the axis. The axis are just long thin cyliners with a cone at the end. To create the XYZ axis I rotate the cylinders and cones about an axis.
After some experimenting, I found that I get an object to point in a specific direction by findining a vector that bisects the angle between straight up and the direction I want to point. Then I rotate the object 180 about that bisecting vector.
10-05-2005 06:40 AM
Hi Everyone:
It has been a couple of weeks since the last post to this thread so I thought I would give everyone an update. I did figure out how to do this 3D rotation mathematically and it was not all that hard after all. I am still using the 3D graph indicator. Then given the amount of rotation on each of the 3 axes the final position is calculated using a 3D rotation matrix. Here are a couple of other documents out there in cyberspace that helped me understand what I needed to do.
www.cprogramming.com/tutorial/3d/rotation.html
If anyone is looking for more information about how I did it (example code and whatnot), then post to this thread and I'll respond as soon as I can.
Greycat
Special thanks to unclebump for setting me on the right path to the information I needed ... Thanks
10-05-2005 02:23 PM
10-06-2005 06:20 AM
10-11-2005 01:17 PM
10-11-2005 01:20 PM
10-11-2005 01:41 PM
Thank you Greycat!
And...
Congratulations on your promotion to "Proven Member" !
IBen
10-11-2005 04:31 PM
Very nice, Greycat!
Always remember that you don't need to duplicate code 3x on the diagram, you can always use autoindexing and do all steps in the same loop. For demonstration, I modified your example to fit one screen (LabVIEW 7.1). Note that also most of the array operation seem easier if you start out with a transposed version of your data.
You also don't need any of the local variables.
I added an event structure so things only get recalculated whenever an angle is changed. Your version continuously does the same calculation over and over for no good reason. (Add an indicator to the iteration terminal of the big while loop to see ;))
Enjoy!