Fractune FIELD INSTRUMENT FOR iOS

Why some spaces
feel like home.

The science of architectural fluence, and what your buildings are saying.

Your brain expects structure.

Your visual system is a prediction machine. Every moment, it anticipates the next shape, the next rhythm, the next colour transition. Natural environments, trees, clouds, coastlines, carry the kind of statistical regularity your brain processes effortlessly.

When a building shares those regularities, something clicks. You feel calm, engaged, at ease. When it doesn't, something feels off. Not wrong, exactly. Just harder to be in.

This isn't a metaphor. It's measurable across four dimensions: fractal complexity, rhythm, colour, and structure.

The F-value.

Architectural Fluency, F, is a single number between 0 and 1 that captures how visually fluent a facade is overall. It's a weighted composite of four dimensions, each with its own perceptual sweet spot. By construction, no one dimension can dominate the score, so a uniformly repetitive surface (a tile roof, plain brickwork) cannot score high simply by carrying many edges.

Monotone
Sweet spot
Near chaos
0.0 0.55 0.75 1.0
Plain glass wall Coherent, fluent composition Visually overwhelming

Empirical work by Stamps (2000) found that surface complexity is the strongest single predictor of facade preference (β = 0.72). Spehar & Taylor's research on fractal aesthetics shows a robust peak in human preference at intermediate amplitude-spectrum slopes (β ≈ 1.2). And Vartanian's fMRI studies confirm that well-composed architectural rooms drive measurable activity in reward-related cortical areas. F brings these strands into one per-facade reading.

The headline F is calibrated against Ostwald & Vaughan's measurements across 85 canonical buildings. Their average fractal dimension was D = 1.41, which contributes to the high end of the fractal sub-score; combined with their typical balance, rhythm, and colour structure, those buildings cluster in the F sweet spot 0.55–0.75.

How F is composed

F is a weighted sum of four dimension scores, each itself an inverted-U function peaking at its own sweet spot:

  • F_fractal (weight 0.30), D moderated by lacunarity (Λ) and edge-orientation entropy (Hθ). Penalises uniform repetitive textures.
  • F_rhythm (weight 0.25), autocorrelation peak strength (R), spectral slope (β), fenestration regularity (Rw).
  • F_chromatic (weight 0.20), palette coherence (C, see below) and value contrast (Δ_L).
  • F_structure (weight 0.25), visual balance (B), hierarchical scaling (Σ_h), solid/void ratio (V), curvature ratio (κ).

The weights are empirical initial estimates and can be calibrated against reference facades.

Confidence and quality

F is annotated with a confidence score in [0, 1] derived from image quality (exposure, focus, edge energy, coverage) and perspective severity:

  • Quality ≥ 0.55, perspective ok: confidence = 1.0, F shown plainly.
  • Mild perspective skew: confidence × 0.85.
  • Severe skew: confidence × 0.50, F shown with "?".
  • Critical quality issue: confidence × 0.60.

The pipeline does not block on poor input, it produces F with a clear uncertainty marker so the reader knows how much to trust the reading.

Four dimensions.

F is built from four sub-scores, each grounded in a separate strand of empirical research. A facade can be strong on some dimensions and weak on others, and the breakdown often tells you more than the headline.

Fractal complexity

How rich the facade is across scales. A glass curtain wall has very little detail; a Gothic cathedral has detail at five or six different magnifications. Built on the classical fractal dimension D, but modulated by lacunarity Λ (how clumped the detail is) and edge-orientation entropy Hθ (how many directions edges point in). This is what catches the tile-roof problem: high D, but low Λ and low Hθ, so F_fractal correctly stays low.

