資源簡介
MFC繪制阿基米德螺旋線
阿基米德螺線也叫“等速螺線”。
當(dāng)一點(diǎn)P沿動射線OP以等速率運(yùn)動的同時(shí),該射線又以等角速度繞點(diǎn)O旋轉(zhuǎn),點(diǎn)P的軌跡稱為“阿基米德螺線”。直線旋轉(zhuǎn)一周時(shí),動點(diǎn)在直線上移動的距離稱為導(dǎo)程用字母S表示。近似畫法:(1)先以導(dǎo)程S為半徑畫圓,再將圓周及半徑分成相同的n等分;(2)以O(shè)為圓心,作各同心圓弧于相應(yīng)數(shù)字的半徑相交,得交點(diǎn)Ⅰ、Ⅱ、Ⅲ、…Ⅷ各點(diǎn),即為阿基米德渦線上的點(diǎn);(3)依次光滑連接各點(diǎn),即得阿基米德螺線。

代碼片段和文件信息
//?huatu.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“huatu.h“
#include?“MainFrm.h“
#include?“huatuDoc.h“
#include?“huatuView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CHuatuApp
BEGIN_MESSAGE_MAP(CHuatuApp?CWinApp)
//{{AFX_MSG_MAP(CHuatuApp)
ON_COMMAND(ID_APP_ABOUT?OnAppAbout)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG_MAP
//?Standard?file?based?document?commands
ON_COMMAND(ID_FILE_NEW?CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN?CWinApp::OnFileOpen)
//?Standard?print?setup?command
ON_COMMAND(ID_FILE_PRINT_SETUP?CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CHuatuApp?construction
CHuatuApp::CHuatuApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CHuatuApp?object
CHuatuApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CHuatuApp?initialization
BOOL?CHuatuApp::InitInstance()
{
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
//?Change?the?registry?key?under?which?our?settings?are?stored.
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization.
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
LoadStdProfileSettings();??//?Load?standard?INI?file?options?(including?MRU)
//?Register?the?application‘s?document?templates.??Document?templates
//??serve?as?the?connection?between?documents?frame?windows?and?views.
CSingleDocTemplate*?pDocTemplate;
pDocTemplate?=?new?CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CHuatuDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CHuatuView));
AddDocTemplate(pDocTemplate);
//?Parse?command?line?for?standard?shell?commands?DDE?file?open
CCommandLineInfo?cmdInfo;
ParseCommandLine(cmdInfo);
//?Dispatch?commands?specified?on?the?command?line
if?(!ProcessShellCommand(cmdInfo))
return?FALSE;
//?The?one?and?only?window?has?been?initialized?so?show?and?update?it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return?TRUE;
}
/////////
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????2334??2009-08-06?20:06??MFC繪制阿基米德螺旋線\huatu.clw
?????文件???????4191??2008-09-24?17:29??MFC繪制阿基米德螺旋線\huatu.cpp
?????文件???????4531??2009-08-06?20:10??MFC繪制阿基米德螺旋線\huatu.dsp
?????文件????????533??2008-09-24?17:29??MFC繪制阿基米德螺旋線\huatu.dsw
?????文件???????1345??2008-09-24?17:29??MFC繪制阿基米德螺旋線\huatu.h
?????文件????????244??2009-10-09?20:30??MFC繪制阿基米德螺旋線\huatu.plg
?????文件??????11711??2009-08-05?13:05??MFC繪制阿基米德螺旋線\huatu.rc
?????文件????????876??2018-12-19?13:20??MFC繪制阿基米德螺旋線\huatu.sln
????..A..H.?????11264??2018-12-19?13:20??MFC繪制阿基米德螺旋線\huatu.suo
?????文件???????7968??2018-06-14?12:04??MFC繪制阿基米德螺旋線\huatu.vcxproj
?????文件???????2483??2018-06-14?12:04??MFC繪制阿基米德螺旋線\huatu.vcxproj.filters
?????文件????????143??2018-06-14?12:04??MFC繪制阿基米德螺旋線\huatu.vcxproj.user
?????文件???????1722??2008-09-24?17:29??MFC繪制阿基米德螺旋線\huatuDoc.cpp
?????文件???????1464??2008-09-24?17:29??MFC繪制阿基米德螺旋線\huatuDoc.h
?????文件???????8085??2018-06-14?12:22??MFC繪制阿基米德螺旋線\huatuView.cpp
?????文件???????1759??2008-09-24?17:30??MFC繪制阿基米德螺旋線\huatuView.h
?????文件???????3488??2009-08-15?10:45??MFC繪制阿基米德螺旋線\MainFrm.cpp
?????文件???????1525??2009-02-04?10:46??MFC繪制阿基米德螺旋線\MainFrm.h
?????文件????????931??2009-08-06?20:05??MFC繪制阿基米德螺旋線\paint.cpp
?????文件???????4287??2008-09-24?17:29??MFC繪制阿基米德螺旋線\ReadMe.txt
?????文件???????1078??2008-09-24?17:29??MFC繪制阿基米德螺旋線\res\huatu.ico
?????文件????????397??2008-09-24?17:29??MFC繪制阿基米德螺旋線\res\huatu.rc2
?????文件???????1078??2008-09-24?17:29??MFC繪制阿基米德螺旋線\res\huatuDoc.ico
?????文件???????1078??2008-09-24?17:29??MFC繪制阿基米德螺旋線\res\Toolbar.bmp
?????文件????????639??2009-02-02?17:02??MFC繪制阿基米德螺旋線\Resource.h
?????文件????????207??2008-09-24?17:29??MFC繪制阿基米德螺旋線\StdAfx.cpp
?????文件???????1054??2008-09-24?17:29??MFC繪制阿基米德螺旋線\StdAfx.h
?????目錄??????????0??2018-06-28?11:15??MFC繪制阿基米德螺旋線\res
?????目錄??????????0??2018-12-19?13:20??MFC繪制阿基米德螺旋線
-----------?---------??----------?-----??----
............此處省略2個(gè)文件信息
評論
共有 條評論