Testing Waters
  • Scrapbook
  • Projects
    • Bamiyan Cultural Center
    • Bauhaus Museum
    • Better Hebbal
    • Bicycle Station
    • Cross Laminated Timber
    • Facade
    • Flowing Fabrication
    • Form from Images
    • Guggenheim Helsinki
    • National War Museum
    • National War Memorial
    • Indflorescence
    • Rectangular Compartments
    • Retail Space Layout
    • Noise Barrier : Swedevia Airport
    • Walden
    • Wilson Garden
  • Patterns
    • Area Graph
    • Array along Curve
    • Fibbonacci and Factorial
    • Gyroid
    • Hexagonal Pattern From Image
    • Hexagonal Grid
    • Koch Star
    • Mandelbrot Set
    • Pattern
    • Pattern
    • Pattern
    • Phyllotaxis
    • Random Strip Widths
    • Skewed Surface
    • Staggered Checkerboard
    • Triangle subdivision
    • Vector Field
    • Voronoi
    • Waves
    • Weave
  • Geometry
    • Boundary Curve
    • Bridging parallel curves
    • British Museum Great Court
    • Catenary
    • Delete Adjacent
    • Geodesic Sphere
    • Group Branching Curves
    • Group Circles
    • Group curves
    • K Mean
    • Nurbs Surface Irregular
    • Overlapping Petals
    • Pair Nearest
    • Parametric Shapes
    • Platonic Solids
    • Polyline to PolyArc
    • Roman Surface
    • Sagrada Familia Schools Roof
    • Sine Curve
    • Sine Ribbon
    • Spherical Transformations
    • Split Rectangle
    • Tangential Circle through Point
    • Travelling Salesman Problem
    • Unaligned Bounding Box
  • Lists
    • Alter by Boolean Sequence
    • Color by distance
    • Consecutive Points
    • Distancing
    • Divide Equally
    • Geometry from Image
    • Image based Point Density
    • Isovists
    • Reduce Color Palette
    • Replace Consecutive
    • Replace Multiple
    • Replace Recurring
    • Shadow Area
    • Shortest Path
    • Solar Analysis
    • Topography Analysis
  • Motion
    • Adjacency
    • Animate Sphere
    • Cellular Automation
    • Cloth
    • Hypotrochoid
    • Manakin
    • Rolling Spiral
    • Tan Curve
    • Trammel of Archemedes
    • Image to Integer
  • Articles
    • A Conceptual Approach to Integrating Computational Methods in Early Stage Design
    • Design Script's ambiguous and versatile Replication Guides <1>
    • Design Script's ambiguous and versatile Replication Guides <2>
Powered by GitBook
On this page
  1. Patterns

Area Graph

Subdivide a Rectangle proportionately based on a list of numbers

PreviousWilson GardenNextArray along Curve

Last updated 4 years ago

sq01 = Math.Sqrt(Math.Sum(a));
sq02 = sq01 % Math.Floor(sq01);
sq03 = 1+sq02/Math.Floor(sq01);
sq04 = Rectangle.ByWidthLength(sq03,sq03);
sq05 = sq04.Translate(Vector.YAxis(),0..#Math.Floor(sq01)..sq03);
sq06 = sq05<1>.Translate(Vector.XAxis(),0..#Math.Floor(sq01)..sq03);
sq07 = List.TakeEveryNthItem(sq06,2,1);
sq08 = List.Reverse(List.TakeEveryNthItem(sq06,2,0)<1>);
sq09 = List.Clean(Flatten(List.Transpose({sq07,sq08})),false);
ct01 = Math.Pow(Math.Floor(sq01),2);
ct02 = Math.Round(a/(Math.Sum(a)/ct01));
ct03 = List.ReplaceItemAtIndex(ct02,-1,List.LastItem(ct02)+(ct01-Math.Sum(ct02)));
sq10 = PolySurface.ByJoinedSurfaces(List.Chop(sq09,ct03).Patch());
clr1 = List.Chop(Math.Floor(Math.RemapRange(Math.RandomList(List.Count(sq10)*3),10,255)),List.Count(sq10));
clr2 = Display.ByGeometryColor(sq10,Color.ByARGB(255,clr1[0],clr1[1],clr1[2]));
5KB
AreaGraph.dyn