Extracting Viewing Angle Information from a 3D Graph in LabVIEW

Updated Sep 18, 2018

Reported In

Software

  • LabVIEW

Issue Details

I have a 3D object that I am viewing with 3D Surface Graph and I want to calculate the angle at which I am viewing the object.  When I move the object around with the mouse, I want to be able to calculate the new viewing angle.  How would I extract this information from the 3D Surface Graph VI?

Solution

By clicking a 3D object and dragging, you can change the vantage point at which you see the object.  From Graph A shown below to Graph B, the angle at which the user is viewing the 3D object changes.

Graph A


Graph B


To qualitatively view the vantage point you have of the object, you can utilize the Longitude and Latitude values stored within the graph.  To access these values, you will need to use a Property Node.
  1. Right click on the 3D Surface on the block diagram.
  2. Using the Menus, Go to Create >> Property Node >> Graph >> User Defined View >> Latitude
  3. Select the small blue box in the middle of the bottom edge of the newly created Node and drag down to create a new box.
  4. Right Click the new box and go to Select Property >> Graph >> User Defined View >> Longitude
You should have a property node that looks like this:

By wiring the output of the property nodes to an indicator, you can now view the latitude and longitude values of your viewing angle relating to how you rotated the object.

Additional Information

The Latitude and Longitude values correspond to a spherical grid system allowing you to track where you are in three dimensional space.

WAS THIS ARTICLE HELPFUL?

Not Helpful