Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

**safra****Member**- Registered: 2005-12-03
- Posts: 41

Hi,

I have been looking for circle formula's but cannot find what I need. What I need is a formula that returns the x,y position of a point on a circle with a given center point and diameter or radius based on a start point on the circle and a number of steps. For example if steps is set at 10. And you check the position at step 5, it should return the point opposite of the starting point. Someone knows if this can be put in a formula?

Thanks,

raoul

Offline

**ben****Member**- Registered: 2006-07-12
- Posts: 106

Look at this excellent intro for starters: http://www.mathsisfun.com/forum/viewtopic.php?id=4041

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

I understand everything up to the "steps" part. What do you mean by a step?

"In the real world, this would be a problem. But in mathematics, we can just define a place where this problem doesn't exist. So we'll go ahead and do that now..."

Offline

**safra****Member**- Registered: 2005-12-03
- Posts: 41

Thanks Ben, I didn't think of using sin and cos. But I think this is what I need although I would like to stay away from it or use a look up table (for programming speed).

Ricky, perhaps you now understand what I mean with steps? What I like to do is move a camera around a point in a circle in x steps. So at each given step I need to find the new camera position.

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

Ah, so a step is a fraction of an angle. Got it.

What language are you doing it in? Most current languages take advantage of trig functions which are actually on the hardware level, and so calling the trig functions provided by the programming library (provided there is one), can actually be faster than a lookup table. Sin and cos can actually be extremely fast, again, depending on what language/machine.

So do you need more help with a formula?

"In the real world, this would be a problem. But in mathematics, we can just define a place where this problem doesn't exist. So we'll go ahead and do that now..."

Offline

**safra****Member**- Registered: 2005-12-03
- Posts: 41

I am using pascal (delphi). I read many things about sin and cos. Some saying it is expensive while others did tests and found that it was indeed faster or at least something similar as using a lookup table. I think I should test this myself as I am already using quite a lot of sin and cos in my program.

Well if indeed this is what I should use then I should be able to get it working, thanks again!

Offline

**Ricky****Moderator**- Registered: 2005-12-04
- Posts: 3,791

If you need help writing a hash table for testing, let me know.

When I did it in C++ (MS compiler), it was much faster using the library functions.

"In the real world, this would be a problem. But in mathematics, we can just define a place where this problem doesn't exist. So we'll go ahead and do that now..."

Offline

**safra****Member**- Registered: 2005-12-03
- Posts: 41

Thanks for offering your help! I did a search and found some good information that should get me going with this. If not then I will let you know.

Offline

**blessy****Member**- Registered: 2008-07-22
- Posts: 1

I am a new visitor of this forum. It is very nice site. Wit the help of this site we should get any answer of mathematically related question or game. So this is very useful to everyone. Mathematics has its functions for the manipulation of anything such as find area of a circle, volume of a cube etc. These functions are formed a group named as math functions. They are very useful in computer languages such as c, c++ etc.

=========================================

Bless

Offline

Pages: **1**