首页 > 其他分享 >100009 求扇形周长面积已知半径和度数

100009 求扇形周长面积已知半径和度数

时间:2022-11-19 23:26:27浏览次数:52  
标签:度数 20 周长 3.14159 扇形 100009 360 0.347

<?php
header('Content-Type: text/html; charset=utf-8');
define ('ROOT', $_SERVER['DOCUMENT_ROOT']);
include ROOT.'/assets/php/head.php';

$tit= '求扇形周长面积已知半径和度数';
//半径20,度数125
$val='20 125';
$img='';


//调动方法
mill($val,$img,$tit);

/**
 * mill 是磨粉机的方法
 * $val 传值过来计算,以空格分割成数值
 * $img 自定义图片名,默认以文件名为图片名
 * */
function mill($val,$img,$tit){
    //初始化
    include ROOT.'/assets/php/init.php';
    imgt($img,$tit);
    //设置所有bc数学函数的默认小数点保留位数 
    bcscale (3);
    
    //以空格分割成数值
    $vals = explode(' ',$val);
    $r = evev($vals[0]);
    $o = evev($vals[1]);

    //已知条件
    $know = array();
    array_push($know, $val);
    $v0 = eveq($vals[0]);
    array_push($know, "半径:$v0");
    $v1 = eveq($vals[1]);
    array_push($know, "度数:$v1");

    //计算步骤
    $step = array();
    $pi = round(pi(),5);
    array_push($step, "扇形的周长:");
    array_push($step, "{$math['eqs']} $pi{$math['mul']}2{$math['mul']}$r{$math['mul']}{$math['lpar']}$o{$math['o']}{$math['div']}360{$math['o']}{$math['rpar']}{$math['add']}2{$math['mul']}$r");
    $o360 = bcdiv($o, 360);
    array_push($step, "{$math['eqs']} $pi{$math['mul']}2{$math['mul']}$r{$math['mul']}$o360{$math['add']}2{$math['mul']}$r");
    $r2 = bcmul(2,$r);
    array_push($step, "{$math['eqs']} $pi{$math['mul']}$r2{$math['mul']}$o360{$math['add']}2{$math['mul']}$r");
    $pir2 = bcmul($pi,$r2);
    array_push($step, "{$math['eqs']} $pir2{$math['mul']}$o360{$math['add']}2{$math['mul']}$r");
    $pir2o360 = bcmul($pir2,$o360);
    array_push($step, "{$math['eqs']} $pir2o360{$math['add']}$r2");
    $C = bcadd($pir2o360,$r2);
    array_push($step, "{$math['eqs']} $C");

    array_push($step, "扇形的面积:");
    array_push($step, "{$math['eqs']} $pi{$math['mul']}$r{$math['sup2']}{$math['mul']}{$math['lpar']}$o{$math['o']}{$math['div']}360{$math['o']}{$math['rpar']}");
    $rr = bcmul($r,$r);
    $o360 = bcdiv($o, 360);
    array_push($step, "{$math['eqs']} $pi{$math['mul']}$rr{$math['mul']}$o360");
    $pirr = bcmul($pi,$rr);
    array_push($step, "{$math['eqs']} $pirr{$math['mul']}$o360");
    $S = bcmul($pirr,$o360);
    array_push($step, "{$math['eqs']} $S");

    //算出结果
    $ends = array();
    array_push($ends, "扇形的周长:$C");
    array_push($ends, "扇形的面积:$S");

    //公式表示
    $from = array();
    array_push($from, "扇形的周长:C{$math['eq']}2{$math['pi']}r{$math['mul']}{$math['lpar']}n{$math['o']}{$math['sol']}360{$math['o']}{$math['rpar']}{$math['add']}2r");
    array_push($from, "扇形的面积:S{$math['eq']}{$math['pi']}r{$math['sup2']}{$math['mul']}{$math['lpar']}n{$math['o']}{$math['sol']}360{$math['o']}{$math['rpar']}");

    //公式说明
    $info = array();
    array_push($info, "扇形的周长 {$math['eq']} 圆周率 {$math['mul']} 2 {$math['mul']} 半径 {$math['mul']}{$math['lpar']}n{$math['o']}{$math['sol']}360{$math['o']}{$math['rpar']}{$math['add']}2 {$math['mul']} 半径。");
    array_push($info, "扇形的面积 {$math['eq']} 圆周率 {$math['mul']} 半径的平方 {$math['mul']}{$math['lpar']}n{$math['o']}{$math['sol']}360{$math['o']}{$math['rpar']}。");

    know($know);
    ends($ends);
    from($from);
    step($step);
    info($info);
}
?>
<?php include ROOT.'/assets/php/foot.php'; ?>

结果:

☁参考上图[2022-11-19]

☀求扇形周长面积已知半径和度数
20 125
半径:20
度数:125

♠算出结果
扇形的周长:83.605
扇形的面积:436.052

♦公式表示
扇形的周长:C=2πr×(n°/360°)+2r
扇形的面积:S=πr²×(n°/360°)

♣计算步骤
扇形的周长:
≈ 3.14159×2×20×(125°÷360°)+2×20
≈ 3.14159×2×20×0.347+2×20
≈ 3.14159×40.000×0.347+2×20
≈ 125.663×0.347+2×20
≈ 43.605+40.000
≈ 83.605
扇形的面积:
≈ 3.14159×20²×(125°÷360°)
≈ 3.14159×400.000×0.347
≈ 1256.636×0.347
≈ 436.052

♥公式解释
扇形的周长 = 圆周率 × 2 × 半径 ×(n°/360°)+2 × 半径。
扇形的面积 = 圆周率 × 半径的平方 ×(n°/360°)。

标签:度数,20,周长,3.14159,扇形,100009,360,0.347
From: https://www.cnblogs.com/onestopweb/p/16907499.html

相关文章