Ok,
Thanx for all the advice but I think only MrWizard got what I was trying to ask - for any standard shapes I will be using a graphics library like OpenGl or DX but this is more about formulas/algorithim's to produce the shapes.
I'm working in GAME SCRIPT and don't have the luxury of standard function calls to produce my affects.
I was thinking that I will have to create a circle using the formula
x = r * cos( theta )
y = r * sin( theta )
, check the 2nd link in my first post to understand this formula.
Using the above formula I will have to create a loop and calculate at least 360times to get the 360 degree values to produce a 2D(x,y) circle -- im not really after a 3D sphere shape.
I wanna know if there is a better formula or just better way to work the above formula so I don't have to run through 360 loop cycles or even more to get 2D pts around my target to create a circular pattern?? For instance I know that there are quadrants I can work in when using degrees like 0-90, can I just run through the sin/cos calcs for 0-90 and somehow adjust the gotten values to and apply them to the next quadrant or is it just as fast to calculate 360 sin/cos values??
Code:
//Psuedo-code as im not working in C++
targetPosition = <2341,3642,0> //3D Vector <x,y,z>
/*I need to find points at every angle at 300meters from my
*target's position - the target's position will be the center of the
*circle and 300 meters is the radius
*Formula r*cos(theta) - r stands for radius
*/
//I only need the 2D coords
A = 0; //This is the angle - 0 - 360
r = 300; //This is the radius
targetXPos= 2341; //Targets X position
targetYPos= 3642; //Targets Y position
#LOOP
//In this loop we will calculate 360 times to get 360 points around our target
for(A; A<=360;A++){
x = cos(A) * r;
y = sin(A) * r;
newXPos= targetXPos + x;
newYPos= targetYPos + y;
}