LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Circle Plot

Solved!
Go to solution

Hi all,

I am trying to make a quite simple program, where I want to plot a simple circle, using parametric equations.

The equations I am using are:

X=Xc + Ro cos (theta)
Y=Yc + Ro sin (theta)

where Xc and Yc are the centre points of the circle and Ro its radius.

I need to use a tool like "Simulate Signal" or something like this to generate the signal that will plot the graph (or not)?

If so, this signal will be my theta variable, which I need to constraint it, between 0 and 2 (PI). Is it possible?


Thanks,

 

FGoulao

0 Kudos
Message 1 of 17
(7,666 Views)

I think you can just calculate theta on your own. Here's a possible solution 😉

CLAMaxime -- Kudos are a great way to say thank you
0 Kudos
Message 2 of 17
(7,653 Views)
Solution
Accepted by fgoulao

Hi F,

 

simple like this:

check.png

Or even more simple:

check2.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 17
(7,647 Views)
Solution
Accepted by fgoulao

GerdW wrote:

Or even more simple:


Yup, that's what I normally do. 😄

 

 

Message 4 of 17
(7,626 Views)

Those solutions are very elegant if you are familiar with complex numbers, however they add confusion for those not.

 

The alternative is just to bundle the x,y values from the sine and cosine functions into the (non-complex) form compatible with an x-y graph input.

0 Kudos
Message 5 of 17
(7,613 Views)

Hi Christian,

 

I'm glad I got this right before you could engage in this thread Smiley LOL

 

@Toecutter:

Atleast for me complex numbers were taught in school (9th or 10th grade), with exactly that example: how to display sine/cosine values in the complex number plane…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 17
(7,611 Views)

@ToeCutter wrote:

Those solutions are very elegant if you are familiar with complex numbers, however they add confusion for those not.

 

The alternative is just to bundle the x,y values from the sine and cosine functions into the (non-complex) form compatible with an x-y graph input.


Learning complex numbers might actually  be easier than learning two different trigonometric functions as well as cluster bundle operations. 😄

 

(... as long as we stick to the basic things as described in this thread.

It gets a bit more complicated if we e.g. multiply a complex number with a complex number of (1,theta), which corresponds to a rotation in the complex plane. Multiplying by a complex number of (scale,theta) does a scaling and rotation in one step. Very useful. :D).

0 Kudos
Message 7 of 17
(7,577 Views)

 


@ML927 wrote:

I think you can just calculate theta on your own. Here's a possible solution 😉


I have an older version of LabVIEW (2012) and I cannot open your solution.

Are you able to send me a solution under LV 12?

0 Kudos
Message 8 of 17
(7,524 Views)

Hi f,

 

we are talking about just 3 functions in our examples.

Aren't you able to find them?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 17
(7,518 Views)

Yup, GerdW and Altenbach's solutions are much more easier to apply than mine 😉

CLAMaxime -- Kudos are a great way to say thank you
0 Kudos
Message 10 of 17
(7,513 Views)