LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unique 3d rotation using the activeX 3d graph

I have a bit of what I think is a unique question.  I am trying to create a 3d view of an object that rotates on it's three axes.  Now I have been able to find some of the available examples to look at like Oleg Chutkos cube.llb example and others found on this message http://forums.ni.com/ni/board/message?board.id=170&message.id=22793&requireLogin=False.  These all seem to rotate the object around the three axes of the graph and not the object itself.  This is what I need.  I have a set of sensors that can measure angles of inclination from gravitational centre (earth) ... and I need a 3d object that will rotate (depending on what the sensors say) around the three axes of the object and not around the three axes of the graph.  If anyone knows if this has been done before, or how it could be accomplished please message me back.  Or if there is a better way, other than using the 3d graph vis.  Thanks in advance if anyone can help.
 
Greycat 
0 Kudos
Message 1 of 28
(5,522 Views)

To rotate about an object as opposed to a center of a graph requirea a simple "world translation transformation"  just translate all of your XYZ coordinated by the center or rotation (ie, center of the object.).  This can be done through subtracting  X' = X-Xcenter, Y' = Y-Ycenter and Z' = Z-Zcenter.

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 28
(5,493 Views)

I'm not quite sure what you mean.  Lets say I have a cube that has dimensions of 100x100x100 units.  The centre point of the cube would be 50,50,50 (X,Y,Z) (providing one of the corner points was at 0,0,0)  so now I want to rotate the cube 20 degrees on the cubes X plane.  How would I apply the 'world translation transformation'?  Is there perhaps an example you could direct me to so I might better understand the concept?  Thanks

Greycat

0 Kudos
Message 3 of 28
(5,488 Views)

thanks unclebump:

It is beginning to come into perspective ... I'll post more if (when) I have more questions ... I knew there must have been some *relatively* simple trig that could do this for me ... guess I skippped that class 😉 ...Thanks again.

 

Greycat

0 Kudos
Message 5 of 28
(5,472 Views)

If you don't mind it not being the activeX 3d graph, you can make a rotating 3-D cube with the picture control and this toolkit.  It is some tools for making 3-D objects with the picture control tool.  One of the examples is called animate object and it rotates a torus.  Simply replace the build toroid with a build box and it should be good to go.

Hope that this helps,

Bob Young

0 Kudos
Message 6 of 28
(5,471 Views)

Thanks to you too Bob Y. ... I'll check that out

Greycat

0 Kudos
Message 7 of 28
(5,472 Views)

Ok ... this is as far as I've gotten for now.  Can anyone tell me if I'm goin in the right direction?  And perhaps what my next steps are (I'm assuming I'll have to apply some sort of matix to this)  The x rotation works eveytime, but y and z don't seem to work properly.  I'm goin to continue researching and seein what I can come up with.  Any help would be appreciated.  Thanks again. 

Greycat

 

0 Kudos
Message 8 of 28
(5,463 Views)

The attached images were captured when running "Simple 3D Object6.vi" found in the attaced llb.

This require the LV 3-d picture toolkit.

If you develop anything using these examples, please share a demo of your end results.

 

Ben

Message Edited by Ben on 09-17-2005 03:22 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 28
(5,468 Views)
Hi Ben:
 
   I've looked at what you submitted and I'm having a hard time figuring this out.  Here a quick question for you if you have time to explain this to me.  Afer looking at the 3D picture control software from NI, i figured out that thier simple rotations and whatnot are doin exactly what I was able to acomplish using the 3D graph control (working on the x axis but for y and z seems to want to rotate on the graph/picture axis instead of the axis of the object).  How would I apply what you have done to simply create an axis on a central object (cube, rectagle, cone, whatever) so that the object would rotate on those axes?  Thanks in advance for you help.
 
Greycat
 
 

Message Edited by Greycat on 09-19-2005 10:32 AM

0 Kudos
Message 10 of 28
(5,337 Views)