ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create a circle using only the radius and without using sine and cosine

DonRoonin_0-1749433166281.png

I have tried to complete this but I have no idea where I am going wrong, the weird thing is that after the number 50, I think, it creates a half circle but it starts at number 8 of the Y.

0 Kudos
Message 1 of 12
(620 Views)

I can't open your code unless you do a "save for previous" (2020 or below).

 

If complex data is allowed, all you probably needs is the following:

 

altenbach_0-1749437930981.png

 

Message 2 of 12
(600 Views)

or alternatively something like this, maybe:

circleSnip.png

circleFP.PNG

 

0 Kudos
Message 3 of 12
(589 Views)

I love you very much, I started to base myself on your code to make it in the form of a block diagram since I was asked to do it that way and not with code or something else that makes it much easier. I am already making progress, you have helped me a lot.

DonRoonin_0-1749441715445.png

but as you can see I'm still missing

0 Kudos
Message 4 of 12
(574 Views)

You still did not do a "save for previous", But try something like this...

 

altenbach_0-1749442595247.png

 

0 Kudos
Message 5 of 12
(566 Views)

@DonRoonin wrote:

 

but as you can see I'm still missing


Try this way:

circleSnip2.png

 

0 Kudos
Message 6 of 12
(561 Views)

where that orange/cafe array is located/created

DonRoonin_0-1749443939979.png

 

0 Kudos
Message 7 of 12
(550 Views)

It is an array of points where a point is a cluster of two DBLs, one for x and one for y.

 

 

0 Kudos
Message 8 of 12
(543 Views)

@DonRoonin wrote:

where that orange/cafe array is located/created

DonRoonin_0-1749443939979.png

 


Technically, you can avoid this if you compute the upper and lower halves of the circle in a single for loop, something like this:

Snip3.png

0 Kudos
Message 9 of 12
(520 Views)

I would even do a loop free solution.

 

altenbach_0-1749483101312.png

 

I still strongly prefer my first suggestion because the circle is guaranteed to close and the points are evenly distributed around the circumference.

Attached are both versions.

Message 10 of 12
(442 Views)