Finding coordinates around a circle when given an angle
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- SamPerson12345
- Prole
- Posts: 41
- Joined: Sat Aug 30, 2008 5:35 pm
Finding coordinates around a circle when given an angle
I need to be able to find coordinates around a circle for a game I'm making. All help is greatly appreciated.
Re: Finding coordinates around a circle when given an angle
The x,y coordinates of a point on the perimeter of a circle are given by:
The math library trig functions take angles expressed as radians, so be aware of conversion if that's not how you express your angles. Look up the math.rad() and math.deg() library functions in the Lua docs.
Code: Select all
x = radius * math.cos(angle);
y = radius * math.sin(angle);
Sarcasm - just one of the services I offer.
Who is online
Users browsing this forum: Ahrefs [Bot] and 11 guests