Example for spiral drawing

Hi, here an example for drawing with functions for relative lines.

The link for an iterative solution:

https://x.thunkable.com/copy/79ef85ce0f871fa1ee33e79f7a70cc4d

and a recursive solution:

https://x.thunkable.com/copy/fd2e0aca0b6d9757d1919a3d12cefeaa

have fun!

3 Likes

This is cool, but I don’t understand what it’s for! Can you explain a use case for something like this?

Just for fun :wink:

Useful for Drawing lines with relative/absolute movement and relative/absolute turning. Like the old “turtle graphics”.

1 Like

This makes me remember. When I was young I started programming when DOS was still the thing people used. I drew a tree and apple using code like this. The Apple fell from the tree. When you clicked the space bar. That’s it. Lol. Pretty basic.

Good work!!

1 Like

This is awesome! :star2:

It too reminds me of a memory :smiley_cat:, When I used to create random spirals in MSW Logo in 3rd grade :smile:

Thanks, @rollke! :wave:

2 Likes

Yes, the good old LOGO programming language…

3 Likes

When you press start few times a little faster it will completely mess up - I think this is a Thunkable bug… maybe the speed of the calculations is too slow or idk what causes this failure :sweat_smile:

Best, Chris

1 Like

Fixed:
iterative
https://x.thunkable.com/copy/bdad6ad52d6d45b799cf291076fa25c7

or recursive

https://x.thunkable.com/copy/37bbf1cb7ab357b404c7108d845cb04c

2 Likes

Really, calculation and drawing seems to be rather slow.
So we have to wait with next operations until drawing is done.

By the way: In other projects with many calculations thunkable apps are also rather slow.

2 Likes

The slowdown occurs Especially when the calculations involve pulling numbers from lists stored in app/stored variableA. A known bug.

1 Like