# Geolang

Geolang is a programming language made by TJC games for helping with geometry.

Who am I kidding, it is a stupid language made by a stupid person.

Not affiliated with the other Geolang.

*This article is a stub, which means that it is not detailed enough and needs to be expanded. Please help us by adding some more information.*

## Usage

The name of an object cannot be or contain `@`, `[`, `]`, `,`, `(`, `)`, or any of the keywords.

All object names have to be unique.

Instead of listing a single object, where specified, you can have a list of objects.

An object list is surrounded by [], and has commas between items.

Any point input in the below table can take a co-ordinate set as well, except from the `point` command.

### Operations

Keyword | Usage | Mechanic |
---|---|---|

point | point a @ (x, y) | Add or move the point called `a` to the co-ordinates (x, y). |

point | point a @ (x, y) z | Add or move the point called `a` to the closest point on object z to the co-ordinates (x, y). |

mid | mid a @ x y | Add a point called `a` to the midpoint of points x and y. |

mid | mid a @ x | Add a point called `a` to the midpoint of segment or arc x. |

line | line a @ x y | Create a line called `a` between points x and y, and extend it infinitely. |

ray | ray a @ x y | Create a line segment called `a` between points x and y, and extend it in the direction of point y. |

seg | seg a @ x y | Create a line called `a` between points x and y. |

vect | vect a @ x y | Create a vector called `a` between points x and y, in the direction of y. |

shift | shift a @ x | Move point `a` by vector x. Can accept a point for x, where the vector is from (0,0) to the point. Can take a list for a, where it moves all objects. |

mirror | mirror a @ x | Mirror point `a` along line x. Can accept a point for x, where the line is from (0,0) to the point. Can take a list for a, where it mirrors all objects. |

circ | circ a @ x y | Create a circle called `a` with the centre on point x and the edge on point y. |

circ | circ a @ x y z | Create a circle called `a` touching all points x, y, and z. |

arc | arc a @ x y z | Create an arc called `a` with the centre on x and the ends on points y and z, going clockwise. |

poly | poly a @ [i, j, k, l...] | Create a polygon called `a` with vertices i, j, k, l, and so on (min. 3 arguments). |

## Examples

### Hello world

Hello world programs are technically considered impossible in this language because the output is non-textual. However, there may be alternatives.

If you really wanted to, you could do this:

seg h1 @ (0,0) (0,4) seg h2 @ (2,0) (2,4) seg h3 @ (0,2) (2,2) point e1 @ (3,0) point e2 @ (3,4) seg e3 @ e1 e2 seg e4 @ e1 (5,0) seg e5 @ e2 (5,4) seg e6 @ (3,2) (5,2) point l11 @ (6,0) seg l12 @ l11 (6,4) seg l13 @ l11 (8,0) point l21 @ (9,0) seg l22 @ l21 (9,4) seg l23 @ l21 (11,0) seg o11 @ (12,0) (14,0) seg o12 @ (12,4) (14,4) seg o13 @ (12,0) (12,4) seg o14 @ (14,0) (14,4) point w1 @ (0,-5) point w2 @ (4,-5) seg w3 @ w1 w2 seg w4 @ w1 (0,-1) seg w5 @ (4,-1) seg w6 @ (2,-5) (2,-3) seg o21 @ (3,-5) (5,-5) seg o22 @ (3,-1) (5,-1) seg o23 @ (3,-5) (3,-1) seg o24 @ (5,-5) (5,-1) point r1 @ (6,-1) point r2 @ (8,-1) point r3 @ (8,-3) seg r4 @ r1 r2 seg r5 @ r2 r3 seg r6 @ r1 (6,-5) seg r7 @ r3 (6,-3) seg r8 @ (7,-3) (8,-5) point l31 @ (9,-5) seg l32 @ l31 (9,-1) seg l33 @ l31 (11,-5) seg d1 @ (12,-1) (12,-5) seg d2 @ (12,-5) (13,-5) seg d3 @ (13,-5) (14,-4) seg d4 @ (14,-4) (14,-2) seg d5 @ (14,-2) (13,-1) seg d6 @ (13,-1) (12,-1)

### Truth machine

It is impossible, proving that this language is not turing complete. ^{[citation needed]}

## Links

I will start working on a geolang<->geogebra interpreter soon.