C# Sine, Cosine in Hyperbolic Paraboloid

I have created a surface as a Hyperbolic Paraboloid.
I want to create a grid of hexagonal meshes on it.
I have the grid of centerpoint of the hexagon (by subdividing the Domain on the surface).
Now I need to find the rest of the vertices.
In a planar grid I would do:

for (int k = 0; k < 6; k++)
{

``````      double xCoord = centerpoint.X + Math.Cos(Math.PI / 3 * k) * widthOfPanel / 2;
double yCoord = centerpoint.Y + Math.Sin(Math.PI / 3 * k) * lengthOfPanel / 2;

Point3d vertex = grid.PointOnSurface(xCoord, yCoord);
``````

//grid.PointOnSurface is a combo of ClosestPoint & PointAt

``````      m.Vertices.Add(vertex);
}
``````

Obviously that doesnâ€™t work on this surface. I have tried with Cosh and Sinh, but that does not seem to be the way, unless I did not use it correctlyâ€¦

If you could enlighhten me on how to find the hexagon meshes I would very much appriciate it!

First things first:

Divide the Surface (or the underlying Surface of a BrepFace) in u/v (and get obviously a Tree) and mastermind a way to sample the div pts in â€śhex Listsâ€ť (so to speak) - either half (4 pts) or full (6 pts). Itâ€™s rather easy: do first a sketch of some sort and play with even/odd item indices and even/odd branch path indices. This becomes a bit tricky if your Surface is closed in u/v (but is also easy) and/or you have to deal with BrepFaces.

Then the center of a given â€śhex Listâ€ť is easy to find (or better use the corresponding div point like in these sceenshots [case â€śsimilarâ€ť with what you want plus the hex module â€śholesâ€ť are controlled via an attractors List - push/pull etc]).

BTW: Always post your stuff if is assosiated with a question. NEVER describe an issue in some abstract way because nobody â€¦ blah, blah,

BTW: Given the hexPoints Tree this is how to cut the mustard (Note: surface NOT singular in u/v AND NOT closed in u/v)

2 Likes

Thank you! That is exacltly what I want to achieve! But I donâ€™t understand how did you make those hexPolylines? I have the centroids and I wanted to find a way to find the vertices of a hexagon from each centroid so that I can divide the surface.

(the mesh is not finished, I was checking the created Example.gh (63.1 KB) points)

Also, I realize the way I did it is messy, sorry about the headache

Well â€¦ thatâ€™s the challenge for you: as I said youâ€™ll only need an A4 + a pencil + Huan Valdez espresso (go for the best) and some brainstorming given a grid of points (i.e. classic division u/v pts on a Surface/BrepFace). Think: given that grid (i.e. a single dimension DataTree) what are the rules for sampling the points into hex combos? (and hex centroids). And what happens if the Surface is closed in u or v? (or both). That said sample the points in a nullable DataTree of type <Point3d?> (general case: BrepFace).

Try to do it (itâ€™s the start for creating any pattern you want) and if you fail â€¦ well â€¦ Iâ€™ll see what can I do, he he.

In the mean time get the trad update:

BTW: are you in fact after a truss (of a classic W type) that acts as some sort of envelope and where some inner/outer layer defines the hexagons as â€śroofâ€ť modules??? If so â€¦ well â€¦ in real-life this requires connectivity trees and some other stuff related with actual members clash events checks etc etc.

Kinda the truss in the image below (that thing is on purporse wrong in places - is a mini challenge for my people in the practice):

Or these (correct using strictly internal stuff):

2 Likes

PS: I expect you to surprise me.

Do (a) a thingy that divides a Surface/BrepFace and (b) a thingy that does 10 (or 50) patterns:

Public DT is the pts division in U/V Tree (on Lists, meaning 2 dimensions) , GetFDC gets the first dim count (as many as the Surfaces) and GetSDC gets the sec dim [real-life variable divisions according the Surface sizes]. Public Density 1 means sparse, 2 dense. DT is nullable (for dealing with BrepFaces) meaning that the Valid Method gets objects and tests if just one of them is null (if so > adios amigos). If all are OK returns the pattern combo for the i,j,k location.

Moral: life sucks.

1 Like