Grasshopper

algorithmic modeling for Rhino

Angophora tree trunk. Generate 3~5 "random" points around the perimeter of a shape with a minimum distance apart; each point a small, random distance away from original shape's perimeter.

Rationale:

For this project, I am trying to come up with a grasshopper model for a eucalyptus tree. And hence trees, plural. Model one tree accurately enough and you can create a whole forest. Right?

But not just any gum tree. The angophora, no less:

Why? Because I like nature, that's why. Every time I see new designs –especially architectural designs– it worries me that the natural environment is being taken over. Not just that, but even the new materials used in all product designs has to come from nature as well [read: mines].

So. People are forgetting that we still need trees and I believe that if someone sees a beautiful [read: established] tree in their architectural plans, they are going to be much more likely to build around it and not cut it down. That alone would no doubt increase the value of the house.

My thinking is that current tree models suck. They look unnatural and I think I know why. They're not random or organic enough. They're not detailed enough. That's basically my 'rationale' for this project. Just look at how different all of these tree trunks are!

So I am not being paid for this project. It's a personal project of mine. I'm just worried about the trunk shape for now — I'll worry about all the leaves... when I get to that.

I am a grasshopper beginner. Please keep that in mind. I am also fairly hopeless at traditional programming, but I find the visual approach of grasshopper much easier to grasp. So unfortunately I have gotten stuck and need some help, even just a clue, as to how to proceed.

That said, here is my current progress:

  • About a year ago, I started modelling with straight trunks using pipe sections, to see if I could get a very basic "tree" shape. And to see if I could join the segments together. Yes it works but it looks hopeless as you can imagine. Then I stopped for a long while. Now I'm back at it, hoping to improve a lot more.
  • I have already made one basic vertical nurbs curve with tangents at either end as the main "trunk".
  • I tried creating two ellipses at each end of the main trunk/curve and lofting between them but it omitted the main curve/rail. So it ended up being an elliptical trunk with straight sides which of course still didn't look right.
  • Then I divided the first main curve up into a number of segments. I think that is a better approach.
  • I have taken the parameters of the curve at each segment (probably the tangent, but I am unsure what the exact parameter is) and used that to form a basic angled plane at each segment/division.
  • I have been able to draw ellipses at each segment and rotate them onto the plane.
  • I was going to loft it together later on. A Curved loft with elliptical cross-sections looks much better than straight a pipe does, but still looks too unnatural.
  • I quickly realised that tree trunks are not elliptical, but rather, shaped more like 'kidneys'.
  • The next step was to create >3 points on each of those planes (spaced fairly evenly around the ellipse so as not to create a really funky/unwanted shape).
  • Maybe it would be better to model with a triangle or other polygon instead of an ellipse. I haven't got that far yet... because here is where I am getting stuck.
  • I managed to find a way of getting three roughly 'triangular' points along each that ellipse.
  • I also managed to create three nurbs cuves in the Z direction which intersected those three points, a bit like three seams down the side of the tree trunk, but couldn't figure out how to loft it all together.
  • I think it was the wrong approach anyway... I'd rather try to create a bunch of nurbs curves at each of the XY planes so as to get more control of the shape.
  • What I am trying to do now is create three roughly triangular-spaced points on a basic ellipse through which I can then draw a simple nurbs curve (think like a cross section of the trunk).
  • I would then like to add some XY-only randomness to the positions of those points. Not Z randomness, otherwise the trunk is going to get messed/kinked up. That's probably very important.
  • Then I would like to loft those nurbs curvs at each XY plane together forming the basic tree trunk, which also tapers based on some other variable (a non-linear factor, not simply distance from ground plane, perhaps something else?).
  • I have attached the GH file.

I am also open to suggestions if you have a better way of solving a problem. I would like to retain control over a lot of factor such as number of branches, spacing, average branch length, etc. My main contrsaints are that the entire thing has to be somewhat random and non-linear.

Views: 862

Attachments:

Replies to This Discussion

So to recap, what I am trying to do is create a nurbs loop/curve at each plane, based on slightly randomised points which all fall around a basic ellipse. I am not sure if that is the best way to do it, probably not. I am open to better ways of doing things as I learn more about grasshopper.

I have attached by basic two approaches so far. One of thich is vertically aligned curves and the other is cross sectional curves...


For the latter, I have included the upper branches just so you can see how I am working at the problem. Although, I will need to come up with something better, something that can create a branch at a certain point along an existing curve. Something with a better inputs/variables, not just simply varying XYZ cordinates. What I have there feels like I am doing it the wrong way... I want it to be more automated.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service