Ring and star topologies are similar in several ways.
Look at Ring topology and Star topology to get an
idea of their similarities.

Ring topology

Star topology
Both topologies are composed of nodes drawn on a circle.
For the Circular Layout algorithm, the only difference between the
ring and star topologies is that the star has a special node, called
the star center, that is drawn at the center of the circle.
Depending on the clustering mode (see Clustering mode (CL)), the layout allows you
to specify the order of the nodes on the circle (see Cluster membership and order of the nodes on a cluster (CL)) or it computes
the order automatically such that the number of link crossings is
small.
The network topology can be composed of more than one
ring or star. These rings and stars can be partially interconnected;
that is, two or more clusters can have a common node as shown in figure Rings interconnected by common nodes. They can
also be interconnected by links between nodes of two different clusters
as shown in figure Rings interconnected by links.

Rings interconnected by common nodes

Rings interconnected by links
The Circular Layout algorithm lays out ring and star
topologies in a way that preserves the visual identity of each cluster
and avoids overlapping nodes and clusters. See the sample drawings
in CL samples.
To understand how layout is performed in the clustering
modes
AUTOMATIC
and BY_CLUSTER_IDS
,
consider a graph in which each node represents a ring or star cluster
of a network topology. Add a link between two nodes each time there
is an interconnection between the corresponding clusters. The Circular
Layout algorithm is designed for the case where the graph obtained
in this manner is a tree (that is, a graph with no cycles). If cycles
exist, the layout is performed using a spanning tree of the graph. Starting from a root cluster (either a ring or a star),
the clusters that are connected to the root cluster are drawn on a
circle that is concentric to the root cluster. The radius of the circle
is computed to avoid overlapping clusters. Next, the algorithm lays
out the clusters connected to these last clusters on a larger circle,
and so on. Each circle is called a level.
For networks that are not connected (that is, disconnected
groups of clusters exist in the graph), more than one spanning tree
exists. Each spanning tree is laid out separately and placed near
the others. You can see it in the sample drawings in CL samples.
In the clustering mode
BY_SUBGRAPHS
,
each subgraph (cluster) keeps its initial position. The subgraphs
can be placed either by a different layout algorithm or interactively.
CL Example
The following code sample uses the ibm_ilog.graphlayout.circular.CircularLayout class. This code sample shows
how to perform a Circular Layout:
dojo.require("ibm_ilog.graphlayout.circular.CircularLayout"); var layout = new ibm_ilog.graphlayout.circular.CircularLayout(); graph.setNodeLayout(layout); graph.performGraphLayout();