Given some composition of objects, I would like to modify some input parameters and see how the output changes. The relation of input and resulting output parameters shall be written to a file.
EXAMPLE: Area of rectangle depending on position of point A.
A *-----------------.
| |
| |
| |
'-----------------* B
Point A is determined by its x and y coordinates. The edges of the rectangle are aligned with the edges of the coordinate system. Together with another point B, A spans the rectangle. The resulting rectangle has an area 'F'. Now, I would like to do something like the following
for x in range(0,5)
for y in range(0,5)
A = (x,y)
# Assume GeoGebra does all the adaptations.
myFile.write(x, y, F.area)
You can get the areas into a sequence:
Join(Sequence(Sequence({i,j,Polygon(B,(i,y(B)),(i,j),(x(B),j))},i,0,5),j,0,5))
but there is no way to pro programmatically save it into a file. You can use CopyFreeObject
to convert it into a free object and copy the new matrix to a text editor of your choosing.
Maybe using GeoGebra's spreadsheet instead of sequence could make the copying easier.