Example Code

Graphing Customizable Ellipse Example

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
Generates and graphs x and y data for an ellipse in which the horizontal axis, vertical axis, angle, and left and rightmost point are customizable.


Description
This VI outputs an ellipse to an XY Graph using the formula node and the equation for an ellipse. The values for a, the horizontal axis, b, the vertical axis, are controlled by the user. The user can also control the location of the left and right most points on the ellipse using x1 and x2 and can control the vertical offset using the y control. The angle of the ellipse is controlled after the formula node by applying a rotation formula to the x and y values. Y values are created for all quadrents of the XY Graph, put into an array, and then put into the XY Graph.


Requirements

Software:

  1. LabVIEW 2012

 

Steps to Implement or Execute Code

  1. Download the .zip file
  2. Set your desired configuration (a, x1, x2, degrees, etc)
  3. Run the VI

 

Additional Information or References
NI Snippet

1.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Brian H. -- Electronics & Measurements Product Marketing Manager

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.