3 ms·
The logo turtle uses relative position and orientation for graphics. To do this with easylang you need a bit of trigometry. https://easylang.online/ide/?code=%
by chkas 7y ago
The logo turtle uses relative position and orientation for graphics. To do this with easylang you need a bit of trigometry.
https://easylang.online/ide/?code=%23%20turtle%20graphics%0A%23%20%0Afloatvars%0Adeg%20%3D%200%0Ax%20%3D%2050%0Ay%20%3D%2050%0Adown%25%20%3D%200%0Amove%20x%20y%0Afunc%20forward%20n%20.%20.%0A%20%20x%20%2B%3D%20cos%20deg%20*%20n%0A%20%20y%20%2B%3D%20sin%20deg%20*%20n%0A%20%20if%20down%25%20%3D%201%0A%20%20%20%20line%20x%20y%0A%20%20else%0A%20%20%20%20move%20x%20y%0A%20%20.%0A.%0Afunc%20turn%20a%20.%20.%0A%20%20deg%20%2B%3D%20a%0A.%0A%23%20%0Acall%20forward%2035%0Acall%20turn%2090%0Adown%25%20%3D%201%0Afor%20i%25%20range%2018%0A%20%20call%20forward%2012%0A%20%20sleep%200.1%0A%20%20call%20turn%2020%0A.%0A https://easylang.online/ide/?code=%23%20turtle%20graphics%0A...