How D, Λ, Hθ, κ are measured
  1. Edge detection. Canny pipeline: 5×5 Gaussian blur, Sobel gradients, non-maximum suppression, Otsu threshold, hysteretic thresholding.
  2. Box-counting. Boxes from ¼ image size down to 2px, at 12 systematically offset grid positions per scale (Karperien 2013, FracLac).
  3. D = slope of log(count) vs. log(1/box_size). R² reports goodness-of-fit. Robust median across 9 sensitivity thresholds, with stability score 1–5.
  4. Λ (lacunarity) = 1 + σ²/μ² of pixel-density distribution at each scale (Allain & Cloitre 1991). Distinguishes textures with the same D.
  5. Hθ = Shannon entropy of gradient orientations over 18 bins (10° each), only counting pixels with Sobel magnitude above 30. Stanischewski et al. (2020) found Hθ alone explains ~50% of variance in facade preference.
  6. κ (curvature ratio) = fraction of edge pixels with local direction-change above 15° to a 4-neighbour. Vartanian et al. (2013) showed curvilinear architectural rooms drive stronger anterior cingulate activity than rectilinear ones.

Rhythm

How clearly the facade carries repeating patterns, window rows, colonnades, courses of brick. Both too little rhythm (random) and too much (robotic) lower preference; the sweet spot is moderate. Computed from 2D autocorrelation peaks (R), spectral slope (β, peaking at the 1/f1.2 distribution Spehar found preferred), and fenestration regularity (Rw) when windows can be detected.

How R, β, Rw are measured
  • 2D FFT. Image is Hann-windowed, resampled to 256×256, transformed via Apple Accelerate's vDSP_fft2d_zip. Power spectrum |F|² is radially averaged.
  • β (spectral slope) = slope of log–log fit on radial spectrum within frequency range 4–40% of Nyquist. Natural scenes ≈ 1.2 (van der Schaaf & van Hateren 1996); tile roofs typically > 2.
  • R (rhythm strength) = peak height in 2D autocorrelation (computed via Wiener–Khinchin: IFFT of |F|²) along horizontal and vertical axes. Combined as geometric mean.
  • Rw (fenestration regularity) = 1 − coefficient of variation of inter-window distances after projecting blob centroids on x and y axes. Windows detected via connected components on Otsu-thresholded L* channel; reported as nil when fewer than 4 plausible windows are found.

Colour

How harmonious the palette is, plus how naturalistic and how much luminance contrast it carries. Built on the existing Chromatic Fluence C value plus a value-contrast term Δ_L. Evolutionary biologists like Joye argue our colour preferences are biophilic , calibrated to natural scene statistics, and Stamps' empirical regression confirms colour structure is a measurable preference driver alongside geometric complexity.

How C and Δ_L are measured
  • Hc (chromatic entropy): Shannon entropy of hue distribution in CIELAB, quantised to 36 bins (10°). Normalised 0–1.
  • K (palette coherence): adaptive k-means (4–8 clusters) in CIELAB. Angular distribution scored against analogous, complementary, triadic harmonic schemes; chaotic if none match.
  • E (ecological deviation): distance in a*b* space from a natural-scene reference (Long & Purves 2003), modulated by chroma spread.
  • C = 0.35 × Hc_score + 0.35 × K + 0.30 × (1 − E).
  • Δ_L = standard deviation of CIELAB lightness L*, normalised by 30. Captures shadow/highlight composition that pure hue analysis misses.

F_chromatic = 0.70 × C + 0.30 × value-contrast-score.

Structure

