/square-fractal

square freactal using L-algorithm and Turtle draw method

Primary LanguageJavaScriptApache License 2.0Apache-2.0

square-fractal

This program uses simple algorithm called L algorithm and turtle drawing method

The L algorithm is simple this consist of 3 things 1. 2. 3.

Using L algorithm we can st created an string of commands using F, L, R, [ and ]. Where F means move forward R means rotate right L me as rotate left [ means save current position ] means goto last saved position

Then we read the string in which commands are written and then execute them one by one I used turtle draw method to draw from that command