source("http://macosa.dima.unige.it/r.R") HF=3; BF=3 x=c(6.5,5.5,5,4.5,3.5,3.75,3.5,4.5,5,5.5,6.5,8.5,10,10.25,9.25,10.5,10,8.5,6.5) y=c(8.5,8,7.5,6.5,5,6.5,8,6.5,5.5,5,4.5,4.5,5.5,6,6.5,6.5,7.5,8.5,8.5) c <- "black"; n = length(x) PLANE(-11,11,-11,11) polyC(x,y,"yellow") xx = yy = 0 # I "initialize" xx and yy # Symmetry with respect to the x axis (brown border) for(i in 1:n) {xx[i]=x[i]; yy[i]=-y[i]} polyC(xx,yy,"grey") ###### ###### PLANE(-11,11,-11,11) x=c(1,0,-0.5,-1,-2,-1.75,-2,-1,-0.5,0,1,3,4,4.75,3.75,5,4.5,3,1) y=c(-10,-9.5,-9,-8,-6.5,-8,-9.5,-8,-7,-6.5,-6,-6,-7,-7.5,-8,-8,-9,-10,-10) polyC(x,y,"yellow") point_incl(0,0, 30, "red") # simmetria rispetto alla retta passante per 0,0 e con direzione 30° for(i in 1:n) {k = symm2(x[i],y[i], 0,0, 30); xx[i]=k[1]; yy[i]=k[2]} polyC(xx,yy,"grey") ###### ###### coldash="grey" x=c(6.5,5.5,5,4.5,3.5,3.75,3.5,4.5,5,5.5,6.5,8.5,10,10.25,9.25,10.5,10,8.5,6.5) y=c(8.5,8,7.5,6.5,5,6.5,8,6.5,5.5,5,4.5,4.5,5.5,6,6.5,6.5,7.5,8.5,8.5) PLANE(0,21,0,21) polyC(x,y,"yellow") for(i in 1:n) {xx[i]=x[i]/2; yy[i]=y[i]/2} polyC(xx,yy,"grey") for(i in 1:n) {xx[i]=x[i]*2; yy[i]=y[i]*2} polyC(xx,yy,"grey") ###### ###### x=c(6.5,5.5,5,4.5,3.5,3.75,3.5,4.5,5,5.5,6.5,8.5,10,10.25,9.25,10.5,10,8.5,6.5) y=c(8.5,8,7.5,6.5,5,6.5,8,6.5,5.5,5,4.5,4.5,5.5,6,6.5,6.5,7.5,8.5,8.5) PLANE(0,21,0,21) polyC(x,y,"yellow") for(i in 1:n) {xx[i]=x[i]*2; yy[i]=y[i]} polyC(xx,yy,"grey") polyC(x,y,0) ###### ###### x=c(6.5,5.5,5,4.5,3.5,3.75,3.5,4.5,5,5.5,6.5,8.5,10,10.25,9.25,10.5,10,8.5,6.5) y=c(8.5,8,7.5,6.5,5,6.5,8,6.5,5.5,5,4.5,4.5,5.5,6,6.5,6.5,7.5,8.5,8.5) PLANE(0,21,0,21) polyC(x,y,"yellow") for(i in 1:n) {xx[i]=x[i]*2; yy[i]=y[i]*0.6} polyC(xx,yy,"grey") polyC(x,y,0)