Free transformation


#1

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.


#2

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:


#3

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


#4

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:


#5

Yeah sure, here is the file:

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


#6

i still wonder how @viktor_kuzev made his cannabis leaf and projected it on a surface


#7

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


#8

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.


#9

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));
};