Hi,
here is an example for drawing on canvas. I use 4 functions for relative/absoute drawing and turning like turtlegrafics and a recursive function for the the tree-drawing:
Here is the link to the project:
https://x.thunkable.com/copy/5f38e300a8913f5a9a555884082a2400
PS.: Drawing on canvas came too late for my new book: https://amzn.to/31WtGn6