Ipelets

A collection of ipelets that save me a lot of time when drawing figures. To use, add the .ipe files into your ./ipelets folder.


Dense Graphs

Some functions to draw dense graphs. These are included in k_clique.lua. The following graphs can be drawn:

Usage

Complete graphs

A complete graph is a graph with nn vertices where there is an edge for any pair of distinct vertices.

To draw a complete graph embedded into a circle for any number of vertices, follow:

  1. Draw a circle using one of the three options of ipe.
  2. Select the circle
  3. Run “ipelets -> Dense Graphs -> Complete graph”
  4. Enter the number of vertices and accept.
Example:

An example of a complete graph for n=10n=10:

Complete multipartite graphs

A complete multipartite graph consists of non-empty independent sets SiS_i and (x,y)(x,y) is an edge whenever xSix\in S_i and ySjy\in S_j with iji\neq j.

To draw a multipartite graph with independent sets S1,,SrS_1,\ldots,S_r where Si=ni|S_i| = n_i for all ii, embedded into rr lines, follow:

  1. Draw rr paths (lines, curves) L1,,LrL_1,\ldots,L_r.
  2. Select them in labelling order: First L1L_1, then L2L_2, L3L_3, and so on.
  3. Run “ipelets -> Dense Graphs -> Complete Multipartite Graph”
  4. Enter the sizes of S1,,SrS_1,\ldots,S_r in this format: s1,s2,,srs_1,s_2,\ldots,s_r (no spaces).
Example:

An example with three independent sets where n1,n2,n3=3,4,5n_1,n_2,n_3 = 3,4,5:

Complete Split Graph

A complete split graph is a graph that can be partitioned in an independent set and a clique such every vertex in the independent set is adjacent to every vertex in the clique.

To draw a complete split graph with a clique AA with nn vertices and independent set BB with mm vertices, follow:

  1. Draw a circle and a path.
  2. Select both.
  3. Run “ipelets -> Dense Graphs -> Complete split graph”
  4. Enter the sizes n,mn,m (no spaces).
Example:

An example with n=3n = 3 and m=4m = 4:


Intersection Graphs

Functions to draw intersection graphs. The ipelet is intersection_graphs.lua.

An (geometric) intersection graph is a graph that describes the intersection of a set of geometric objects. That is, two objects intersect if and only if their corresponding vertices share an edge.

To draw an [object] (objects: disk, open disk, rectangle, segment), do as follows:

  1. Draw some objects (of only one class)
  2. Select all of them
  3. Run “ipelets -> Dense Graphs -> [object]”

Examples:


Unwrap Circles

A function to unwrap a circle into a segment, preserving (scaled) length. The circle may have some points in its boundary. When unwrapping, the position of points is also translated correspondingly. The ipelet is unwrap_circle.lua.

Usage

To unwrap a circle, we do it deciding two things: the cut point and the unwrapping direction: clockwise or counterclockwise:

  1. Draw a circle CC with some points p1,,pnp_1,\ldots,p_n intersecting its boundary.
  2. Draw the cut point xx where desired.
  3. Select in this order:
    1. The circle CC,
    2. the points p1,,pnp_1,\ldots,p_n and,
    3. the cut point xx (the function cuts the circle at the last point selected!).
  4. Run “ipelets -> Unwrap Circle”
  5. Enter scale (default is one) and choose direction.

Example

An example with six points p1,,p6p_1,\ldots,p_6 on a circle CC. The grey arrow indicates clockwise direction. The unwrapped line above is clockwise; the one below is counterclockwise. Both lines have 1 of scale factor.