# Polyhendral

**URL:** <https://forum.dynamobim.com/t/polyhendral/59415>\
**Category:** Packages\
**Created:** [January 18, 2021, 12:41pm UTC](https://forum.dynamobim.com/t/polyhendral/59415 "2021-01-18T12:41:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![arq.derekbehr](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@arq.derekbehr](https://forum.dynamobim.com/u/arq.derekbehr)\
**Post date:** [January 18, 2021, 12:41pm UTC](https://forum.dynamobim.com/t/polyhendral/59415/1 "2021-01-18T12:41:06Z")

</div>

Hello, everybody!  
I would like to know the formulas of each type of polyhendral geometry on Dynamo!  
If you know some, share it! (and let me know which package you used and which code did you use)  
I want to master all type of polyhendral geometry on Dynamo!  
What’s the Secret?

Thanks for Attention.

 ![dividir 1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/8/f8e8dfc7a946b61d143488b455bac9d3603792b2.jpeg)  
 ![flat,1000x1000,075,f.u2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/a/1a4459a0ea01e67edad57ab9a08219f987b4b5c4.jpeg)  
 ![Clasificacinemppoliedros](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/4/c4cc2b8e2705b4721096dce98229738651129f61.jpeg)

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [January 18, 2021, 1:15pm UTC](https://forum.dynamobim.com/t/polyhendral/59415/2 "2021-01-18T13:15:50Z")

</div>

A bit of an answer (not all) to your question

> [@List of mathematical shapes and how to create them using Designscript](https://forum.dynamobim.com/t/list-of-mathematical-shapes-and-how-to-create-them-using-designscript/17505):
>
> Hi, I’m on a quest to get the corresponding disignscript of the shapes in this list and get as many as possible slight_smile If this works it could be a treasure trove for all that come across this thread. I got to this idea because i wanted to draw a parabolic line on paper (2D) , then bend the paper in a parabolic shape, making it 3D, and write it down using designscript. Any help on this one? So this idea of the treasure trove was born, and give this post a “like” if you support it. Y…

---

<div class="post-metadata">

**Author:** ![arq.derekbehr](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@arq.derekbehr](https://forum.dynamobim.com/u/arq.derekbehr)\
**Post date:** [January 18, 2021, 1:35pm UTC](https://forum.dynamobim.com/t/polyhendral/59415/3 "2021-01-18T13:35:55Z")

</div>

Oh no! They are so complex! hahaha  
I wanted something simpler.  
I work with bamboo, this photo below is the Icosahedron I have.  
I wanted to explore other shapes, experiment with Dynamo and then the work with bamboo.

 ![WhatsApp Image 2021-01-13 at 07.18.49](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/c/7c5c24a902281cd4ff60d783824382422662fdf2.jpeg)

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [January 18, 2021, 1:51pm UTC](https://forum.dynamobim.com/t/polyhendral/59415/4 "2021-01-18T13:51:06Z")

</div>

At least you now know who to ask 🙂

---

<div class="post-metadata">

**Author:** ![arq.derekbehr](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@arq.derekbehr](https://forum.dynamobim.com/u/arq.derekbehr)\
**Post date:** [January 21, 2021, 9:41pm UTC](https://forum.dynamobim.com/t/polyhendral/59415/5 "2021-01-21T21:41:22Z")

</div>

Anyone?

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [January 22, 2021, 6:20pm UTC](https://forum.dynamobim.com/t/polyhendral/59415/6 "2021-01-22T18:20:47Z")

</div>

> [@arq.derekbehr](#):
>
> I wanted to explore other shapes, experiment with Dynamo and then the work with bamboo

If the edges are adequate you could use the below definition for the Platonic Solids

 ![polyhedron_2021-01-22_11-58-21](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/2/a278b12f92d8ad5f26c2342a967bf9fc71d02f36.png)  
[polyhedron.dyn](https://forum.dynamobim.com/uploads/short-url/xmUxKhIqRKtywaZbQW1x0KVKKIZ.dyn) (9.8 KB)

```
h = (1+Math.Sqrt(5))/2-1;
phd01 = Dictionary.ByKeysValues(["Tetrahedron","Hexahedron","Octahedron","Dodecahedron","Icosahedron"],
[[1,1,1,1,-1,-1,-1,1,-1,-1,-1,1],[1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1],
[0,0,1,0,0,-1,0,1,0,0,-1,0,1,0,0,-1,0,0],[0,h,1/h,0,h,-1/h,0,-h,1/h,0,-h,-1/h,h,1/h,0,h,-1/h,0,-h,1/h,0,
-h,-1/h,0,1/h,0,h,1/h,0,-h,-1/h,0,h,-1/h,0,-h,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1],
[0,1,1/h,0,1,-1/h,0,-1,1/h,0,-1,-1/h,1,1/h,0,1,-1/h,0,-1,1/h,0,-1,-1/h,0,1/h,0,1,1/h,0,-1,-1/h,0,1,-1/h,0,-1]]);

xyz01 = List.Transpose(List.Chop(phd01.ValueAtKey(p),3));
pnt01 = Point.ByCoordinates(xyz01[0],xyz01[1],xyz01[2]);
pnt02 = List.Combinations(pnt01,2,false);
dst01 = Math.Round(List.FirstItem(pnt02<1>).DistanceTo(List.LastItem(pnt02<1>)),3);
pnt03 = List.SortByKey(pnt02,dst01);
pnt04 = List.GroupByKey(pnt03["sortedList"],pnt03["sortedKeys"])["groups"];
edg01 = Line.ByBestFitThroughPoints(List.FirstItem(pnt04));

```

Note: Depending on yourDynamo version you might need to alter “sortedList” , “sortedKeys” , “groups” in the last two lines to match the spelling output ports of the nodes _List.SortByKey_ and _List.GroupByKey_

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [January 23, 2021, 9:36am UTC](https://forum.dynamobim.com/t/polyhendral/59415/7 "2021-01-23T09:36:41Z")

</div>

An improvement on the above - solids

 ![polyhedron2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/e/ee639abf0bd569a6f52d68464154b53e4bde2dfc.gif)  
[polyhedron01.dyn](https://forum.dynamobim.com/uploads/short-url/tqVSPC475NSg2HkmMJHGUmxlKrY.dyn) (15.3 KB)

```
h = (1+Math.Sqrt(5))/2-1;
phd01 = Dictionary.ByKeysValues(["Tetrahedron","Hexahedron","Octahedron","Dodecahedron","Icosahedron"],
[[1,1,1,1,-1,-1,-1,1,-1,-1,-1,1],[1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1],
[0,0,1,0,0,-1,0,1,0,0,-1,0,1,0,0,-1,0,0],[0,h,1/h,0,h,-1/h,0,-h,1/h,0,-h,-1/h,h,1/h,0,h,-1/h,0,-h,1/h,0,
-h,-1/h,0,1/h,0,h,1/h,0,-h,-1/h,0,h,-1/h,0,-h,1,1,1,1,1,-1,1,-1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,-1],
[0,1,1/h,0,1,-1/h,0,-1,1/h,0,-1,-1/h,1,1/h,0,1,-1/h,0,-1,1/h,0,-1,-1/h,0,1/h,0,1,1/h,0,-1,-1/h,0,1,-1/h,0,-1]]);
xyz01 = List.Transpose(List.Chop(phd01.ValueAtKey(p),3));
pnt01 = Point.ByCoordinates(xyz01[0],xyz01[1],xyz01[2]);
phd02 = Dictionary.ByKeysValues(["Tetrahedron","Hexahedron","Octahedron","Dodecahedron","Icosahedron"],[[3,4],[4,6],[3,8],[5,16],[3,20]]);
pnt02 = List.Combinations(pnt01,phd02.ValueAtKey(p)[0],false);
bln01 = List.AllTrue(pnt02.DoesIntersect(Circle.ByBestFitThroughPoints(pnt02))<1>);
pnt03 = List.FilterByBoolMask(pnt02,bln01)["in"];
rad01 = Math.Round(Circle.ByBestFitThroughPoints(pnt03).Radius,6);
pnt04 = List.GroupByKey(pnt03,rad01);
pnt05 = List.FirstItem(List.SortByKey(pnt04["groups"],pnt04["unique keys"])["sortedList"]);
pln01 = Plane.ByBestFitThroughPoints(pnt05);
dir01 = Vector.ByTwoPoints(pln01.Origin,pnt05);
ang01 = Math.Round(dir01.AngleAboutAxis(pln01.XAxis,pln01.Normal),3);
srf01 = List.SortByKey(pnt05<1>,ang01<1>)["sortedList"];
sld01 = PolySurface.ByJoinedSurfaces(Surface.ByPerimeterPoints(srf01)).ExtractSolids();
```
