Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
glib.h
Package: fenxin.rar [view]
Upload User: hzcygd
Upload Date: 2022-04-30
Package Size: 109k
Code Size: 1k
Category:
Fractal program
Development Platform:
Visual C++
- #include <math.h>
- #define PI M_PI
- #define END 1995.6
- double ANGLE=0,RADIAN=0;//当前角的角度和弧度
- double LPX=0,LPY=0;//当前位置的X,Y坐标
- void __fastcall set0(int x0,int y0)//设置原点
- {SetWindowOrgEx(Form1->Image1->Canvas->Handle,0,0,NULL);
- SetViewportOrgEx(Form1->Image1->Canvas->Handle,x0,y0,NULL);
- }
- void __fastcall setlp(double lpx,double lpy)//设置当前位置
- {LPX=lpx;LPY=lpy;
- }
- void __fastcall setangle(double angle)//设置当前角度
- {ANGLE=angle;
- RADIAN=ANGLE*M_PI/180;
- }
- void __fastcall turn(double angle)//旋转当前角度
- {ANGLE+=angle;
- ANGLE=ANGLE-(int)ANGLE+(int)ANGLE%360;
- RADIAN=ANGLE*M_PI/180;
- }
- void __fastcall warp(double length)//弯曲指定距离
- {LPX+=length*cos(RADIAN);
- LPY-=length*sin(RADIAN);
- }
- void __fastcall move(double length)//画线
- {Form1->Image1->Canvas->MoveTo(LPX,LPY);
- Form1->Image1->Canvas->LineTo((LPX+=length*cos(RADIAN)),
- (LPY-=length*sin(RADIAN)));
- }
- void __fastcall putpixel(int x,int y,TColor col)//设置点的颜色
- {Form1->Image1->Canvas->Pixels[x][y]=col;
- }