Quick Links:
Help Topics Interactive Geometry Custom Apps Index Catalog

Geometry Commands

Programming commands with examples for Interactive Geometry are listed below in alphabetical order.

Note: If you copy and paste an example into the Command line, press Enter at the end of each line. Otherwise, use the program command and copy and paste into a program window.

See also Getting Started, Programming Basics, Catalog, Geometry Index.

Command Explanation Example(s)
[abs number] Compute the absolute value of a given number let a=[abs -6]
show a
returns 6.0
angle [p1,p2,p3] An angle is determined by three points (with the second point as the vertex), and is swept out counterclockwise from the first toward the third

let p1=[point [0,0]]
let p2=[point [5,0]]
let p3=[point [3,3]]
let angle123=[angle [p1,p2,p3]]
draw p1 draw p2 draw p3
draw angle123

bisect angle1 Construct the bisector of a given angle let angleABC=angle [[4,4][-5,3][-5,11]] draw angleABC
let bisectangleABC=[bisect angleABC] draw bisectangleABC
circle [p1,p1] Define a circle by a center point and a point on its radius let point1=point [0,0] draw point1
let point2=point [5,0] draw point2
let mycircle=circle [point1,point2]
draw mycircle
clear Erase the entire screen and command window contents clear
[cos number] Compute the cosine of a given number let c=[cos 0]
show k
returns 1.0
cs Erase the screen contents only cs
draw object Makes a previously defined object visible on the screen let A=point [1,1]
let B=point [0,-5]
draw A
draw B
[function expression] Execute a function for a given expression (where function is the name of a common function) let A=[sqrt 49]
show A

returns 7.0
halfplane [p1,p2] Define a half plane by two points on its line let point1=point [0,0] draw point1
let point2=point [5, 0] draw point2
draw halfplane [point1,point2]
draw halfplane [point2,point1]
info Show the coordinates of a defined object as a measurement on the screen let A=point [3,4]
info A
draw A
input "Prompt" variable Call an input window and give a value to the variable "Prompt" input "Prompt" variable returns a window, type 5, Done.
intersection object1 object2 Define the intersection of two previously defined objects let lineAB=line [[3,0][8,5]]
let lineCD=line [[0,0][5,-3]]
let E=[intersection lineAB lineCD]
draw lineAB draw lineCD draw E
[invcos number] Compute the inverse cosine of a given number let ic=[invcos 1]
show ic
returns 0.0
[invsin number] Compute the inverse sine of a given number let is=[invsin 0]
show is
returns 0.0
[invtan number] Compute the inverse tangent of a given number let it=[invtan 0]
show it
returns 0.0
let Define and name objects for use, the characters that follow the let command represent the name of the object let origin=point [0,0]
draw origin
line [p1,p2] Define a line by two points let point1=point [0,0] draw point1
let point2=point [5,0] draw point2
let line1=line [point1,point2] draw line1
midpoint object1 Construct the midpoint of an object (e.g., a segment or polygon) let AB=[[-7,7][13,1]]
let CD=[[3,8][3,2]]
let M=[midpoint AB] show coord M
parallel point1 line1 Determine a parallel line through a given point to a given line let line1=line [[0,0][1,1]]
let point1=point [-2,0] draw line1 draw point1 let line2 =[parallel point1 line1] draw line2
path point
path point point
Determine the path of a given point let P=[point [0,0]]
drag point P on the screen to a new location then
show path point P
> pathpoint[3.0, -9]
perpendicular point1 line1 Determine a perpendicular line through a given point to a given line let line1=line [[0,0][1,1]]
let point1=point [-2,0] draw line1 draw point1 let line3=[perpendicular point1 line1] draw line3
point [x,y] Define a point determined by an ordered pair in square brackets [x-coordinate, y-coordinate] let A=[point [2,7]]
draw A
polygon [p1,p2,...,pn] Determine a polygon or shape by a finite number of points let R=point [2,7]
let S=point [0,0]
let T=point [-2,-2]
let shapeRST=polygon [R S T]
draw R draw S draw T
draw shapeRST
program Type the program command (followed by a space and the name of your program) into the Command Window to work within the Program Editor. Close this window then call the program by typing its name. program animateMe
(type program into programming window, then close window)
animateMe
ray [tail,head] Define a ray by a tail and a head draw ray [[5,0],[8,6]]
reflect object1,line1 Reflect a previously defined object over a previously defined line let A=point [4,4] let B=point [7,12] let C=point [-1,2] let lineDE=line [[5,4][10,4]] let triangleABC=polygon [A B C]
let A'=[reflect A lineDE]
let B'=[reflect B lineDE]
let C'=[reflect C lineDE]
let triangleA'B'C'=polygon [A' B' C']
draw A draw B draw C
draw triangleABC
draw lineDE
draw A' draw B' draw C'
draw triangleA'B'C'
rotate object1 angle1 Rotate an object to be rotated by a specified angle (either numerical or as a defined object) let triangleABC=polygon [[4,5][1,7][4,-2]]
draw triangleABC
draw rotate triangleABC 45
scale object1 vector1
scale object1 scalefactor
Scale an object by a vector or scale factor, centered at the origin let A=point [-6,6]
let B=point [-8,0]
let C=point [-3,4]
let triangleABC=polygon [A B C]
let A'B'C'=[scale triangleABC 1.5]
draw triangleABC draw A'B'C'
segment [p1,p2] Define a segment by two endpoints let segAB=[segment [[0,0],[5,0]]]
draw segAB
show Show the coordinates of a defined object within the command window let segAB=[segment [[0,0],[5,0]]]
let M=[midpoint segAB]
show M
[sin number] Compute the sine of a given number let s=[sin 0]
show s
returns 0.0
[sqrt number] Compute the square root of a given number let k=[sqrt 57]
show k
returns 7.5498344
[tan number] Compute the tangent of a given number let t=[tan 0]
show t
returns 0
tangents circle1 point1 Construct tangents to a circle through a point on or off the circle let A=point [-9,5] let B=point [-4,9] let circleAB=circle [A B]
draw A draw B draw circleAB
let tcircleABB=[tangents circleAB B] draw tcircleABB
translate object1 vector1 Translate an object by a translation vector (either an ordered pair or as a defined object such as a segment). let A=point [-6, 6]
let B=point [-8, 0]
let C=point [-3, 4]
let triangleABC=polygon [A B C]
let seg1=segment [[0,0][5,0]]
let imag1=[translate triangleABC [8,0]]
let imag2=[translate triangleABC seg1]
draw triangleABC draw imag1 draw imag2
vector [tail,head] Define a vector by a tail and a head draw vector [[-2,0],[-3,3]]
visible together with the style command, make an object visible or hidden with "on" or "off" let object=[segment [[-5,1][5,2]]]
style object visible on