|
查看: 990|回复: 2
|
有谁可以帮我? C++ 和CAD
[复制链接]
|
|
|
You have to write subroutines for revolute and prismatic joints. Usingthese subroutines, you have to write a program that can at leastcalculate the position of the end of rrr and rrp open-loop mechanism.
Bonus mark will be given if the program allows the user to build the open mechanism.
All the calculated values must be verified using CAD package.
我已经写了前一part,后一part不知是什么来的。
有谁可以帮我?
这是我前一part的code.....
#include <iostream.h> // HEADER
#include <math.h>
#define pi 4*atan(1)
#define A pi/180
int main (int argc, char *argv[]) // MAIN FUNCTION DECL
{
double Q1,Q2,Q3,L1,L2,L3;
cout <<"Please input value of Q1 :";
cin >>Q1;
cout <<"Please input value of Q2 :";
cin >>Q2;
cout <<"Please input value of Q3 :";
cin >>Q3;
cout <<"Please input value of L1 :";
cin >>L1;
cout <<"Please input value of L2 :";
cin >>L2;
cout <<"Please input value of L3 :";
cin >>L3;
cout <<"x is : "<<L1*cos (Q1*A) + L2*cos (Q2*A)+ L3*cos (Q3*A);
cout <<"\ny is : "<<L1*sin (Q1*A) + L2*sin (Q2*A)+ L3*sin (Q3*A);
char quit;
quit = '\0';
while (quit != 'q') cin >> quit;
return 0;
}
有什么问题吗?我的前一part 可以run,code 没有问题。只是问下有什么可以改进或改善吗?
只是不会后part,就是bonus mark 那里。 build the open mechanism 不知道是什么来的。
[ 本帖最后由 xing86 于 13-8-2009 01:12 PM 编辑 ] |
|
|
|
|
|
|
|
|
|
|
发表于 13-8-2009 11:53 AM
|
显示全部楼层
|
都不明白问题....是COMP GRAPHIC的ASSIGNMENT吗??? |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 13-8-2009 01:14 PM
|
显示全部楼层
原帖由 aquamax 于 13-8-2009 11:53 AM 发表 
都不明白问题....是COMP GRAPHIC的ASSIGNMENT吗???
是VR Programming For Engineers 的assignment.
用OpenGL C++ 做的。 |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|