佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

搜索
查看: 1058|回复: 4

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

[复制链接]
发表于 13-8-2009 02:30 AM | 显示全部楼层 |阅读模式
You have to write subroutines for revolute and prismatic joints. Using these subroutines, you have to write a program that can at least calculate 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 10:22 AM | 显示全部楼层
原帖由 xing86 于 13-8-2009 02:30 AM 发表
有什么问题吗


这个问题得由你来告诉我们啊。你的code遇到什么问题?有什么error message?这些都得由你来告诉我们,我们才能帮你解决问题啊。

拜托各位来寻求帮助的朋友们,提升一下你们的common sense,学习一下正确的发问方式。

请参考:http://cforum1.cari.com.my/viewt ... &extra=page%3D1

如果你还不明白,那试想象一下场景:

在某个风光明媚的早上,同学们在老师的指导下快乐的学习,忽然,你兴高采烈的举手。老师满意的看了你一眼,心想:“好一个勤奋好学又主动的学生啊,老师就是喜欢对方主动一点的。。。嘻嘻嘻。。。”,在打消心里的胡思乱想后,老师终于把你叫起来,让你发问。

你:“老师,我有一个问题!”

老师:“这位同学,请说出你的问题。”

你:“我的问题就是我有一个问题。”

老师(额门上青筋暴现):“到底是什么问题?”

你:“就是我有一个问题啊,我的问题就是我有问题。”

老师:“我!·#¥%……—*()——《》?!!!”(吐血三升,头上爆出几个血喷泉,软瘫在地上不停的抽搐)

[ 本帖最后由 geekman 于 13-8-2009 10:35 AM 编辑 ]
回复

使用道具 举报

 楼主| 发表于 13-8-2009 01:12 PM | 显示全部楼层
更改了,抱歉。
回复

使用道具 举报

发表于 13-8-2009 01:54 PM | 显示全部楼层
我搜寻了一下,RRR & RRP open-loop mechanism 似乎是跟 robotic arms 的控制系统有关的东西,由于和本主题关系不大(这里始终是Programming讨论区,而不是mechanical engineering讨论区),所以我没仔细去看。

根据题目,它的bonus part是要你设计一个界面,允许用户自己定义open-loop mechanism相关的设定(allows the user to build the open mechanism)。至于什么是 “allows the user to build the open mechanism”, 这是你的功课,你应该比我更清楚。


对了,Firefox 回报说你的 Lecturer 放在网上的那个 pdf file 是 insecure 的,所以为了提防中病毒/木马,我没去打开来看,因此无法更进一步的了解你的问题,你还是得靠自己了。

[ 本帖最后由 geekman 于 13-8-2009 01:58 PM 编辑 ]
回复

使用道具 举报

 楼主| 发表于 13-8-2009 03:37 PM | 显示全部楼层
谢谢。
回复

使用道具 举报

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

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


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

GMT+8, 30-4-2026 09:16 PM , Processed in 0.074486 second(s), 13 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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