inst/9_24_worker.R

library(knotR)
filename <- "9_24.svg"

a <- reader(filename)
#knotplot2(a,node=TRUE)

sym924 <-
    symmetry_object(
        x    = a,
        xver = 30,
        mcdonalds=FALSE
    )

a <- symmetrize(a,sym924)
#knotplot2(a,lwd=1,text=TRUE,rainbow=TRUE,circ=FALSE)

ou924  <-
    matrix(c(
    05,29,
    28,11,
    09,27,
    26,19,
    17,25,
    24,15,
    02,21,
    20,04,
    12,08
),byrow=TRUE,ncol=2)


#knotplot(a,ou924)

jj <- knotoptim(filename,
                symobj  = sym924,
                ou      = ou924,
                prob    = 0,
#                iterlim= 1000, print.level=2
               control=list(trace=100,maxit=70000), # these arguments for optim()
               useNLM=FALSE
                )

write_svg(jj,filename,safe=FALSE)
dput(jj,file=sub('.svg','.S',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.