如何使用C ++进行连续极坐标和径向极坐标 [英] How to do a continuous polar and a radial polar using C++
本文介绍了如何使用C ++进行连续极坐标和径向极坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
1.我想知道怎样做一个连续的极星,它有更多的站点可以获得无限性。
2.我不知道如何使用三个点来做极光极光。
我尝试了什么:
1.I WANT TO KNOW HOW TO DO A CONTINUOUS POLAR WHICH HAVE MORE STATION POINTS UP TO INFINITY.
2. I DONT KNOW HOW TO DO RADIAL POLAR WITH THREE POINTS.
What I have tried:
//Program to compute continuous polar
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
float direction,distance(d),y,x,Delta_y,Delta_X,T1,T2,T3,Bm1,Bm2;
std::cout<<"Enter the coordinates x,y and press Enter"<<endl;
cin>>x,y;
std::cout<<"Enter the direction and press Enter"<<endl;
cin>>direction;
std::cout<<"Enter the distance(d) and Press Enter"<<endl;
cin>>distance(d);
Delta_Y= Y1 + distance(d)*sin(direction);
Delta_x=x1 + distance(d)*cos(direction);
y2 = y1 + distance(d)*sin(direction);
x2 = x1 + distance(d)*cos(direction);
Display (y2,x2)
推荐答案
鉴于几乎没有定义任何变量,甚至没有编译。以下行应该做什么?
Given that almost none of your variables are defined, that will not even compile. And what is the following line supposed to do?
cin>>distance(d);
我想我得到了一个解决方案,但我只做了一个单极的样本,我想计算一个可以连接两个点的程序,找到未知点的坐标。我认为我之前的问题并不清楚。感谢您的帮助。
#include< iostream>
#include< cmath>
using namespace std ;
int main()
{
浮动方向,距离,y,x,Delta_y,Delta_X;
std :: cout<<输入坐标x并按Enter键<< endl;
cin>> x;
std :: cout< <输入坐标y并按Enter键<< endl;
cin>> y;
std :: cout<<输入方向然后按Enter键输入<< endl;
cin>>方向;
std :: cout<<输入距离并按Enter键<< ; endl;
cin>>距离;
Delta_Y = Y1 +距离* sin(方向*(0.01475));
Delta_x = x1 +距离* cos(方向*(0.01475));
y2 = y1 + Delta_Y;
x2 = x1 + Delta_x; < br $>
std :: cout<<Y2的坐标,X2是=<
I think i got a solution but i only did a sample of a single polar,i wanted to compute a program that can join two points, finding the coordinates of the unknown point. I think my Previous question wasn't clear. Thanks for your help.
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
float direction,distance,y,x,Delta_y,Delta_X;
std::cout<<"Enter the coordinates x and press Enter"<<endl;
cin>>x;
std::cout<<"Enter the coordinate y and press Enter"<<endl;
cin>>y;
std::cout<<"Enter the direction and press Enter"<<endl;
cin>>direction;
std::cout<<"Enter the distance and Press Enter"<<endl;
cin>>distance;
Delta_Y= Y1 + distance*sin(direction*(0.01475));
Delta_x=x1 + distance*cos(direction*(0.01475));
y2 = y1 + Delta_Y;
x2 = x1 + Delta_x ;
std::cout<<"The coordinates of Y2,X2 is ="<
我想我有一个解决方案,但我只做了一个单极的样本,我想计算一个可以连接两个点的程序,找到未知点的坐标。我认为我之前的问题并不清楚。感谢您的帮助。
#include< iostream>
#include< cmath>
using namespace std ;
int main()
{
浮动方向,距离,y,x,Delta_y,Delta_X;
std :: cout<<输入坐标x并按Enter键<< endl;
cin>> x;
std :: cout< <输入坐标y并按Enter键<< endl;
cin>> y;
std :: cout<<输入方向然后按Enter键输入<< endl;
cin>>方向;
std :: cout<<输入距离并按Enter键<< ; endl;
cin>>距离;
Delta_Y = Y1 +距离* sin(方向*(0.01475));
Delta_x = x1 +距离* cos(方向*(0.01475));
y2 = y1 + Delta_Y;
x2 = x1 + Delta_x; < br $>
std :: cout<<Y2,X2的坐标是=<
I think i got a solution but i only did a sample of a single polar,i wanted to compute a program that can join two points, finding the coordinates of the unknown point. I think my Previous question wasn't clear. Thanks for your help.
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
float direction,distance,y,x,Delta_y,Delta_X;
std::cout<<"Enter the coordinates x and press Enter"<<endl;
cin>>x;
std::cout<<"Enter the coordinate y and press Enter"<<endl;
cin>>y;
std::cout<<"Enter the direction and press Enter"<<endl;
cin>>direction;
std::cout<<"Enter the distance and Press Enter"<<endl;
cin>>distance;
Delta_Y= Y1 + distance*sin(direction*(0.01475));
Delta_x=x1 + distance*cos(direction*(0.01475));
y2 = y1 + Delta_Y;
x2 = x1 + Delta_x ;
std::cout<<"The coordinates of Y2,X2 is ="<
这篇关于如何使用C ++进行连续极坐标和径向极坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文