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

Gyroid

PreviousFibbonacci and FactorialNextHexagonal Pattern From Image

Last updated 4 years ago

l = 10;
o = 3;
n = 3;
p = Point.ByCoordinates([0,l/2,l,l,l,l-o,l,l/2,0,0,0,o,0,l/2,l/2,l/2,l-o,o,l-o,o],[l,l,l,l-o,l,l/2,0,0,0,o,0,l/2,l,l/2,l-o,o,l-o,o,l/2,l/2],[0,o,0,l/2,l,l,l,l-o,l,l/2,0,0,0,l/2,o,l-o,l/2,l/2,l-o,o]);
a = Arc.ByThreePoints(p[[0..10..2]],p[[1..11..2]],p[[2..12..2]]).SplitByParameter(0.5)[0];
b = Arc.ByThreePoints(p[[1,13,3,13,5,13]],p[14..19],p[[13,7,13,9,13,11]]);
m1 = PolySurface.ByJoinedSurfaces(PolyCurve.ByJoinedCurves([[a[5][1],a[0][0],b[0],b[5]],[a[0][1],a[1][0],b[2],b[0]],[a[1][1],a[2][0],b[4],b[2]],[a[2][1],a[3][0],b[4],b[1]],[a[3][1],a[4][0],b[3],b[1]],[a[4][1],a[5][0],b[5],b[3]]]).Patch());
m2 = PolySurface.ByJoinedSurfaces(List.Flatten([m1,m1.Rotate(Point.Origin(),Vector.ZAxis(),-180).Translate(l,2*l,0)],-1));
m3 = PolySurface.ByJoinedSurfaces(List.Flatten([m2,m2.Mirror(Plane.XY()).Mirror(Plane.YZ()).Translate(0,0,l)],-1));
m4 = PolySurface.ByJoinedSurfaces(List.Flatten([m3,m3.Mirror(Plane.XY()).Rotate(Point.Origin(),Vector.ZAxis(),180).Translate(0,2*l,2*l)],-1));
m5 = PolySurface.ByJoinedSurfaces(List.Flatten(m4.Translate((0..#n..2*l)<1>,(0..#n..2*l)<2>,(0..#n..2*l)<3>),-1));

Gyroid - Equation

[Imperative]
{
	n = 360;
	i = 0.02;
	px = [];
	py = [];
	pz = [];
	x = 0;
	c = 0;
	while (x<n)
	{
		y = 0;
		while(y<n)
		{
			z = 0;
			while(z<n)
			{
				b = (Math.Sin(x)*Math.Cos(y))
				+ (Math.Sin(y)*Math.Cos(z))
				+ (Math.Sin(z)*Math.Cos(x));
				if (Math.Round(b,3) == 0)
				{
					px[c] = x;
					py[c] = y;
					pz[c] = z;
					c = c + 1;
				}
				z = z + i;
			}
			y = y + i;
		}
		x = x + i;
	}
	return = Point.ByCoordinates(px,py,pz);
};
3KB
gyroid-eqn.dyn
8KB
gyroid.dyn