import {stackn,rcross, sail, heart, stack, show, quarter_turn_right, quarter_turn_left} from "rune"; #1 CREATING A NEW FUNCTION function turn_upside_down(rune) { return quarter_turn_right(quarter_turn_right(rune)); } show (turn_upside_down(heart)); ***show is a function--> brackets required. #2 STACK FUNCTION (for only 2 runes, stacks vertically) show (stack(heart,sail)); 2A: stacking more than 2--> Apply stack multiple times show (stack(heart, stack(heart, heart))); /SIDE BY SIDE with STACK/ 2B: Stacking something n times import {stackn} from "rune"; show (stackn (5, heart)); #3 Side by Side function beside (rune1, rune2) { return (quarter_turn_right(stack(quarter_turn_left(rune2), quarter_turn_left(rune1)))); } show (beside (heart, heart)); #4 RECTANGULAR QULITING const my_quilt = (stackn(7,(quarter_turn_left(stackn(5, quarter_turn_right(heart)))))); show(my_quilt); function quilt (n , m , rune) { return } #5 Creating a function for rectangular quilting (abstraction) function quilt (n , m , rune) { return stackn(m , quarter_turn_left( stackn(n, quarter_turn_right( rune)))); } show (quilt(10, 10, heart)); #6 MAKE CROSS FUNCTION import {turn_upside_down, beside} from "rune"; function make_cross(rune) { return beside (stack(quarter_turn_right(rune), rune), stack(turn_upside_down(rune), quarter_turn_left(rune))); } show(make_cross(make_cross(make_cross(make_cross(make_cross(rcross)))))); /Basically, the make_cross function multiplies the "set" by 2x on each side (l and b) every time you use it, e.g.: 1,2,4,8,16/ possible to apply make cross functions many times since it is a transformation.
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter