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. Geometry

Boundary Curve

Closed curve connecting random points

PreviousWeaveNextBridging parallel curves

Last updated 4 years ago

//pts = Point.ByCoordinates(Math.RandomList(n)*53,Math.RandomList(n)*70,0);
pts = List.Flatten(Point.ByCoordinates((0..100..10)<1>,(0..100..10)<2>),-1);
def seq(pt:var[])
{
	ct = Point.ByCoordinates(Math.Sum(pt.X)/List.Count(pt),
	Math.Sum(pt.Y)/List.Count(pt));
	qa = Math.Round(Vector.ByTwoPoints(ct,pt).Normalized().
	AngleAboutAxis(Vector.YAxis(),Vector.ZAxis()));
	q1 = List.GroupByKey(List.SortByKey(pt,qa)["sorted list"],
	List.SortByKey(pt,qa)["sorted keys"])["groups"];
	q2 = List.SortByKey(q1<1>,(Point.ByCoordinates(q1.X,q1.Y).
	DistanceTo(ct))<1>)["sorted list"];
	q3 = List.TakeEveryNthItem(q2,2,[1,0]);
	q4 = List.Flatten(List.Transpose([List.FirstItem(q3),List.Reverse(List.LastItem(q3)<1>)]),-1);
	return = q4;
};
pt1 = PolyCurve.ByPoints(seq(pts),true);
7KB
boundaryCurve.dyn