# Nine bridges country club (remap only specific numbers in list)

Hi,

I’m trying to achieve the geometry as in the project nine bridges country club.

My idea was to use attractors in creating a pull effect on a uniform horizontal grid of points based on a few points at the floor level(attractors). Next I would like to create a NurbsSurface.ByPoints and try applying a grid of lines on the surface for creating the framing elements.

I only got as far as generating values for translating the horizontal points to the ZAxis.

I’m new to working with lists. I’ve tried some options to maintain the ZAxis translation value distribution to match the distribution of the initial horizontal points, but still no solution. The image below is just a capture based on what I would like to achieve, though the points are on 2 separate lists and the NurbsSurface.ByPoints node cannot be used on such lists.

Is there a way to remap a specific section of values in a list while ignoring others(i.e the ones = 0)?

Tips will be appreciated.
Attractor Pavilion.dyn (42.9 KB)

maybe this helps

or the synthesize package

1 Like

Interesting packages, thanks. I’ll definitely check them out.

I’m however very interested in learning how the Dynamo Nodes and Dynamo scripts work at the moment.

For this project particularly I’d like to figure out some stuff about working with lists.

So I have a list of distances calculated between the points and the attractors, then I successfully filtered them to have only the shortest distance: from each point to its closest attractor point. From this list i did a replace item by condition to make all the values less than or equal to 0.9 override to zeroes. The next step was to remap the range of the remaining values to even out the distribution while ignoring all the zeroes - this is where I got stuck. Remapping the entire list couldn’t work because it factored in the zeroes. Only way I could remap the numbers is if I separated them from the main list, but then I couldn’t get them back into the list at their original indices. I tried some stuff with the ReplaceItemAtIndex to no avail.

Any ideas?

Did you check the dynamo dictionary for info on what the nodes do?
https://dictionary.dynamobim.com/#/Geometry/Cuboid/Create/ByLengths(origin_Point-width_double-length_double-height_double)

yeah, i’ve gone through all the list nodes available to see which ones would best fit the situation. Am I missing something?

pulled it off

I revisited the List.GroupByKey node based on your hint. At the very end, I joined the two lists normally, then I did the GroupByKey operation twice: first based on the XAxes of the points, then based on the YAxes of the points. This was successful in restoring all the points to the original distribution.

Just realized I don’t need the NurbsSurface anymore for the grid.

Thanks! Let me see how further I can push this.
Attractor Pavilion - Copy.dyn (58.5 KB)

1 Like

@Sylar46 See if this helps

ninebridges.dyn (6.3 KB)

``````wdt1 = 10;

//Points Grid
pnt1 = Point.ByCoordinates((-wdt1..wdt1)<1>,(-wdt1..wdt1)<2>);
dis1 = wdt1/((Math.Pow(pnt1.DistanceTo(Point.Origin()),0.75))+0.2);
pnt2 = pnt1.Translate(Vector.ZAxis(),-dis1+(wdt1*2));

//Nurbs Surface
srf1 = NurbsSurface.ByControlPoints(pnt2,3,3);
srf2 = srf1.Trim(Plane.XY(),Point.ByCoordinates(0,0,-1))[0];
srf3 = srf2.Translate((0..#3..wdt1*2)<1>,(0..#3..wdt1*2)<2>,0);
``````

Alternately check this …

5 Likes

This is really cool @Vikram_Subbaiah

Very precise, and quick. My file takes quite a while to evaluate when I adjust a value.

Let me evaluate the results and see which one works best.

Thanks!

1 Like

I’m curious though. My original intention for developing the NurbsSurface was to have a platform for applying a grid independent of the location of the original points (something like a tessellation). I haven’t experimented with tessellation yet though and I’m not sure if this is the best way to go.

Currently I have a two dimensional grid developed from the points. But what if i needed like a Hexagonal pattern?

You may want to look into the Isocurve nodes - specifically the onenwhich allows you to draw a line along a surface between points (which I believe is more in line with your precedent than a tessellated pattern).

1 Like

Thanks @JacobSmall let me look them up, haven’t come across them before.

They are a bit of a little known gem.

1 Like

Here is a quick hexagonal pattern…

ninebridges-hex.dyn (6.6 KB)

``````//Hexagon Points Grid
s = 1;
a = s/(2*Math.Tan(30));
p1 = Point.ByCoordinates((0..#15..s*3)<1>,(0..#25..a*2)<2>);
p2 = List.Flatten(p1<1>.Translate([0,s*1.5]<2>,[0,a]<2>,0),1);
d1 = (15*s*3)/((Math.Pow(p3.DistanceTo(Point.ByCoordinates(15*s*3/2,25*a*2/2)),0.75))+0.2);
p4 = Polygon.ByPoints(p3.Translate(Vector.ZAxis(),-d1+35));``````
7 Likes

Hey @Vikram_Subbaiah ,

Thank you for sharing this awesome work.

I rebuilt it in nodes as a learning exercise… It didn’t help…! (excuse any mistakes)

Do I need to go do a Maths degree to learn these geometric formula? Or could you recommend an online course / resource?!

Thanks,

Mark

3 Likes

It truly is incredible what @Vikram_Subbaiah has accomplished with such a small Code Block. I’m also going through it step by step trying to figure out what’s going on in there. Very good learning exercise

4 Likes

Hey @Vikram_Subbaiah I’ve been experimenting with the code bit by bit. but I just came across something weird:

What could be going on here? is it some form of automatic lacing/replication? it’s like all the points from the polygons that share the same xyz coordinates each end up with a different ZAxis translation.
pav.dyn (7.7 KB)