R/Scissor.R

Defines functions Scissor

Scissor<-function(P,angle,angle0,l,color="transparent",time=0){
  Draw(P,color)
  ang1=right(angle,angle0)
  Q=CreateSegmentAngle(P,ang1,l)
  Sys.sleep(time)
  Draw(Q)
  Draw(Q[2,],color)
  ang2=left(2*angle,ang1)
  R=CreateSegmentAngle(Q[2,],ang2,l)
  Sys.sleep(time)
  Draw(R)
  Draw(R[2,],color)
  ang3=right(angle,ang2)
  return(c(R[2,],ang3))
}

Try the LearnGeom package in your browser

Any scripts or data that you put into this service are public.

LearnGeom documentation built on July 14, 2020, 5:06 p.m.