inst/8_17_worker.R

library(knotR)
filename <- "8_17.svg"
a <- reader(filename)
Mver <- NULL
#knotplot2(a,node=T)
#stop()
sym817 <- symmetry_object(a,Mver=Mver,xver=4)
a <- symmetrize(a,sym817)
#knotplot2(a,text=T,circ=F,lwd=1)

ou817 <- matrix(c(
      8,1,
      2,16,
      20,3,
      6,21,
      15,7,
      17,10,
      11,20,
      22,14
),ncol=2,byrow=TRUE)
#knotplot(a,ou817)

jj <-
  knotoptim(filename,
            symobj = sym817,
            ou   = ou817,
            prob = 0,
            iterlim=1000,print.level=2,hessian=FALSE)


write_svg(jj, filename,safe=FALSE)
dput(jj,file=sub('.svg','.R',filename))

Try the knotR package in your browser

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

knotR documentation built on May 1, 2019, 9:10 p.m.