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

Staggered Checkerboard

Pattern of Small and Large Squares

PreviousSkewed SurfaceNextTriangle subdivision

Last updated 4 years ago

bdr = Rectangle.ByWidthLength(50,50).Translate(25,25,0);
s1 = 5;
s2 = 1;
n1 = 12;
n2 = 12;

//Boundary
bdr1 = bdr.Offset(s1/2.1).Length>bdr.Offset(-s1/2.1).Length?bdr.Offset(s1/2.1):bdr.Offset(-s1/2.1);
bdr11 = Polygon.ByPoints(bdr1.Explode().StartPoint);

//Large Squares
pnt11 = Point.ByCoordinates((0..#n1*2..s1),(s2..n1*2));
pnt12 = pnt11.Translate(s1/2,s1/2,0);
pnt13 = pnt12<1>.Translate(0..(-s2*n2),0..(s1-s2)*n2..s1,0);
pnt14 = pnt12<1>.Translate(s2..(s2*n2),-s1..(s1-s2)*-n2..-s1,0);
pnt15 = List.Flatten([pnt13,pnt14],-1);
msk15 = bdr11.ContainmentTest(pnt15);
pnt16 = List.FilterByBoolMask(pnt15,msk15)["in"];
pln16 = Plane.ByOriginNormal(pnt16,Vector.ZAxis());
rec16 = Rectangle.ByWidthLength(pln16,s1,s1);
srf16 = (rec16.Patch()).Intersect(bdr.Patch());
bdr16 = srf16.PerimeterCurves();
srf17 = GeometryColor.ByGeometryColor(srf16,Color.ByARGB(255,255,228,181));

//Small Squares
pnt21 = Point.ByCoordinates((0..#n1*2..s1),(0..n1*2-1));
pnt22 = pnt21.Translate(s2/2,s2/2,0);
pnt23 = pnt22<1>.Translate(0..(-s2*n2),0..(s1-s2)*n2..s1,0);
pnt24 = pnt22<1>.Translate(s2..(s2*n2),-s1..(s1-s2)*-n2..-s1,0);
pnt25 = List.Flatten([pnt23,pnt24],-1);
msk25 = bdr.ContainmentTest(pnt25);
pnt26 = List.FilterByBoolMask(pnt25,msk25)["in"];
pln26 = Plane.ByOriginNormal(pnt26,Vector.ZAxis());
rec26 = Rectangle.ByWidthLength(pln26,s2,s2);
srf26 = (rec26.Patch()).Intersect(bdr.Patch());
bdr26 = srf26.PerimeterCurves();
srf27 = GeometryColor.ByGeometryColor(srf26,Color.ByARGB(255,0,0,255));

srfs = [srf17,srf27];
bdrs = [bdr16,bdr26];
[srfs, bdrs];