How can i create a function that returns the x and y coordinate of a circle with given center, radius an interval from 0 to 2*pi?
10 views (last 30 days)
Maadhav Akula on 6 May 2020
According to your comments I think you just want a particular point (x,y co-ordinates) on a circle. For that you should also pass the angle value too. You got the function almost right, I have modified it a little:
function [x,y] = getCircle(xm,ym,radius,t)
x = radius*cos(t)+xm;
y = radius*sin(t)+ym;
where t can lie between the interval [0,2*pi] in radians.
Hope this helps!