佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

搜索
查看: 990|回复: 2

有谁可以帮我? C++ 和CAD

[复制链接]
发表于 13-8-2009 02:31 AM | 显示全部楼层 |阅读模式
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 编辑 ]
回复

使用道具 举报


ADVERTISEMENT

发表于 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++ 做的。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2026 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 1-5-2026 12:48 PM , Processed in 0.056151 second(s), 13 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表