20/12/15 09:47:59.54 QEfzM0Mb.net
rm(list=ls())
source('toolmini.R')
Graph <- function(){
line <- function(A,B,lwr,upr,...){
x=seq(lwr,upr,len=1e3)
y=Im(A-B)/Re(A-B)*(x-Re(A))+Im(A)
lines(x,y,...)
}
axy <- function(a,P,lwr,upr,...){
x=seq(lwr,upr,len=1e3)
y=a*(x-Re(P))+Im(P)
lines(x,y,...)
}
ngon5 <- function(n=5,digit=F,cex=1,...){
r=exp(2*pi/n*1i)
p=complex(n)
for(i in 1:(n+1)) p[i]= (1-r^i)/(1-r)
plot(p,bty='l',type='l',ylim=c(0,3),axes=T,ann=FALSE,asp=1,...,)
points(1/(1-r),pch='.')
if(digit) text(Re(p),Im(p),1:n,cex=cex)
invisible(p)
}