Run the code in RStudio Console, Plots: Export, Save as PDF…, choose File name, Save.
Run InkSpace with a blank new document, drag and drop the PDF, OK, Object - Ungroup (Shift+Ctrl+G), delete 3 unnecessary objects (white background, axes labels, frame with axes values).
File, Document properties (Shift+Ctrl+D), Custom size - Units: px, Display units: px, Scale: 1, Orientation: Landscape.
Move the picture to the right place, zoom it (with proportion locked), select it, Path - Object to Path (Shift+Ctrl+C).
Save as .SVG.
Extensions - Export, TurnKeyLaser Exporter… Choose File name .GCODE, Apply. If the plugin freezes and the .GCODE file is created, it is safe to kill the Inkscape. Otherwise, switch to desktop (Win+D), click on the Inkscape in the taskbar and a window with the OK button should appear, press OK, Close.
source("spiro.R")
drawClearPaper(m = 105)
for (I in c(1, 3, 5, 7)) {
drawSpiro(m = 105, n = 56, h = I, col = "blue")
}
drawClearPaper(m = 105)
drawSpiro(m = 105, n = 80, h = 1, col = "red")
drawSpiro(m = 105, n = 80, h = 6, col = "blue")
drawSpiro(m = 105, n = 80, h = 11, col = "red")
drawSpiro(m = 105, n = 80, h = 16, col = "green")
drawSpiro(m = 105, n = 80, h = 21, col = "green")
drawClearPaper(m = 105)
for (I in 1:16) {
drawSpiro(m = 105, n = 63, h = I+3, phase = I-1)
}
drawClearPaper(m = 105)
for (I in 1:4) {
drawSpiro(m = 105, n = 63, h = I, phase = I-1, col = "red")
}
for (I in 5:8) {
drawSpiro(m = 105, n = 63, h = I, phase = I-1, col = "green")
}
for (I in 9:12) {
drawSpiro(m = 105, n = 63, h = I, phase = I-1, col = "blue")
}
drawClearPaper(m = 96)
for (I in 1:9) {
drawSpiro(m = 96, n = 56, h = I, phase = I-1, col = "blue")
}
drawClearPaper(m = 105)
for (I in c(1, 4, 7)) {
drawSpiro(m = 105, n = 45, h = I, col = "blue")
}
for (I in c(10, 13, 16)) {
drawSpiro(m = 105, n = 45, h = I, col = "green")
}
drawClearPaper(m = 105)
for (I in 1:11) {
drawSpiro(m = 105, n = 84, h = I, phase = 2*(I-1), col = "blue")
}
for (I in 12:22) {
drawSpiro(m = 105, n = 84, h = I, phase = 2*(I-12), col = "green")
}
drawClearPaper(m = 105)
for (I in c(1, 2, 3)) {
drawSpiro(m = 105, n = 30, h = I, col = "blue")
}
for (I in c(6, 7, 8)) {
drawSpiro(m = 105, n = 45, h = I, col = "red")
}
for (I in c(11, 12, 13)) {
drawSpiro(m = 105, n = 60, h = I, col = "green")
}
for (I in c(16, 17, 18)) {
drawSpiro(m = 105, n = 75, h = I, col = "black")
}