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
zoom.c
Package: leda.tar.gz [view]
Upload User: gzelex
Upload Date: 2007-01-07
Package Size: 707k
Code Size: 1k
Category:
Mathimatics-Numerical algorithms
Development Platform:
MultiPlatform
- #include <LEDA/plane.h>
- #include <LEDA/window.h>
- #include <math.h>
- main()
- {
- window W;
- W.init(-100000000, 100000000, -100000000);
- int n = W.read_int("n = ");
- list<segment> L;
- point c(0,0);
- segment s;
- double r = 1000000000;
- double alpha = 0;
- double d = 2*LEDA_PI/n;
- for(int i = 0; i<n; i++)
- { point p(rand_int(-10,+10),rand_int(-10,+10));
- s = segment(p,c.translate(alpha,r));
- L.append(s);
- alpha += d;
- }
- forall(s,L) W << s;
- point p,q;
- for(;;)
- { if (W.read_mouse(p)==3) break;
- W.read_mouse_rect(p,q);
- W.init(p.xcoord(),q.xcoord(),p.ycoord());
- forall(s,L) W << s;
- }
- return 0;
- }