Solver To calculate surface area of a torus
Algebra
->
Surface-area
-> Solver To calculate surface area of a torus
Log On
Geometry: Area and Surface Area
Geometry
Solvers
Solvers
Lessons
Lessons
Answers archive
Answers
Source code of 'To calculate surface area of a torus'
This Solver (To calculate surface area of a torus)
was created by by
chillaks(0)
:
View Source
,
Show
,
Put on YOUR site
About chillaks
:
am a freelancer
==section input For a Torus Inner radius *[input r=5] and Outer radius *[input R=6] are given.The surface area of is. ==section solution perl if($r<=0 || $R<=0) { print " Please enter the value of radius greater than 0 to calculate surface area of Torus"; } else{ my $area=($R+$r)*($R-$r)*3.14159265*3.14159265; my $b=($R-$r)/2; my $a=($R+$r)/2; print " <A HREF=Geometry-Surface-Area-and-Volume.lesson> Geometry Surface Area and Volume of 3 Dimensional Figures</A> Torus is of a doughnut shape. The Formula for Surface area of Torus when inner and outer radius are given is {{{Area=pi^2(Outer Radius-Inner Radius)*(Outer Radius+Inner Radius)}}} {{{Area=pi^2*($R+$r)*($R-$r)=$area}}} If the b is the radius of tube and a is the distance from the center of the tube to the center of the torus then, {{{Area=4pi^2ab}}} where {{{b=(Outer Radius-Inner Radius)/2}}} {{{b=($R-$r)/2=$b}}} and {{{a=(Outer Radius+Inner Radius)/2}}} {{{a=($R+$r)/2=$a)}}} Hence {{{Area=4*pi^2*$a*$b=$area}}} also, {{{Outer Radius=a+b}}} {{{Outer Radius=$a+$b=$R}}} {{{Inner Radius=a-b}}} {{{Inner Radius=$a-$b=$r}}} Hence, The Surface Area of Torus of Inner radius $r and Outer radius $R is $area. For more on this topic, See the lessons on <A HREF=http://www.algebra.com/algebra/homework/Surface-area/Lessons.html>Geometry: Area and Surface Area</A> Some more is on <A HREF=http://www.algebra.com/algebra/homework/Surface-area/Surface-Area-and-Volume.lesson> Surface Area and Volume</A> and <A HREF=http://www.algebra.com/algebra/homework/Surface-area/Perimeter-and-Area.lesson> Perimeter and Area</A>. "; } ==section output area, ==section check R=5 r=2 area=207.261692