Grasshopper

algorithmic modeling for Rhino

Hi guys, I have started to investigate the properties of Koch division and after completing a definition for its 2D application (Koch snowflake) I have been trying to take the next step and apply it to 3D in a regular tetrahedron. Although I believe I am close, I seem to get a wrong value. After i build a regular tetrahedron I try to form another on each of the surfaces. The problem is that while in order to find the new vertex I evaluate the normal vector on the midpoint of the new surface and displace it by the new tetrahedron's height (given by the equation H=sprt(2/3) * A, where A is the side's length, it seems to give me a sligthly wrong point resulting in an irregular tetrahedron. I am attaching the definition with annotated steps and I hope that somebody has an idea how to help me with this! Thanks in advance.

Thanasis

Views: 2418

Replies to This Discussion

Hi Thanasis,

I think the problem with the distortion of your tetrahedra comes from the fact that the polygon component that you are using to create the base triangle needs a 'radius' input not 'edge length'.  This is the distance from the centrepont of the base triangle to the vertex of the triangle. You then need to work out the relationship between this radius and the edge length using some simple trigonometry to obtain the edge length to input into your 'tetrahedron height' equation.

You can do a similar thing with Weaverbird 'Mesh Pyramid'

Hope that's helpful,

Dan 

Hi Dan. 

thanks for the reply. Although I have used the polygon component based on the radius as you say for the initial regular tetrahedrom, that is not the case for the distortion later. I get the midpoints of the edges and create a new equilateral triangle to use as a new base for another regular tetrahedron. Then I measure the sides of this new triangle which I use to find the height that would give me the regular tetrahedron. Since now I am not in the  xy plane anymore, I try to get the normal vector on this new surface at the triangle's midpoint so I can displace it and get the vertice of my new tetrahedron. Do you still believe that the initial component woulkd p-lay a role in this?

I know that you can subdivide with weaverbird but that is a mean to achieve a result while I am trying to understand how the system works in order to later use it for different shapes and alternative growth systems.

In any case, thanks for your time.

Thanasis

Ok, so the problem was my initial input of side leangth to find the height for my original tetrahedron. You were right, I put the radius instead of length. Now the continuing distortions work, at least I believe they do!

Thnaks very much for this,

Thanasis

So having progressed to the next step of distortortion for the tetrahedron, I face another problem. Myy technique for finding the vertex of each new tetrahedron is finding the normal vector on the surface it is gonna be built onto, and then displacing its midpoint by the height needed for a regular tetrahedron to work.

While this technique worked for the first set of distortion, it does not for the second one. The problem is that while on the first all normal vectors were pointing outwards of the existing shape (a desired scenario for my experiment), in the second set, most of them ara facing inwards, creating the tetrahedrons in the opposite direction thatn the one desired. 

Is there a way to ensure that my normal vectors will point outwards from the existing structure? (I attach the gh file for anyone wanting to look at it)

Attachments:

You could try changing it so that instead of building up the separate faces, you use the 'Weaverbird Mesh Pyramid' component, which would then allow you to measure the mesh volume and centre point, and create a vector coming from the centre of the tetrahedron to the centre of each face. See attached gh file. Note I haven't made the mesh pyramid regular, but you can do it in the same way as you already have in your file.

Attachments:

Hi Thanasis,

There is a component called "inside" which evaluates if a point is inside a Brep or not. You could set up your evaluate component so that it goes both ways and only keeps the one outside.

Have a look at the attached def and image below.

Also try to set up the def so that it always starts with the same input (surface or curves) otherwise it will be harder to move on to hoopsnake or recursive loops.  Have you looked at hoopsnake do avoid copy/pasting?

Best,

A

Attachments:

Thanks, it tottally works. Only problem is that I cannot use this for the initial tetrahedron as my base is only a surface(not a brep) so both normal vectors give true values but I don't know if that is something that I can overcame. Maybe the hoopsnake loop can begin a step later, after I have created my base tetrahedron that the process is repeating itself identically.

Any new stuff on this?

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service