资源简介

本文通过分形几何的方法,实现了Koch曲线的绘制。在载入的背景中,我们可以随机点击鼠标,来产生各种颜色的Koch雪花。文件中包含整个工程项目。

资源截图

代码片段和文件信息

// KochFlutter.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “KochFlutter.h“

#include “MainFrm.h“
#include “KochFlutterDoc.h“
#include “KochFlutterView.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CKochFlutterApp

BEGIN_MESSAGE_MAP(CKochFlutterApp CWinApp)
//{{AFX_MSG_MAP(CKochFlutterApp)
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()

/////////////////////////////////////////////////////////////////////////////
// CKochFlutterApp construction

CKochFlutterApp::CKochFlutterApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CKochFlutterApp object

CKochFlutterApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CKochFlutterApp initialization

BOOL CKochFlutterApp::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(CKochFlutterDoc)
RUNTIME_CLASS(CMainframe)       // main SDI frame window
RUNTIME_CLASS(CKochFlutterView));
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

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       5271  2011-01-01 00:58  KochFlutter(VC6)\Debug\APPMODUL.obj

     文件     377272  2011-01-01 01:08  KochFlutter(VC6)\Debug\KochFlutter.ilk

     文件      23381  2010-12-30 09:36  KochFlutter(VC6)\Debug\KochFlutter.obj

     文件    5499168  2010-12-30 03:13  KochFlutter(VC6)\Debug\KochFlutter.pch

     文件     492544  2011-01-01 01:08  KochFlutter(VC6)\Debug\KochFlutter.pdb

     文件      15135  2010-12-30 03:13  KochFlutter(VC6)\Debug\KochFlutterDoc.obj

     文件      38953  2011-01-01 01:08  KochFlutter(VC6)\Debug\KochFlutterView.obj

     文件      20071  2010-12-30 03:13  KochFlutter(VC6)\Debug\MainFrm.obj

     文件     105762  2010-12-30 03:13  KochFlutter(VC6)\Debug\StdAfx.obj

     文件     222208  2011-01-01 01:08  KochFlutter(VC6)\Debug\vc60.idb

     文件     364544  2011-01-01 01:08  KochFlutter(VC6)\Debug\vc60.pdb

     文件   22037824  2011-01-01 01:06  KochFlutter(VC6)\KochFlutter.aps

     文件       2431  2011-01-01 01:08  KochFlutter(VC6)\KochFlutter.clw

     文件       4299  2010-12-30 02:59  KochFlutter(VC6)\KochFlutter.cpp

     文件       4996  2010-12-30 10:22  KochFlutter(VC6)\KochFlutter.dsp

     文件        547  2010-12-30 03:26  KochFlutter(VC6)\KochFlutter.dsw

     文件       1411  2010-12-30 02:59  KochFlutter(VC6)\KochFlutter.h

     文件      91136  2011-01-01 01:08  KochFlutter(VC6)\KochFlutter.ncb

     文件      49664  2011-01-01 01:08  KochFlutter(VC6)\KochFlutter.opt

     文件       2578  2011-01-01 01:08  KochFlutter(VC6)\KochFlutter.plg

     文件      12377  2010-12-30 10:21  KochFlutter(VC6)\KochFlutter.rc

     文件       1842  2010-12-30 02:59  KochFlutter(VC6)\KochFlutterDoc.cpp

     文件       1530  2010-12-30 02:59  KochFlutter(VC6)\KochFlutterDoc.h

     文件       8359  2011-01-01 01:08  KochFlutter(VC6)\KochFlutterView.cpp

     文件       2527  2010-12-30 10:15  KochFlutter(VC6)\KochFlutterView.h

     文件       2512  2010-12-30 02:59  KochFlutter(VC6)\MainFrm.cpp

     文件       1581  2010-12-30 02:59  KochFlutter(VC6)\MainFrm.h

     文件       4431  2010-12-30 02:59  KochFlutter(VC6)\ReadMe.txt

     文件    5760056  2010-12-30 09:36  KochFlutter(VC6)\res\Kocher.bmp

     文件    5760054  2010-12-30 10:21  KochFlutter(VC6)\res\Kocher4.bmp

............此处省略13个文件信息

评论

共有 条评论