DOI : 10.5281/zenodo.20626635
- Open Access

- Authors : Marwa Abd Elkader El-Gendy
- Paper ID : IJERTV15IS051670
- Volume & Issue : Volume 15, Issue 05 , May – 2026
- Published (First Online): 10-06-2026
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License:
This work is licensed under a Creative Commons Attribution 4.0 International License
The Algorithmic Analysis of Hexagonal Pattern Grids – A Case Study in Parametric Design (Cell-like Grid Structures) Using Grasshopper and RhinoScript
Marwa Abd Elkader El-Gendy,
Faculty of Engineering, Architecture Department, Badr University in Cairo (BUC), Cairo, Egypt
Abstract Today, when architects calculate and exercise their thoughts, everything turns into algorithms. Computationthe writing and rewriting of code through simple rulesplays an ever- increasing role in architecture [1]. Advanced computational methods have provided architects with innovative opportunities to explore the geometrical space first revealed by post-seventeenth- century mathematics. This digital evolution has redefined the relationship between science and spatial design [2].
This paper examines the generation and algorithmic analysis of hexagonal pattern grids applied to complex surfaces. Commonly referred to as honeycomb structures, hexagonal grids have become fundamental elements in the generative design community.
The research establishes a parametric design framework structured into two main sections:
A review of various Grasshopper scripts and modeling tools within Rhinoceros.
An analytical exploration of algorithmic techniques for producing hexagonal pattern grids using Grasshopper and RhinoScript.
Three main parametric models of hexagonal grid structures are proposed:
-
Structured Hexagonal Grid Model
-
Modified Hexagonal Grid Model
-
Interactive Hexagonal Grid Model
-
Single attractor point
-
Multiple attractor points
For each model, the study presents a detailed description and discussion of:
-
The applied Grasshopper scripts
-
Strategies and parameters (variables)
-
Model performance and advantages
Keywords Algorithms, Generative Design, Cell Pattern, Genetic Genomes, Rhino, Grasshopper, Computer Simulation.
-
Introduction
Algorithmic thinking supports parametric design by enabling the formulation of rules and relationships that connect design intent with design outcomes. This approach establishes a framework in which the interrelations between elements are utilized to control and inform the generation of complex geometries and structures.
The term parametric originates from mathematics (parametric equations) and refers to the use of variables or parameters that can be modified to influence the final outcome of a system. In design, this means that form and behavior are not static but dynamically responsive to changing parameters.
Closely related is the concept of generative design, which is often considered an extension of parametric design. Generative design operates primarily through two integrated approaches: Object-based geometric population, Parameter-driven geometric generation [3]
-
Grasshopper Codes
The first part of this research presents a compilation and analysis of various Grasshopper codesdeveloped within the Rhinoceros environmentto explore different algorithmic strategies for generating and manipulating hexagonal grids [4].
Grasshopper Codes
Grasshopper Code
Description
1. froGH
A distributed assortment of tools for Grasshopper.
2. Clusterizer
This code groups indexes of connected points into separate clusters
3. Spirograph
This code simulates a spirograph tool.
4. 3D Differential mesh relaxation
The code explores the 3D relaxation of a mesh accomplished by a picture gradient.
5. Vorospace
The code creates a mesh model of all the connections between the centers of the 3D Voronoi cells.
TABLE I. A Collection of Grasshopper Code
Grasshopper Codes
Grasshopper Code
Description
6. 3D Hexagonal Weaving
This code discovers the weaving of a polygon grid.
7. Hexachaos.
Pattern generator for Random Hexagonal
8. Attractors vector deformation.
The code deals with a complex structure of radiolaria and dealt with it as a two-dimensional illustration with a hexagonal pattern.
9. Mesh faces by deviation angle
The code selects adjacent mesh faces by the angle of deviation.
10. Erwin Hauers Box Morph
The code creates the Box Morph to get the continual surfaces using meshes.
11. ASCII art generator
This code uses any image to form art image
12. Koch Snowflake [Hoopsnake]
This code creates a 2D fractal Snowflake
13. Gradient Descent Algorithm
a Gradient algorithm rule will be created on a surface generated.
14. Math surfaces
The code gives the architect different math surfaces.
-
Structured Hexagonal Grid Model
-
Introdction
This model introduces the simple mathematic concept to introduce the hexagonal pattern grid on any given surface such as the honeycombs.
In the generative design, a hexagonal shape becomes popular to use it in different design solutions. (Fig.1)
Fig. 1. Structure Hexagonal Grid Model
-
Grasshopper Code
In this structured grid, we can use Hexagon Cells in Lunch Box Plug-In (Fig.2)
Fig. 2. Hexagonal Cells on surface icon
-
Grasshopper Script Steps:
The starting phase of the structured grid model is making the polygon grid; design steps:
Step one Setup Grid Base
The first step in drawing hexagonal cell structure using a polygon Grid of points.
For drawing the basic structure, we will use the Hexagonal Grid component. (Fig.3)
Fig. 3. Hexagonal Grid Component
-
Step Two Numeric Sliders
Putting the numbers sliders for the values of
-
Cell Radius.
-
Numbers of cells.
-
Cell Size. (Fig.4)
-
Fig. 4. Grasshopper variables
-
-
Grasshopper Script Variables:
-
Cell Size.
-
Cells X.
-
Cells Y.
-
Cell Center Points. (Fig.5)
Fig. 5. Structure Hexagonal Grid Model Script
-
-
The Advantages of Structured Grid Model
-
Accurate and simple to execute.
-
Parametri model can be easily handled and immediately actualized.
-
TABLE II. Structure Hexagonal Grid Model Analysis
Structure Grid Model
Grasshopper Code
Grid Shape
Grid Variables
The Hexagonal Grid Component
Organized Hexagonal Grid of points
Cell Size
Cell X
Cell Y
Cell Center Points
-
-
Modified Hexagonal Grid Model
-
Introduction
This modified Structure Model Grid introduces the concept of scaling objects and introduces the vital idea of a Random variety generator. Randomness is a vital concept in several contemporary design expressions.
-
Grasshopper Code
Random Hexagonal Based Pattern Generation (Fig.6)
Fig. 6. Random Hexagonal Generation
-
Grasshopper Script Steps:
This script also has four basic steps.
– Step One Setup Basic Structuring System To start this modified model, well use first a Hexagonal Grid of points. We will use the previous grid in (Fig. 7).
The P output on the Hex Grid component does not output the corner points of the cells, but the center points. (Fig. 8)
Fig. 7. Hexagonal Base
Fig. 8. Hexagonal Grid Component
– Step Two Draw Polygons
There are several ways that could be used to draw a polygon in Grasshopper, but the common method is to use the center point and the radius of the polygon. The radius doesnt need to be that exact at this point, meanwhile we will scale the polygons up and down after this step. (Fig. 9)
Fig. 9. Draw Polygon
Fig. 10. polygon centers in the script
– Step Three Setup Random Number Generator
The polygons will be scaled to support a variety of scale factors. A random number generator can turn out.
A Random Number Generator continually has three essential components:
-
A domain is a mathematical term for a variety of numbers contains a beginning value and an ending value. For the scale factors, we need to scale some polygons up (factor larger than 1) and a few polygons down (factor less than 1). An appropriate vary to realize the results above could be 0.25 because the beginning of the domain and 1.4 as the end.
-
The second is the variety of random numbers (N) adding random generator to a List Length element that measures what number items there are.
-
The third element is that the random variety seed. Sliding this can reset the list of random numbers to a different random number list. (Fig. 11)
Fig. 11. The polygon centers and area
– Step Four Scale the Polygons
Finally, the researcher put scale factors into the Scale
component and color the polygons (Fig. 12)
Fig. 12. Modified Structure Grid
Fig. 13. Colored Modified Structure Grid Model
-
-
Grasshopper Script Variables:
-
Polygon Radius.
-
A Random Number Generator.
-
Start Domain.
-
End Domain.
-
The Random Number Speed (Fig.14).
-
-
The Advantages of Modified Structure Grid:
Fig. 14. – Grasshopper Sckript
-Changing the data structures, the domain or vary of scale factors and therefore the random variety seed can provide many variations.
-
The variations are in theory infinite however, they give the impression of being typically similar.
-
Randomness and dominant randomness are two essential ideas in complex form-making systems.
-
The varying of scale factors is controlled.
TABLE III. Modified Structure Grid Model Analysis
Modified Structure Grid Model
Grasshopper Code
Grid Shape
Grid Variables
Random Hexagonal Based Pattern Generation
Scaled Hexagonal Grid of points
Polygon Radious
Polygon number
generator
The random number speed
Start domain
End domain
-
-
Interactive Hexagonal Grid Model:
-
-
Introduction
In Grasshopper, points of attractors are acting like computer generated magnets.
Attractors can affect a different number of parameters of surrounding objects including scale, pivot, shading, and position. The relationship between the attractor and geometry change the parameters.
The Model is a grid of points to generate a set of polygons on them. The grid has a point called attractor each polygon responds to the attractor by the change in its distance. (Fig.15)
Fig. 15. Interactive Grid
-
Grasshopper Code
Attractors vector deformation. (Fig.16)
Fig. 16. Attractors Vector Deformation
-
Grasshopper Script Steps:
This script has four basic steps:
-
Step One Setup Basic Structuring System Starting with step one (Fig.17) and step two (Fig. 18) for the previous scripts to get the polygon structure.
Fig. 17. Step One Hexagonal base
Fig. 18. Step Two scale hexagonal
-
Step Two Distance and Divide component
The slider divides the distance to fit the scale of the grid. (Fig. 19)
Fig. 19. Distance and divide component in the GH Script
– Step Three Point Attractor
Finally, connect the point attractor with the distance component. (Fig. 21)
Fig. 20. Point Attractor Position 1
Fig. 21. Point Attractor Position 2
Fig. 22. Two Point Attractor
Fig. 23. Grasshopper Script
-
-
Grasshopper Script Variables:
Polygon Radius. Cell Center Point.
The point control the maximum radius value of the polygons. (Fig.23).
-
The Advantages of Interactive Structured Grid Model:
The algorithm in this grid based on the relation’ between attractor and the polygons defined by their distance and this relation gives the designer more control.
|
Interactive Structure Grid Model |
||
|
Grasshopper Code |
Grid Shape |
Grid Variables |
|
Attractors vector deformation |
Interactive Hexagonal Grid of points |
Polygon Radious |
|
Point Attractor |
||
|
Distance |
||
|
Start domain |
||
|
End domain |
||
TABLE IV. Interactive Structure Grid Model Analysis
response to the attractor by the change in its distance. The main parametric variables were:
-
Cell Center Point.
-
The Radius (R).
-
The attractor point controls the maximum radius value of the polygons.
Declarations
Ethics Approval and Consent to Participate
Ethics approval was not required for this study, as it does not involve human participants, animals, or any personal or sensitive data.
Consent for Publication
Conclusion:
The paper starts an algorithmic analysis by producing different mathematical models of the Hexagonal Grid Patten by using Grasshopper and Rhino Computer Prgrams. The paper gets different types of the grid of the same structure grid and previews the infinite use of this new application to control the grid structure model by using different GH codes.
In this paper three parametric models described:
-
Structured Hexagonal Grid Model:
The structured grid model based on regular grids. The main parametric variables were:
-
-
Cell Size.
-
Number of Cells.
-
Centers of Cells.
Structured grids have advantages of easy implantation by generating hexagon elements.
-
Modified Structured Hexagonal Grid model
The modified structured grid model used scaling objects and introduced the important concept of a random number generator and the way to control randomness. The main parametric variables were:
-
-
Polygon Radius
-
A Random Number Generator.
-
Start Domain.
-
End Domain.
-
The Random Number Speed.
-
Interactive Structured Hexagonal Grid model
The Interactive Structured grid model depend on the relation between a set of polygons and a point called attractor each
Not applicable.
Availability of Data and Materials
All data generated or analyzed during this study are included in this published article. The Grasshopper scripts and parametric workflows described are based on standard tools and publicly available methodologies.
Funding
The author declares that no funding was received for this research.
Competing Interests
The author declares that she has no competing interests.
Authors Contributions
The author was solely responsible for the conceptualization, methodology, algorithmic development, analysis, visualization, and writing of the manuscript.
Acknowledgments
The author would like to express sincere gratitude to her supervisors for their academic guidance and support.
Special thanks are extended to her family for their continuous encouragement throughout the research process.
References
-
B. Jane, B. Mark, The New Mathematics of Architecture,
Thames & Hudson,2010
-
G Holland, J., Hidden Order: How Adaptation Builds Complexity. New York. Basic Books,1996
-
K. Terzidis , Algorithmic Architecture, Elsevier Ltd., USA,2006.
-
http://www.co-de-it.com/wordpress/code/grasshopper- code (Accessed 3/2017)
-
E.Prousalidou, and H. Sean, ,A parametric presentation of ruled surfaces, CAAD Futures `07, The Netherlands,2007,
pp. 265-278,.
-
A. Payne, and R. Issa, , The Grasshopper primer, second edition, Robert McNneel & Associates,2009, North America.
