坐标变换
来源:互联网 发布:淘宝内部优惠券口令 编辑:程序博客网 时间:2024/06/10 08:46
根据线性代数32页:编写的,任意1点坐标绕某一点坐标逆时针旋转degree度,可用公式:
{x=x1*cos(degree)-y1*sin(degree);
}y=x1*sin(degree)+y1*sin(degree);
很方便;
#include<math.h>#include<stdio.h>#define pi 2*acos(0)int main(){int i,j,k,m,n;double x,y,x1,y1,degree,x2,y2,r;while(scanf("%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,°ree)!=EOF){//printf("%lf",pi);x=x2-x1;y=y2-y1;x2=x*cos((degree/180.0)*pi)-y*sin(degree/180*pi);//printf("%lf %lf",cos((degree/180.0)*pi),sin(degree/180*pi));//printf("%.5lf\n",cos(degree/180*pi));y2=x*sin(degree/180*pi)+y*cos(degree/180*pi);printf("%.1lf %.1lf\n",x2+x1,y2+y1);}return 0;}
- 坐标变换
- 坐标变换
- 坐标变换
- 坐标变换
- 坐标变换
- 坐标变换
- 坐标变换
- 坐标变换
- 坐标变换
- 坐标变换
- 基变换与坐标变换
- 坐标变换 及矩阵变换
- 基变换与坐标变换
- OpenGL坐标变换详解
- OpenGL坐标变换详解
- openGL坐标变换
- 第五讲 坐标变换
- 坐标变换的实现
- C#实现并口输出输入高低电位
- 线程 Thread Runnable Join
- javascript鼠标点入input内value值隐藏事件
- Android实现异步加载图片 ListView
- 现代数字影视 电影使用标准
- 坐标变换
- java,hibernate和sql server对应的数据类型
- win 2008R2 下SqlServer 2005 修改密码报错解决方法
- JavaScript File API 文件上传
- java字节流对汉字输出为乱码的问题
- Tips-C#
- 用 Eclipse 平台进行 C/C++ 开发
- 基于linux 守护进程的分析与实现
- 常见实用的C#语句汇总(不断整理中)