@@ 9,6 9,8 @@ and then interpret these tokens into a s
into `Svg` objects that hold the `Render` trait. The rendering system, located in the file `renderer.rs`, then takes these objects
and outputs the correct svg code.
+Note: main repository is developed using Mercurial, at [https://hg.sr.ht/~lnjng/elements](https://hg.sr.ht/~lnjng/elements).
+
## Usage
Here is an example to render a triangle:
```lisp
@@ 20,4 22,76 @@ Here is an example to render a triangle:
More examples can be found under the `examples` directory.
-Note: main repository is developed using Mercurial, at [https://hg.sr.ht/~lnjng/elements](https://hg.sr.ht/~lnjng/elements).
+## Reference
+The language is written in simple lisp syntax. Notably, however, you can simply write out the variable name with no parantheses,
+and the interpreter will automatically substitute the value of the variable and render the appropriate object. For example, the
+following code will render a triangle with vertices at (0, 0), (0, 3), and (4, 0):
+```lisp
+(setq A (point 0 0))
+(setq B (point 0 3))
+(setq C (point 4 0))
+(setq T (triangle A B C))
+T
+```
+Notice how the `setq` function is used to set variables.
+
+Functions are also often overloaded to provide more functionality with the same easy syntax. The following are the available
+geometric functions:
+
+### `point`
+```lisp
+(point [Int/Float] [Int/Float]) -> Point
+```
+
+The `point` function creates a point with the given x and y coordinates in the first and second parameters respectively.
+
+
+### `triangle`
+```lisp
+(triangle [Point] [Point] [Point]) -> Triangle
+```
+
+The first case for creating a triangle involves three parameters. The three parameters are the three vertices of the triangle.
+
+```lisp
+(triangle [Angle]) -> Triangle
+```
+
+The second case for creating a triangle is given an angle (i.e. two connected line segments), the function will create a triangle
+with the angle as the vertex.
+
+```lisp
+(triangle [Circle]) -> Triangle
+```
+
+The third and ambiguous case, when given a circle, the function will return a randomly generated inscribed triangle. The triangle
+will have points that are greater than half the radius apart.
+
+### `circle`
+```lisp
+(circle [Point] [Int/Float]) -> Circle
+```
+
+The first case for creating a circle involves two parameters. The first is a parameter denoting the center of the circle. The second
+parameter is a number denoting the radius of the circle.
+
+```lisp
+(circle) -> Circle
+```
+
+An ambiguous case for this function, when no parameters are given this function will create a standard circle at (0, 0) with radius 5.
+
+### `angle`
+```lisp
+(angle [Point] [Point] [Point]) -> Angle
+```
+
+The `angle` function creates an angle from three points denoted in the three parameters.
+
+### `iangle`
+```lisp
+(iangle [Circle] [Int/Float]) -> Angle
+```
+
+The `iangle` function creates an inscribed angle in a circle. The first parameter is the circle, and the second parameter is the
+angle in degrees.