Class GoldenRatio
java.lang.Object
org.episteme.social.arts.GoldenRatio
Provides mathematical tools for analyzing compositional proportions, specifically
focusing on the Golden Ratio (phi) and the Fibonacci sequence.
These metrics are frequently used in art history and architectural analysis
to evaluate the aesthetic structure of works.
- Since:
- 1.0
- Version:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic RealanalyzeProportions(List<Real> measurements, Real tolerance) Scans a set of measurements and calculates what fraction of measurement pairs conform to the Golden Ratio.fibonacci(int n) Generates a Fibonacci sequence up to specified number of terms.static RealfibonacciN(int n) Calculates the n-th Fibonacci number using Binet's formula for direct analytical computation.static Real[]goldenRectangle(Real width) Calculates the dimensions of a Golden Rectangle derived from a base width.static Real[]goldenSection(Real totalLength) Divides a total length into two segments according to the Golden Ratio.goldenSpiralRadii(Real initialRadius, int quarterTurns) Generates the radii of a Golden Spiral for a given number of quarter-turns.static booleanisGoldenRatio(Real larger, Real smaller, Real tolerance) Checks if the ratio of two measurements approximates the Golden Ratio within a specified tolerance.
-
Field Details
-
PHI
The Golden Ratio (phi) = (1 + sqrt(5)) / 2 approx 1.6180339887... -
PHI_INVERSE
The inverse of the Golden Ratio (1/phi) approx 0.6180339887...
-
-
Method Details
-
fibonacci
-
fibonacciN
Calculates the n-th Fibonacci number using Binet's formula for direct analytical computation.- Parameters:
n- the position in the sequence- Returns:
- the n-th Fibonacci number as a Real
-
isGoldenRatio
Checks if the ratio of two measurements approximates the Golden Ratio within a specified tolerance.- Parameters:
larger- the larger measurementsmaller- the smaller measurementtolerance- the maximum allowed deviation from phi- Returns:
- true if the ratio matches the Golden Ratio
-
goldenSection
-
goldenSpiralRadii
-
goldenRectangle
-
analyzeProportions
Scans a set of measurements and calculates what fraction of measurement pairs conform to the Golden Ratio.- Parameters:
measurements- list of measured dimensions in an artworktolerance- maximum allowed error- Returns:
- a percentage (0 to 1) of pairs matching the golden proportion
-