![]() |
|
Learn to Draw in LindenMASM! - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Coding (https://sinister.ly/Forum-Coding--71) +--- Thread: Learn to Draw in LindenMASM! (/Thread-Learn-to-Draw-in-LindenMASM) |
Learn to Draw in LindenMASM! - Shebang - 08-19-2015 Syntax();
Learn to Draw in LindenMASM! Table of Contents
Chapter 1: Introduction LindenMASM is an esoteric programming language I designed for the purposes of drawing Lindenmayer systems. It uses an Assembly-like syntax, hence the name LindenMASM. The original reason I made the language was for a code-golf challenge, which was to create a LindenMASM interpreter in the fewest bytes possible. Since this was too similar to a challenge that had already been made, I scrapped the idea, but held on to the interpreter. The interpreter was written in Python 3.4, and does all of the drawing using a Turtle object. You can download the interpreter here. Chapter 2: Syntax There are only a few functional keywords in LindenMASM, 8 to be exact.
Each keyword should be placed on a new line. Every file should start with STT and end with END. Chapter 3: Commands There are only four built-in commands, however with these you can do a bunch of stuff!
Chapter 4: Examples Dragon Curve, n = 12 Code: STT
INC 12
AXI FX
SET F 0
RPL X X+YF+
RPL Y -FX-Y
ENDThis will draw something like this: Fractal Tree, n = 6 Code: STT
AXI X
DEG 25
MOV 2
INC 6
SET F 0
RPL X F-[[X]+X]+F[+FX]-X
RPL F FF
ENDThis will draw something like this: Thanks for reading! The language isn't expansive or anything, but it's fun to play around with!
RE: Learn to Draw in LindenMASM! - Inori - 08-19-2015 dude, this is awesome. I might start using this for vector generation RE: Learn to Draw in LindenMASM! - Eclipse - 08-19-2015 Holy crap that looks fun. I might port this over to Python2. RE: Learn to Draw in LindenMASM! - Shebang - 08-19-2015 (08-19-2015, 07:59 PM)eclipse Wrote: Holy crap that looks fun. I might port this over to Python2. I think the only thing needing changing is the tracer call, since that's not supported in Py2 (at least, the same way it is in Py3). |