Turtle graphics - Printable Version +- NaaLaa (https://www.naalaa.com/forum) +-- Forum: NaaLaa (https://www.naalaa.com/forum/forum-1.html) +--- Forum: NaaLaa 7 Code (https://www.naalaa.com/forum/forum-4.html) +--- Thread: Turtle graphics (/thread-76.html) Pages:
1
2
|
RE: Turtle graphics - 1micha.elok - 02-15-2024 (02-15-2024, 08:18 AM)Tomaaz Wrote: ... Thank you for your response. I decided to make a small experiment, - The first experiment : I used sprawdz () which has katzolwia> 360 and katzolwia<0 - The second experiment : I skipped sprawdz () The results are - The first experiment produced some "shifted green lines" - The second experiment produced a clean blue line Code: set window "Turtle Proof",640,360 RE: Turtle graphics - Tomaaz - 02-15-2024 Something similar is happening with the Koch Curve example. When you set recursion to 6 or more calls, all you get is a single pixel. I'm 99% sure it wasn't happening with Yabasic or EGSL It must be something related to number precision in NaaLaa. I should have been more clear about what I meant by "smaller programs". It doesn't matter how many line of code there is. All that matter is number of turns. RE: Turtle graphics - Marcus - 02-15-2024 (02-15-2024, 12:17 PM)Tomaaz Wrote: Something similar is happening with the Koch Curve example. When you set recursion to 6 or more calls, all you get is a single pixel. I'm 99% sure it wasn't happening with Yabasic or EGSL It must be something related to number precision in NaaLaa. Nah, all numbers in n7 are doubles (64 bit floating point values). Remove the 'int' calls in turtle.n7 and you can run more iterations. RE: Turtle graphics - Tomaaz - 02-15-2024 Thanx, Marcus! RE: Turtle graphics - 1micha.elok - 02-16-2024 Wonderful Thank you Tomaaz, your Turtle library is very useful to produce amazing turtle graphics / arts. Thank you also to Marcus for giving us an insight regarding numbers in n7. Herewith another turtle experiment : First experiment : turtle library contained int() produced "shifted green lines" Second experiment : turtle library without int() produced clean blue lines Code: '------------------------------------------------------------- |