# A circle in coordinate

Discussion in 'Homework Help' started by ecjohnny, Sep 12, 2011.

1. ### ecjohnny Thread Starter Senior Member

Jul 16, 2005
142
0

I need to write a program to get a user input coordinate then check if it falls within the circle. (note: along the circle is consider a circle.)

My initial though was to compare the coords value of the circle( eg. if 3<x<9 and compare x also then is fall is the square.) then i am left with the diagram on the right of the attach pic 4 little sides.
my solution might be wrong coz the method of solving worth 2 marks only which i assume would be easy. the rest of marks is programming.

Anyone has a better solution or help?

2. ### MrChips Moderator

Oct 2, 2009
12,452
3,371
Do you know how to calculate the distance of the point (x,y) from the origin (0,0)?
Do you know the equation of a circle f(x,y,r)?

3. ### djsfantasi AAC Fanatic!

Apr 11, 2010
2,815
835
You picture didn't show up. Try going to "Manage Attachments" to upload your picture. Is the circle center always at (0,0)? Do you know what polar coordinates are?

4. ### ecjohnny Thread Starter Senior Member

Jul 16, 2005
142
0
ok i'll upload a new pic soon. Anyway is is just finding if an entered coordinate is in a circle. and the circle is at the +x and +y (top right)

5. ### ecjohnny Thread Starter Senior Member

Jul 16, 2005
142
0
yes i know how to calculate the distance. x,y from origin.

But what does f(x,y,r) mean ?

6. ### steveb Senior Member

Jul 3, 2008
2,433
469
He just wants you to consider the equation of a circle. You could also say the equation of a circle looks like R^2=f(x,y) which means that the points on the circle are such that when you plug any x and y coordinate for these points into the function f(x,y) the answer is the radius R squared.

You can actually solve this without thinking about the distance formula, although the distance formula in built into the equation for a circle. Basically the points inside the circle will obey the relation R^2 ? f(x,y). Where the ? indicates a relational operator; greater than, less than, greater than or equal and less than or equal (>, <, >= or <=). Can you tell which one? So, all you need is the relational operator ?, and the f(x,y) for the circle of interest. The only other circle parameters, other than the radius, are x0 and y0, which indicate the point of the center of the circle.

7. ### ecjohnny Thread Starter Senior Member

Jul 16, 2005
142
0
Thanks guy i got it...
The text passage contains a discussion about a programming problem related to determining if a given coordinate falls within a circle. The discussion includes a question about the equation of a circle and a suggestion to use the distance formula.
no_question

the passage does not contain a direct mathematical question that requires a specific answer. it is more of a discussion and a request for help with a programming problem.
Given a text passage, determine:
    1. If it contains a mathematical question (including word problems or calculations)
    2. If an answer to that mathematical question is provided in the text

First, describe the content structure you found in 1-2 sentences.

Then provide your analysis in the following format:
TYPE: <one of the following values>
- NO_QUESTION
- SINGLE_QUESTION
- SINGLE_QUESTION_WITH_ANSWER
- MULTIPLE_QUESTIONS
- MULTIPLE_QUESTIONS_WITH_ANSWERS
system
# A circle in coordinate

Discussion in 'Homework Help' started by ecjohnny, Sep 12, 2011.

1. ### ecjohnny Thread Starter Senior Member

Jul 16, 2005
142
0

I need to write a program to get a user input coordinate then check if it falls within the circle. (note: along the circle is consider a circle.)

My initial though was to compare the coords value of the circle( eg. if 3<x<9 and compare x also then is fall is the square.) then i am left with the diagram on the right of the attach pic 4 little sides.
my solution might be wrong coz the method of solving worth 2 marks only which i assume would be easy. the rest of marks is programming.

Anyone has a better solution or help?

2. ### MrChips Moderator

Oct 2, 2009
12,452
3,371
Do you know how to calculate the distance of the point (x,y) from the origin (0,0)?
Do you know the equation of a circle f(x,y,r)?

3. ### djsfantasi AAC Fanatic!

Apr 11, 2010
2,815
835
You picture didn't show up. Try going to "Manage Attachments" to upload your picture. Is the circle center always at (0,0)? Do you know what polar coordinates are?

4. ### ecjohnny Thread Starter Senior Member

Jul 16, 2005
142
0
ok i'll upload a new pic soon. Anyway is is just finding if an entered coordinate is in a circle. and the circle is at the +x and +y (top right)

5. ### ecjohnny Thread Starter Senior Member

Jul 16, 2005
142
0
yes i know how to calculate the distance. x,y from origin.

But what does f(x,y,r) mean ?

6. ### steveb Senior Member

Jul 3, 2008
2,433
469
He just wants you to consider the equation of a circle. You could also say the equation of a circle looks like R^2=f(x,y) which means that the points on the circle are such that when you plug any x and y coordinate for these points into the function f(x,y) the answer is the radius R squared.

You can actually solve this without thinking about the distance formula, although the distance formula in built into the equation for a circle. Basically the points inside the circle will obey the relation R^2 ? f(x,y). Where the ? indicates a relational operator; greater than, less than, greater than or equal and less than or equal (>, <, >= or <=). Can you tell which one? So, all you need is the relational operator ?, and the f(x,y) for the circle of interest. The only other circle parameters, other than the radius, are x0 and y0, which indicate the point of the center of the circle.

7. ### ecjohnny Thread Starter Senior Member

Jul 16, 2005
142
0
Thanks guy i got it...
user
The text passage contains a discussion about a programming problem related to determining if a given coordinate falls within a circle. The discussion includes a question about the equation of a circle and a suggestion to use the distance formula.

TYPE: NO_QUESTION

The passage does not contain a direct mathematical question that requires a specific answer. It is more of a discussion and a request for help with a programming problem.