Free transformation

Hi;
I made a hexa-pattern but i want to apply free transformation to the whole pattern, (like skewing, distorting…) , with reserving the parametric nature.
Is there a work-around or package can do this.

The Geometry.Scale(with individual x,y,z inputs) will help you stretch and distort your geometry in an axis aligned way.

However, if you want to distort in a custom way, one thing you could try out, is scale a coordinate system in a non-conformal way and transfrom your geometry onto that CS:

2 Likes

Thanks Dimitar_Venkov:
May you share the file with the pattern, for learning purposes.
I am newbie and made the same pattern by hundreds of nodes while you made it using just 10 nodes!!!.

I believe that his work continues for a good distance outside of the picture he posted.

If you post your graph I am sure people will happily help you optimize your code. :smiley:

1 Like

Yeah sure, here is the file:

hexa-pattern-ORG-FORMULA.dyn (100.2 KB)

i still wonder how @viktor_kuzev made his cannabis leaf and projected it on a surface
https://forum.dynamobim.com/t/list-of-mathematical-shapes-and-how-to-create-them-using-designscript/17505/19

He’s mapping points between two parameter spaces - namely surfaces in his example. It’s a computational design 101.

1 Like

I’m on my phone now and cannot post an example but this is the basic principle:
I got the cannabis curve formula from wofram mathematica and it’s for x and y coordinates if I remember properly. So I just create a list of points with these coordinates mapped to UV on a surface.

1 Like

Well it was little more than 10 nodes :smiley:

I purposefully omitted the hex creation to try and answer your specific question. Pay attention to the lacing and here’s the script from the code block:

def checkList(x:var[]..[], n){
a = Count(x[-1]) == 4 ? 0 : -1;
return = List.DropItems(x, a);
}

def hexPoly(pts:var[][]){
a = List.Chop(List.DropEveryNthItem(pts[0], 2, 1), 1);
d = List.Chop(List.DropEveryNthItem(pts[3], 2, 1), 1);
bc0 = List.Transpose(List.TakeEveryNthItem(pts[1..2]<1>,2, 1));
bc1 = List.DropItems(List.Sublists(bc0, 0..1, 1), -1);
b = List.FirstItem(bc1<1>);
c = List.Reverse(List.LastItem(bc1<1>)<1>);
p0 = Flatten(List.Transpose({a, b, d, c})<1>);
return = Polygon.ByPoints(checkList(p0, 6));
};
4 Likes