|
Treeviz 0.37 2010-10-17 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.tree.circlemap.Circles
public class Circles
Utility functions for Circle objects.
| Method Summary | |
|---|---|
static java.awt.geom.Rectangle2D.Double |
boundingBox(java.util.ArrayList<Circle> circles)
Calculate the bounding box of all circles. |
static Circle |
boundingCircle(java.util.ArrayList<Circle> circles)
Calculate the bounding circle of all circles. |
static double |
circumradius(double ra,
double rb,
double rc)
Computes the circumradius of the reference triangle for three tightly packed circles. |
static double |
innerSoddyRadius(double ra,
double rb,
double rc)
Computes the radius of the inner soddy circle for three tightly packed circles. |
static void |
main(java.lang.String[] arg)
|
static Circle |
outerSoddyCircle(Circle circleA,
Circle circleB,
Circle circleC)
Computes the outer soddy circle for three tightly packed circles. |
static double |
outerSoddyRadius(double ra,
double rb,
double rc)
Computes the radius of the outer soddy circle for three tightly packed circles. |
static void |
pairPack(java.util.ArrayList<Circle> circles)
Packs circles closely together into a circle around the center of the coordinate system by creating a list of already packed pairs of circles. |
static void |
phyllotacticPack(java.util.ArrayList<Circle> circles)
Packs circles closely together into a circle around the center of the coordinate system using a phyllotactic pattern. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.awt.geom.Rectangle2D.Double boundingBox(java.util.ArrayList<Circle> circles)
circles -
public static Circle boundingCircle(java.util.ArrayList<Circle> circles)
circles -
public static void phyllotacticPack(java.util.ArrayList<Circle> circles)
Phyllotactic patterns occur in nature, for example in the seeds of a sunflower.
In a phyllotactic pattern, the polar coordinates for the nth object
are:
radius = rc * Math.sqrt(i+1), ra = (i+1) * 137.5°Where
rc is the spacing constant, and 137.5° is the angular constant.
The current implementation yields only good results, if all circles are of the same size.
circles - public static void pairPack(java.util.ArrayList<Circle> circles)
The following algorithm is used:
circles -
public static double innerSoddyRadius(double ra,
double rb,
double rc)
ra - Radius of circle Arb - Radius of circle Brc - Radius of circle C
public static double outerSoddyRadius(double ra,
double rb,
double rc)
ra - Radius of circle Arb - Radius of circle Brc - Radius of circle C
public static double circumradius(double ra,
double rb,
double rc)
ra - Radius of circle Arb - Radius of circle Brc - Radius of circle C
public static Circle outerSoddyCircle(Circle circleA,
Circle circleB,
Circle circleC)
circleA - Circle racircleB - Circle rbcircleC - Circle rc
public static void main(java.lang.String[] arg)
|
Copyright 2007-2008 (c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||