The compositional bones of the facade: visual balance B, hierarchical scaling Σ_h (Salingaros' "hierarchical cooperation": good architecture shows detail at multiple scales, related by 2–4× ratios), solid/void ratio V (window-to-wall proportion), and curvature κ. Stamps' empirical weight of β = 0.72 for surface complexity makes B and Σ_h the heaviest terms here.

How B, Σ_h, V are measured
  • B (visual balance) = 1 − distance(visual-centroid, geometric-centre) / (½·diagonal). Visual centroid is Sobel-magnitude-weighted. Bounding box from segmentation mask when present (Arnheim 1974; Wilson & Chatterjee 2005).
  • Σ_h (hierarchical scaling) = combined count + log-spread of "active" scale bands (D > 1.1) in the multi-scale D profile. High when detail is present at three or more well-separated scales.
  • V (solid/void) = fraction of pixels below Otsu-threshold of L* histogram inside the facade mask. Approximate but parameter-free; captures aperture proportion. Sweet spot ≈ 0.30 per Stamps' regression.

What the numbers mean.

MetricWhat it tells you
FArchitectural Fluency. Sweet spot: 0.55–0.75.
F_fractalFractal complexity sub-score (0–1). Built on D, modulated by Λ and Hθ.
F_rhythmRhythm sub-score (0–1). From R, β, Rw.
F_chromaticColour sub-score (0–1). C plus value-contrast term.
F_structureStructural composition sub-score (0–1). B, Σ_h, V, κ.
ConfidenceHow much to trust F (0–1). Lower with bad quality or perspective skew.
DFractal dimension. Geometric complexity. Sweet spot: 1.3–1.5.
CChromatic Fluence. Higher = more balanced palette.
ΛLacunarity. How evenly the detail is distributed. Low = uniform.
HθEdge-orientation entropy. How many directions edges point in.
κCurvature ratio. Fraction of edges that bend rather than run straight.
βSpectral slope. Natural scenes ≈ 1.2; tile roofs > 2.
R, RwRhythm strength and fenestration regularity.
B, Σ_h, VVisual balance, hierarchical scaling, solid/void ratio.
StabilityHow consistent D is across sensitivity levels. 5 = rock solid.
How well the box-counting fits a true fractal. Above 0.99 is excellent.

For researchers.

Full methodology, output fields, and citation guidelines.

Complete edge detection pipeline

Input is scaled to max 800px. Contrast is normalised via histogram equalisation on the luminance channel.

Canny pipeline (5 stages):

  1. Gaussian blur (5×5 kernel)
  2. Sobel gradient computation (horizontal + vertical)
  3. Non-maximum suppression
  4. Automatic threshold via Otsu's method
  5. Hysteretic thresholding (dual threshold)
Box-counting and regression
  • Box sizes: ¼ of image dimension down to 2px, divided by factor 1.5
  • 12 systematically offset grid positions per scale (Karperien 2013)
  • Count: boxes containing ≥1 edge pixel, averaged across offsets
  • D = slope of log-log regression (log(count) vs. log(1/box_size))
  • R² reported as goodness-of-fit
Multi-threshold analysis
  • 9 sensitivity levels (0.5–2.5 × Otsu threshold)
  • Plateau detection: sliding window (width 5) identifies most stable region
  • Final D = median of plateau values
  • Stability (1–5): based on total variation across all 9 thresholds
Lacunarity and multi-scale profile
  • Λ = 1 + σ²/μ² across 12 grid offsets, per box size. Reported: mean across all sizes.
  • Multi-scale D profile: local D in sliding window of 3 box sizes. Classified as Large (≥8%), Medium (2–8%), Fine (<2%).
Chromatic fluence formulas
  • Hc: Shannon entropy over 36 hue bins (10°) in CIELAB. Normalised 0–1.
  • K: k-means (5–8 clusters) in CIELAB. Angular hue distribution scored 0–1 against nearest harmonic scheme.
  • E: Wasserstein distance in a*b* space vs. Long & Purves (2003) natural reference.
  • C = 0.35 × Hc_score + 0.35 × K + 0.30 × (1 − E)

Hc_score maps entropy to 0–1 with sweet spot at moderate entropy. Weighting is preliminary; calibration against perceptual data is ongoing.

Quality assessment and perspective detection

Quality score computed from:

  • Coverage: proportion of image containing edges
  • Clipping: over/underexposure detection
  • Contrast: luminance range
  • Edge energy: signal-to-noise in gradient domain

Issues classified as critical (unreliable) or warnings (suboptimal).

Perspective skew is detected by a Hough-style search for vertical lines. Per-line convergence angles are estimated from top-vs-bottom x-coordinates; severity is reported as ok (< 1°), mild (1–3°), or severe (≥ 3°). Severe skew is propagated to the F-confidence multiplier so users see "?" when rhythm and symmetry measurements become unreliable.

Architectural Fluency composition

F = wfractal·F_fractal + wrhythm·F_rhythm + wchromatic·F_chromatic + wstructure·F_structure

Default weights: 0.30 / 0.25 / 0.20 / 0.25. Each sub-score is an inverted-U function peaking at its own sweet spot, so high values on a single dimension cannot dominate F.

  • F_fractal peaks near D = 1.4, modulated downward when Λ < 0.30 and Hθ < 0.30 (uniform-texture penalty).
  • F_rhythm blends the rhythm strength score (sweet spot 0.4–0.7), the β-fit score (peak at β = 1.2, weighted by R²), and the optional fenestration regularity.
  • F_chromatic = 0.70 × C + 0.30 × value-contrast-score (peak at moderate Δ_L).
  • F_structure = 0.35 × B + 0.30 × Σ_h + 0.25 × V_score (peak at V ≈ 0.30) + 0.10 × κ_score.

F-confidence = quality.score × perspective_factor × critical_issue_factor, clamped to [0, 1]. F is flagged uncertain when confidence < 0.7.

Output field reference
FieldTypeDescription
FFloatArchitectural Fluency (composite)
F_fractalFloatFractal sub-score (0–1)
F_rhythmFloatRhythm sub-score (0–1)
F_chromaticFloatChromatic sub-score (0–1)
F_structureFloatStructure sub-score (0–1)
F_confidenceFloatF reliability (0–1)
DFloatFractal dimension (robust median)
FloatBox-counting regression goodness-of-fit
σFloatStd. deviation of D across thresholds
ΛFloatMean lacunarity
HθFloatEdge-orientation entropy (0–1)
κFloatCurvature ratio (0–1)
Δ_LFloatValue contrast (normalised L* std)
BFloatVisual balance (0–1)
Σ_hFloatHierarchical scaling (0–1)
VFloatSolid/void ratio
β, R²βFloatSpectral slope and fit quality
Rh, RvFloatHorizontal and vertical rhythm strengths
RwFloat?Fenestration regularity (nullable)
stabilityIntD consistency (1–5)
CFloatComposite chromatic fluence
HcFloatNormalised chromatic entropy
KFloatPalette coherence
EFloatEcological deviation
harmonyTypeStringPalette harmony type
qualityScoreFloatImage quality (0–1)
perspectiveSeverityStringok / mild / severe
Limitations and reproducibility

Limitations

  • Input capped at 800 px (mobile constraint).
  • Perspective is detected and propagated to F-confidence, but not corrected. Severe keystone skew should be re-shot perpendicular to the facade.
  • Window detection for Rw is heuristic (Otsu threshold + connected components); sun shadows or very dark materials can be misread as openings.
  • Chromatic analysis assumes daylight; artificial lighting may skew the ecological-deviation term.
  • F sub-score weights (0.30 / 0.25 / 0.20 / 0.25) and individual sweet spots are empirical initial estimates, calibrated against a small reference set; broader perceptual calibration is ongoing.
  • The headline F replaces D as the primary metric, but D, C, Λ, Hθ, κ, Δ_L, B, Σ_h, V, β, Rh, Rv, Rw are all preserved in the output for independent analysis.

Reproducibility

  • Fully deterministic, no random seeds.
  • 2D FFT runs on Apple Accelerate (vDSP); the rest of the pipeline is pure Swift.
  • Results may vary between app versions; appVersion and modelVersion are recorded per analysis. Older records that pre-date Sprint 7 carry only D and C, the website tolerates this and falls back gracefully.
References

Fractal complexity

  1. Mandelbrot, B.B. (1982). The Fractal Geometry of Nature. W. H. Freeman.
  2. Ostwald, M.J. & Vaughan, J. (2016). The Fractal Dimension of Architecture. Birkhäuser.
  3. Spehar, B., Clifford, C.W.G., Newell, B.R. & Taylor, R.P. (2003). Universal aesthetic of fractals. Computers & Graphics, 27(5), 813–820.
  4. Spehar, B., Walker, N. & Taylor, R.P. (2016). Taxonomy of individual variations in aesthetic responses to fractal patterns. Frontiers in Human Neuroscience, 10, 350.
  5. Taylor, R.P. et al. (2005). Perceptual and physiological responses to fractal patterns. Nonlinear Dynamics, Psychology, and Life Sciences, 9(1), 89–114.
  6. Allain, C. & Cloitre, M. (1991). Characterizing the lacunarity of random and deterministic fractal sets. Physical Review A, 44(6), 3552–3558.
  7. Karperien, A. (2013). FracLac for ImageJ. Charles Sturt University.

Edge orientation, curvature, structure

  1. Stanischewski, S., Altmann, C.S., Brachmann, A. & Redies, C. (2020). Aesthetic perception of line patterns: Effect of edge-orientation entropy and curvilinear shape. i-Perception, 11(5).
  2. Brachmann, A. & Redies, C. (2017). High entropy of edge orientations characterizes visual artworks from diverse cultural backgrounds. Vision Research, 133, 130–144.
  3. Redies, C. (2015). Combining universal beauty and cultural context in a unifying model of visual aesthetic experience. Frontiers in Human Neuroscience, 9, 218.
  4. Vartanian, O. et al. (2013). Impact of contour on aesthetic judgments and approach-avoidance decisions in architecture. PNAS, 110(Suppl 2), 10446–10453.
  5. Bar, M. & Neta, M. (2006). Humans prefer curved visual objects. Psychological Science, 17(8), 645–648.
  6. Arnheim, R. (1974). Art and Visual Perception: A Psychology of the Creative Eye. University of California Press.
  7. Wilson, A. & Chatterjee, A. (2005). The assessment of preference for balance: Introducing a new test. Empirical Studies of the Arts, 23(2), 165–180.
  8. Salingaros, N.A. (2006). A Theory of Architecture. Umbau-Verlag.
  9. Stamps, A.E. (1999). Sex, complexity, and preferences for residential facades. Perceptual and Motor Skills, 88(3c), 1301–1312.
  10. Stamps, A.E. (2000). Psychology and the Aesthetics of the Built Environment. Springer.

Spectral and rhythm

  1. van der Schaaf, A. & van Hateren, J.H. (1996). Modelling the power spectra of natural images: Statistics and information. Vision Research, 36(17), 2759–2770.
  2. Field, D.J. (1987). Relations between the statistics of natural images and the response properties of cortical cells. Journal of the Optical Society of America A, 4(12), 2379–2394.
  3. Penacchio, O. & Wilkins, A.J. (2015). Visual discomfort and the spatial distribution of Fourier energy. Vision Research, 108, 1–8.
  4. Liu, Y. et al. (2010). Computational Symmetry in Computer Vision and Computer Graphics. Now Publishers.

Colour and naturalness

  1. Joye, Y. (2007). Architectural lessons from environmental psychology: The case of biophilic architecture. Review of General Psychology, 11(4), 305–328.
  2. Long, F. & Purves, D. (2003). Natural scene statistics as the universal basis of color context effects. PNAS, 100(25), 15190–15193.
  3. Palmer, S.E. & Schloss, K.B. (2010). An ecological valence theory of human color preferences. PNAS, 107(19), 8877–8882.
  4. Schloss, K.B. (2024). Color preferences and color harmony. Annual Review of Vision Science, 10, 323–349.
  5. Itten, J. (1970). The Elements of Color. Van Nostrand Reinhold.
  6. Albers, J. (1963). Interaction of Color. Yale University Press.

Architecture and the brain

  1. Coburn, A., Vartanian, O. & Chatterjee, A. (2017). Buildings, beauty, and the brain: A neuroscience of architectural experience. Journal of Cognitive Neuroscience, 29(9), 1521–1531.
  2. Salingaros, N.A. (2012). Fractal art and architecture reduce physiological stress. Journal of Biourbanism, 2(2), 11–28.
  3. Alexander, C. (2002). The Nature of Order, Book 1: The Phenomenon of Life. Center for Environmental Structure.
  4. Huynh, D.C. et al. (2026). Moving beyond environmental categories in environmental psychology. Journal of Environmental Psychology, 111, 103016.

Image processing

  1. Canny, J. (1986). A computational approach to edge detection. IEEE TPAMI, 8(6), 679–698.
  2. Otsu, N. (1979). A threshold selection method from gray-level histograms. IEEE Trans. Systems, Man, and Cybernetics, 9(1), 62–66.
  3. Hartley, R. & Zisserman, A. (2004). Multiple View Geometry in Computer Vision, 2nd ed. Cambridge University Press.

Cite this work

Fractune (2026). Architectural Fluency Analysis.
https://fractune.dk/science