当前位置:网站首页>Matlab draws ellipse code according to any angle, sampling points (resolution), position and size
Matlab draws ellipse code according to any angle, sampling points (resolution), position and size
2022-06-10 19:29:00 【EMB night watching lights】
20 A little bit , Deflection 30 degree . Don't forget to like it .
1、 effect

2、 Code
function ellipse_point = get_ellipse(center_point, r_a_b, angle_in, point_num)
% Call example
% r_a = 20;% Long radius
% r_b = 10;% Short radius
% angle = 30; % Rotation Angle
% a = 20;% The abscissa of the center of the circle
% b = 10;% The ordinate of the center of the circle
% point_num = 20; % Sampling points
% point = get_ellipse([a b], [r_a, r_b],angle,20);
% figure(2)
% plot(point(:,1)',point(:,2)','-')
% axis equal
r_a = r_a_b(1);% Long radius
r_b = r_a_b(2);% Short radius
angle = deg2rad(angle_in);
a = center_point(1);% The abscissa of the center of the circle
b = center_point(2);% The ordinate of the center of the circle
theta = 0:2*pi/point_num:2*pi; % angle [0,2*pi]
x = a+r_a*cos(theta);
y = b+r_b*sin(theta);
R = [cos(angle) sin(angle) 0; -sin(angle) cos(angle) 0; 0 0 1]; % Rotation matrix
data_length = length(x);
for i=1 : data_length
temp = [x(i),y(i),1]*R;
x(i) = temp(1);
y(i) = temp(2);
end
ellipse_point = [x',y'];
end边栏推荐
- How to play the Dragon Boat Festival "immersive cloud Tour"? That is to say, it helps "live broadcast +" new scene landing
- WordPress 6.0 “Arturo阿图罗” 发布
- Openssl1.1.1 vs2013 compilation tutorial
- Design and implementation of online ordering system based on SSM Rar (project source code)
- SQL statement to view the basic table structure and constraint fields, primary codes and foreign codes in the table (simple and effective)
- My first work: tensorflow2 x
- Prospect of database firewall technology [final chapter]
- SAR回波信号基本模型与性质
- MySQL高级篇第一章(linux下安装MySQL)【上】
- Nodejs judge system type get host name execute console command Chinese garbled code
猜你喜欢

Morris traversal of binary tree

Array signal processing simulation part IV -- Z-transform analysis array polynomial

超级简单的课程设计ssm学生管理系统(含源码简单添加、删除、修改、查询操作)

ESP8266 系统环境搭建
![MySQL advanced Chapter 1 (installing MySQL under Linux) [i]](/img/f9/60998504e20561886b5f62eb642488.png)
MySQL advanced Chapter 1 (installing MySQL under Linux) [i]

数据库防火墙闪亮登场(好文共赏)

SAR image focusing quality evaluation plug-in

数据治理经典6大痛点?这本书教你解决

100003字,带你解密 双11、618电商大促场景下的系统架构体系

端午“沉浸式云旅游”怎么玩?即构助力“直播+”新场景落地
随机推荐
面试中经常问到的几个问题,快来看看能答对几道吧
Analysis of optical storage direct flexible power distribution system
端午“沉浸式云旅游”怎么玩?即构助力“直播+”新场景落地
Source code analysis and practical testing openfeign load balancing
领域驱动设计(六) - 架构设计浅谈
超级简单的课程设计ssm学生管理系统(含源码简单添加、删除、修改、查询操作)
Ruixin micro rk1126 platform platform porting libevent cross compiling libevent
mysql(17-课后练习题)
多通道信号数据压缩存储
2022.05.27(LC_647_回文子串)
【 Web 】 page d'accueil personnelle 】 Programme d'études 】 albums de photos 】 babillard d'information 】
2022.05.29(LC_6078_重排字符形成目标字符串)
Basic model and properties of SAR echo signal
Upgrade the playing method of snatching singing, integrate the climax clips of genuine music and real-time scoring ability~
SQL statement to view the basic table structure and constraint fields, primary codes and foreign codes in the table (simple and effective)
Vs solution to garbled Chinese characters read from txt files (super simple)
【C语言进阶】指针的进阶【中篇】
nodejs-基本架构分析-解析引擎目录-插件安装-核心模块
c(指针02)
Apicloud visual development - one click generation of professional source code