Adding new dependent point to list of points without creating a new list (losing my mind on this)
First of all I want to apologize for starting New Topic on the actually old issue, but I didn't find the solution to my problem within this forum conversation (https://help.geogebra.org/t...) ...
So, I've found several suggestions regarding adding elements to existing list without creating a new one but none of these work with dependent objects and that's my problem...
I have an initial list named list1 which consists of one free point D, defined as:
and three free points A, B and C.
Using Repeat and Execute commands I'm trying to repeat this procedure:
1.) generate random number r (random between 1 and 3)
2.) create point X as a midpoint of the segment which starts with point A, B or C as a one endpoint (A if r == 1, B if r == 2 ...) and the last point in the list1 as a second endpoint (at first, the second endpoint is point D)
3.) append point X to the list1 --> THIS IS WHERE MY PROBLEM STARTS...
4.) repeat the procedure given number of times
I've tried several approaches that work fine otherwise, like:
but none of these work because point X isn't a free object (I suppose that's the biggest issue) and I always get either "circular definition" error (if I use first approach) or syntax error meaning that the command argument I'm using, that is list1, isn't a valid one (in the second approach).
You can see why I need to append point X to the existing list1, without creating a new one, because the second segment's endpoint is the last one in the list1. So, when the point X is created it should be pushed into list1 (at the last position) and it becomes the last point that is the second segment's endpoint in the new repetition of the procedure...
I'm honestly losing my mind on this and any help or suggestion would be more than appreciated!
Here is the procedure code (that will be repeated with the Repeat command):
Now I need to push that point X to the last position of the list1, without creating a new one...