几何学
来源:互联网 发布:vscode支持xp吗 编辑:程序博客网 时间:2024/04/30 04:34
1、余弦定理
如下图所示,在△ABC中,余弦定理可表示为:
余弦定理的三个证明
转自:http://www.matrix67.com/blog/archives/2324
证明1:
证明2:
证明三
2、正弦定理
在任意△ABC中,角A、B、C所对的边长分别为a、b、c,三角形外接圆的半径为R
则有
公式变形
△ABC中,若角A,B,C所对的边为a,b,c,三角形外接圆半径为R,直径为D,正弦定理进行变形有
三角形面积公式:
外接圆半径公式:
定理证明
前三项的证明
利用三角形的高证明
故有
当△ABC是钝角三角形时,过点 C 做 AB 边上的高,交 AB 的延长线于点 D,CD = a * sin∠CBD = a * sin∠ABC ,CD = b * sinA
由此,得,同理可得
故有
外接圆证明正弦定理
在△ABC中,已知 BC = a,AC = b,AB = c,做三角形 ABC 的外接圆,O 为圆心
连接 BO并延长交圆于 B' ,BB' = 2 * R
根据直径所对的的圆周角是直角以及同弧所对的圆周角相等可以得到 ∠BAB' = 90°,∠C = ∠B',
所以,
同理可得
所以
HDU 1374 The Circumference of the Circle
题意:
给出三角形三个顶点的坐标,求外接圆的周长
解题思路:
p = (a + b + c) / 2.0
S = sqrt(p * (p - a) * (p - b) * (p - c))
外接圆直径 D = (a * b * c) / (2.0 * S)
周长 = PI * D
#include <iostream>#include <cstdio>#include <cstring>#include <cstdlib>#include <algorithm>#include <queue>#include <vector>#include <stack>#include <map>#include <cmath>using namespace std;typedef long long ll;typedef unsigned long long ull;typedef unsigned int uint;const int mod = 1e9 + 7;const int INF = 0x7fffffff;const double PI = 3.141592653589793;double dis(double x1, double y1, double x2, double y2);int main(){#ifdef __AiR_H freopen("in.txt", "r", stdin);#endif // __AiR_H double x1, y1, x2, y2, x3, y3; while (scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3) != EOF) { double a = dis(x2, y2, x3, y3), b = dis(x1, y1, x3, y3), c = dis(x1, y1, x2, y2); double p = (a + b + c) / 2.0; double S = sqrt(p * (p - a) * (p - b) * (p - c)); double D = (a * b * c) / (2.0 * S); double ans = D * PI; printf("%.2f\n", ans); } return 0;}double dis(double x1, double y1, double x2, double y2){ return (sqrt((x2-x1) * (x2-x1) + (y2-y1) * (y2-y1)));}
CodeForces_1C Ancient Berland Circus
参考:http://blog.csdn.net/aholic/article/details/21733777
题意:
给出正多边形上的三个点的坐标,,求这个正多边形的最小的面积
解题思路:
由于是确定是正多边形,所以一定存在外接圆
所以可以分为如下几步:
海伦公式求面积:
p = (a+b+c) / 2.0
S = sqrt(p * (p - a) * (p - b) * (p - c))
2.由余弦定理求出三个圆心角
(要注意的是,有可能有三个点在同一段半圆弧上,这是第三个圆心角应该用2π - ang1 - ang2, 所以干脆全部都是 ang3 = 2π - ang1 - ang2)
3.求这三个角的最大公约数为 gcd, 那么这就是一个 n = 2π / gcd 的正 n 边形
4.一个小三角形的面积S = 1/2·r * r * sin(gcd)
5.nS即为所求
#include <iostream>#include <cstdio>#include <cstring>#include <cstdlib>#include <algorithm>#include <queue>#include <vector>#include <stack>#include <map>#include <cmath>#include <cctype>using namespace std;#define PI acos(-1.0)typedef long long ll;typedef unsigned long long ull;typedef unsigned int uint;const double eps = 1e-2;const int mod = 1e9 + 7;const int INF = 0x7fffffff;double dis(double x1, double y1, double x2, double y2);double fgcd(double a, double b);int main(){#ifdef __AiR_H freopen("in.txt", "r", stdin);#endif // __AiR_H double a_x, a_y, b_x, b_y, c_x, c_y; scanf("%lf%lf%lf%lf%lf%lf", &a_x, &a_y, &b_x, &b_y, &c_x, &c_y); double a = dis(b_x, b_y, c_x, c_y), b = dis(a_x, a_y, c_x, c_y), c = dis(a_x, a_y, b_x, b_y); double p = (a + b + c) / 2.0; double S = sqrt(p * (p-a) * (p-b) * (p-c)); double r = a * b * c / (4.0 * S); double Angle_a , Angle_b, Angle_c; Angle_a = acos(1.0 - a*a / (2.0 * r * r)); Angle_b = acos(1.0 - b*b / (2.0 * r * r)); Angle_c = 2.0 * PI - Angle_a - Angle_b; double Angle_gcd = 0; Angle_gcd = fgcd(0, Angle_a); Angle_gcd = fgcd(Angle_gcd, Angle_b); Angle_gcd = fgcd(Angle_gcd, Angle_c); printf("%.6f\n", r * r * sin(Angle_gcd) * PI / Angle_gcd); return 0;}double dis(double x1, double y1, double x2, double y2){ return sqrt((x2 - x1) * (x2 - x1) + (y2- y1) * (y2 -y1));}double fgcd(double a, double b){ if (fabs(a) < eps) { return b; } if (fabs(b) < eps) { return a; } return fgcd(b, fmod(a, b));}
三、
内心:内角平分线的交点
旁心:外角平分线的交点
外心:垂直平分线的交点
垂心:高的交点
重心:各边中线的交点
- 几何学
- 几何学
- 几何学悖论
- 计算几何学
- 计算几何学
- 电梯几何学
- 计算几何学
- 计算几何学函数
- 计算几何学库函数
- 三维坐标系与几何学
- 几何学小算法
- 分形几何学
- 这个世界上有三种几何学
- 仿射几何学
- 什么是分形几何学
- 计算几何学概述
- 一些几何学的东西
- 计算几何学(Computational Geometry)
- JSP九大内置对象的作用和用法总结?
- 软件技术简要说明
- 【bzoj2753】[SCOI2012]滑雪与时间胶囊 最小生成树
- gradle
- Android App安装成系统应用
- 几何学
- 你应当如何学习C++(以及编程)
- <Sicily>Threecolor problem
- android.support.design.widget.TabLayout
- 坚持,坚持每天学习,短时间的快速学习
- Python中Dict与Set对比总结
- 为什么要少用Iframe
- IOS swift 自定义Tableview cell
- python Decorator模式