-
Notifications
You must be signed in to change notification settings - Fork 0
Examples
This page lists out some examples of figures that can be generated using piplada.
![](https://github.com/aviral36/piplada/raw/master/wiki/triangle.gif)
Command:
Move pointer 250 pixels forward Rotate pointer 120 degrees
Config Commands:
pointer: shown speed: slow bg_color = "navajo white" line color = "dark gold"
This generates a triangle of side 250 and an interior angle 60 degrees. (This is because rotating pointer 120 degrees anti-clockwise positions the pointer in a direction 60 degrees (clockwise) from the existing line.)
![](https://github.com/aviral36/piplada/raw/master/wiki/square.gif)
Command:
Move pointer 200 pixels forward Rotate pointer 90 degrees
Config Commands:
pointer: shown speed: slow bg_color = "forest green" line color = "SeaGreen1"
This generates a square of side length 200.
![](https://github.com/aviral36/piplada/raw/master/wiki/hexagon.gif)
Command:
Move pointer 100 pixels forward Rotate pointer 60 degrees
Config Commands:
pointer: shown speed: normal bg_color = "red4" line color = "white"
This generates a hexagon of side length 100. (and interior angle 120 degrees)
![](https://github.com/aviral36/piplada/raw/master/wiki/circle.gif)
Command:
Move pointer 2 pixels forward Rotate pointer 1 degrees
Config Commands:
pointer: hidden speed: normal bg_color = "white" line color = "black"
This command instructs pointer to move 2 pixels, then change its trajectory by 1 degree. This generates an approximate circle on the canvas.
![](https://github.com/aviral36/piplada/raw/master/wiki/spoked_hexagon.gif)
Command:
Move pointer 40 pixels forward Rotate pointer by 300 degrees Move pointer 40 pixels forward Rotate pointer by 120 degrees Move pointer 40 pixels forward Rotate pointer by 300 degrees Move pointer 40 pixels forward Rotate pointer by 60 degrees
Config Commands:
pointer: hidden speed: normal bg_color = "gold" line color = "red"
This generates a hexagon of side 120, with a spoke of length 40 on each side protruding at an angle of 60 degrees from the surface.
![](https://github.com/aviral36/piplada/raw/master/wiki/icosagon.gif)
Command:
Move pointer 200 pixels forward Rotate pointer by 162 degrees
Config Commands:
pointer: hidden speed: normal bg_color = "white" line color = "navy"
This generates a 20-sided polygon, called an icosagon. The internal angle in an icosagon is 162 degrees, with the spoke length of this polygon being 200 pixels.