Skip to content

Instantly share code, notes, and snippets.

View erkal's full-sized avatar

Erkal Selman erkal

View GitHub Profile
@erkal
erkal / README.md
Last active August 29, 2015 13:57
Basic Force Layout

Basic Force Layout

Serves as a basis for other force layout examples.

@erkal
erkal / README.md
Last active November 25, 2023 15:45
Random Graph Generator

Random Graph Generator

Click anywhere to generate a new random graph.

  • The nodes are colored by the number of their neighbors.
  • Nodes with higher number of neighbours are bigger.
@erkal
erkal / README.md
Last active August 29, 2015 13:57
Using Invisible Nodes

Using Invisible Nodes

This is supposed to be an answer to this question.

It combines this example with the use of invisible nodes.

@erkal
erkal / README.md
Last active August 29, 2015 13:57
Mobile Patent Suits with Polygon Links

Mobile Patent Suits with Polygon Links

This is an alternative to: Mobile Patent Suits

A simpler version is here

How? The width of the links and the length & width of arrow-heads are determined by parameters. These parameters are read from the link properties.

@erkal
erkal / README.md
Last active August 29, 2015 13:57
Directed Links with Polygons

Directed Links with Polygons.

This is an alternative to: Mobile Patent Suits

The mobile patent suits version is here

How? The width of the links and the length & width of arrow-heads are determined by parameters. These parameters are read from the link properties.

@erkal
erkal / README.md
Last active August 29, 2015 13:57
playButton

playButton

Here is a simple mechanism mainly for the purpose of building step by step illustrations in bl.ocks.org.

It is better compared to using setTimeouts, because

  • it gives the control to the user,
  • it saves you time because you don't need to worry about the optimum time intervals.

The function playButton takes as arguments an svg element svg,

@erkal
erkal / README.md
Last active August 29, 2015 13:57
General Update Pattern with playButton

General Update Pattern with playButton

This is an illustration of playButton

Most of the code (including all commentaries) is copied from General Update Pattern

@erkal
erkal / README.md
Last active August 29, 2015 13:57
waitAndEval

waitAndEval

A simple mechanism for step by step illustrations.

You can use it in aa loop: waitAndEval II

See also playButton.

@erkal
erkal / README.md
Created April 1, 2014 13:39
waitAndEval II

waitAndEval with loop

A simple mechanism for step by step illustrations.

See waitAndEval.

See also playButton.