Script that takes 3 inputs and generates object
Georgios Anthitsis shared this question 1 year ago
I posted this on reddit, but nobody answered there. I'd like to create a worksheet that contains rectangles and a script that shears them. The user should be able to do the following with the script:
Choose the polygon to shear by entering its name.
Choose the invariant side of the polygon by entering its end points.
Choose the shear factor with a slider (so that he can see the effect of different shear factors in real time and choose the appropriate value).
Press enter to output the transformed polygon (which can then be manipulated further).
What you want does not make sense in this form, since it is not possible or extremely effortful.
The main problem is that GGB works primarily deterministically. As soon as the user is supposed to independently create new (geometric) objects that interact with existing (or future) objects, then it becomes complex and extensive.
Attached is an (simplified) example of an alternative. All objects and dependencies already exist with the start of the applet. However, the objects are modifiable. Any scripts are not required.
Comments have been locked on this page!