diff --git a/triangleabstraction-luna/index.js b/triangleabstraction-luna/index.js new file mode 100644 index 000000000..9b3b95048 --- /dev/null +++ b/triangleabstraction-luna/index.js @@ -0,0 +1,70 @@ +/* +@title: TriangleAbstraction +@author: Luna +@snapshot: abstract +*/ +/* + Welcome to Blot! + + To get started with learning Blot's toolkit, + you can find a handful of guides here: https://blot.hackclub.com/guides + + You can find full documentation on Blot's toolkit by clicking the button at the top! + + Before you make a submission, there are a couple *mandatory* requirements for your PR: + + - It must be drawable in Blot! This means keeping the dimensions at 125x125 or smaller + - It must change based on different parameters; it cannot be hardcoded. + +*/ + +const container = document.getElementById('container'); +container.innerHTML = svgString; +const width = 125; +const height = 125; + +setDocDimensions(width, height); + +// store final lines here +const finalLines = []; +const rfinallines= []; +const random = bt.randIntInRange(1, 50); +// create a polyline +const polyline = [ + [58.0, 66.1], + [60, 34], + [43, 17], + [8, 41], + [20, 80], + [56, 75], + [58, 66], + [95, 66], + [55, 90], + [22, 46], + [58, 20], + [67, 124], + [16, 66], + [58, 20], + [45, 65], + [67, 124], + [15, 65], + [93, 66] +]; +const rpolyline = [ + [random, 77], + [28, 15], + [random, 107], + [54, 39] +]; +// add the polyline to the final lines +finalLines.push(polyline); +rfinallines.push(rpolyline); + + +// transform lines using the toolkit +bt.rotate(finalLines, 45); +bt.rotate(rfinallines, 15); + +// draw it +drawLines(finalLines); +drawLines(rfinallines); \ No newline at end of file diff --git a/triangleabstraction-luna/snapshots/Screenshot (699).png b/triangleabstraction-luna/snapshots/Screenshot (699).png new file mode 100644 index 000000000..82949ddc0 Binary files /dev/null and b/triangleabstraction-luna/snapshots/Screenshot (699).png differ diff --git a/triangleabstraction-luna/snapshots/Screenshot (700).png b/triangleabstraction-luna/snapshots/Screenshot (700).png new file mode 100644 index 000000000..ef221fe22 Binary files /dev/null and b/triangleabstraction-luna/snapshots/Screenshot (700).png differ diff --git a/triangleabstraction-luna/snapshots/abstract.png b/triangleabstraction-luna/snapshots/abstract.png new file mode 100644 index 000000000..d7e8b1a89 Binary files /dev/null and b/triangleabstraction-luna/snapshots/abstract.png differ diff --git a/triangleabstraction-luna/snapshots/anon.svg b/triangleabstraction-luna/snapshots/anon.svg new file mode 100644 index 000000000..fed892904 --- /dev/null +++ b/triangleabstraction-luna/snapshots/anon.svg @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file