Package micycle.pgs.commons
Class FrontChainPacker
java.lang.Object
micycle.pgs.commons.FrontChainPacker
Circle packing of rectangle boundaries using the front-chain packing
algorithm from 'Visualization of Large Hierarchical Data by Circle Packing'.
The algorithm initialises circles in the boundary center and builds up the packing in a spiral pattern from this center until it reaches the rectangle boundary.
- Author:
- Mike Bostock, Java port and modifications by Michael Carleton
-
Constructor Summary
ConstructorsConstructorDescriptionFrontChainPacker
(float width, float height, float radiusMin, float radiusMax) Creates a FrontChainPacker instance.FrontChainPacker
(float width, float height, float radiusMin, float radiusMax, float offsetX, float offsetY, long seed) Creates a FrontChainPacker instance. -
Method Summary
-
Constructor Details
-
FrontChainPacker
public FrontChainPacker(float width, float height, float radiusMin, float radiusMax) Creates a FrontChainPacker instance. Circles are packed upon initialisation.Each circle in the output packing is prescribed a random radius between the range given.
- Parameters:
width
- width of rectangle boundary to packheight
- height of rectangle boundary to packradiusMin
- minimum radius of circles in the packingradiusMax
- maximum radius of circles in the packing#- See Also:
-
#FrontChainPacker(float, float, float, float, float, float)
-
FrontChainPacker
public FrontChainPacker(float width, float height, float radiusMin, float radiusMax, float offsetX, float offsetY, long seed) Creates a FrontChainPacker instance. Circles are packed upon initialisation. Each circle in the output packing is prescribed a random radius between a radius range given by its minimum and maximum values.- Parameters:
width
- width of rectangle boundary to packheight
- height of rectangle boundary to packradiusMin
- minimum radius of circles in the packingradiusMax
- maximum radius of circles in the packing- See Also:
-
-
Method Details
-
getCircles
-