Jump to content
  • Advertisement
Sign in to follow this  
johnnyBravo

Finding area of semi circle with simpson's rule?

This topic is 4235 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've got a question where I have to find the area of a semi circle with the centre (2,0), radius 2 by using the Simpson's rule with 4 sub intervals. The problem is i'm having a hard time understanding how to use the simpsons rule. Would someone beable to explain it? thx

Share this post


Link to post
Share on other sites
Advertisement
Check out http://hepwww.ph.qmw.ac.uk/mcps/numint.html?desc=Numerical+Integration+techniques&file=numint.html

They have a pretty good explanation of how the simpson's rule is used.

Share this post


Link to post
Share on other sites
This may sound like a stupid question, but if the object is a semi-cirlce and the radius is known to be 2, then (apart from philosophical reasons) why bother with Simpson's rule at all?
What's wrong with: float A = 2.0f*2.0f*3.1415f;

Share this post


Link to post
Share on other sites
Quote:
Original post by Damon Shamkite
This may sound like a stupid question, but if the object is a semi-cirlce and the radius is known to be 2, then (apart from philosophical reasons) why bother with Simpson's rule at all?
What's wrong with: float A = 2.0f*2.0f*3.1415f;


Because thats the area of a circle?

wouldnt float A = 2.0f*3.1415f; be the radius (or (pi*r*r)/2 )

Share this post


Link to post
Share on other sites
Quote:
Original post by Damon Shamkite
This may sound like a stupid question, but if the object is a semi-cirlce and the radius is known to be 2, then (apart from philosophical reasons) why bother with Simpson's rule at all?
What's wrong with: float A = 2.0f*2.0f*3.1415f;


If you want to implement Simpson's rule, how would you test that you are getting reasonable results? I would try to measure the area of some figure for which there is an explicit formula, so I have something to compare my resuts to. Of course, you need to get the formula right. :)

Share this post


Link to post
Share on other sites
Quote:
Original post by Damon Shamkite
What's wrong with: float A = 2.0f*2.0f*3.1415f;


This is based on the maths equation A = pi * r^2. But remember that this would work out the area for the entire circle. For example:

Finding the area of a circle with radius of 5cm would mean that using the formula the following answer would be reached:

A = pi * r^2
= pi * 5 x 5
= pi * 25
= 79 cm^2

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

This will work out the area for the entire circle. For the area of half of the circe, just half the area.

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

In the most evil scenario of circles, you may have to work out only a sector of a circle. The area for that equation is as follows:

A = (angle of sector / 360) * (pi * r^2)

So that for a 45 degree slice of the circle above would give the answer:

A = (angle of sector / 360) * (pi * r^2)
= (45 / 360) * (pi * 5^2)
= 0.125 * (pi * 25)
= 9.8175 cm^2

This can be proved to be correct as 9.8175 * 8 (for the whole circle) is 79 cm^2

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

I hope this answers your question. If I have made an error, or have any questions just ask! [smile]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!