Creating Lua Applets

Creating Lua Applets

Top  Previous  Next

If you have a TI-Nspire calculator, you can put your Geometry Expressions model on it by creating an interactive Lua app.

Variables can be adjusted from a text box or with a slider. Any points in the Geometry Expressions model constrained by variable Coordinates or a variable parameter for the Point Proportional constraint can be set as draggable points in the Lua app.

After you create your Gx model select File / Export /Lua App. Fill out the details in the Lua App Generator dialog.

Lua dialog 

Output directory - tells Gx where to put the file.  It will create a file: name.tns in the specified directory.

Applet Name - is the name of the Lua (.tns) file.

Auto-scale - when checked, the Lua applet automatically rescales the  drawing when the user changes the value of one of the inputs; when unchecked, you are prompted to click-and-drag a rectangle around the drawing after you click Ok.

Inputs - lets you choose which variables the user will be able to change, what text is displayed for the variable and what type of control to use.

Any variables in your Gx model may be selected as input variables in the Lua app.  See the topic detailing UI Types.

Outputs - lets you choose which outputs will appear in the applet, and their text Label.

Any measurements which are present in the Geometry Expressions model may be chosen as outputs for the Lua app.

When you click OK, the Lua code is placed on the clipboard (and also in the file you specified), ready to paste into your TI-Nspire Teacher Software Script Editor.