Grasshopper

algorithmic modeling for Rhino

Crystallon V2 is online at https://www.food4rhino.com/app/crystallon. Check it out and give it a try!

Yet there are always more improvements that can happen. I would like to introduce a few new components that I have found helpful and will be included in the next release, but you can try them now. They are online at https://github.com/fequalsf/Crystallon/tree/0972066e468f0a7a592ff4e...

I have been interested in finding ways to save settings for different iterations of a design which can be baked into a rhino file and used again later. These tools I've made are for working with divisions of a surface.

The first tool (Divide Surface) is for dividing a single surface using UV parameters and outputting a quad mesh. Simple enough. What makes this powerful is you can use that mesh with the "Morph Between Meshes" tool to create your voxels. So now you can morph between surfaces with the same number of divisions but with different parameters. The other nice thing about meshes is they are simple to work with and can be further modified with other plugins (such as kangaroo). They can be baked, manually edited in rhino and saved as STL or OBJ files to use again later. I will be updating all the tools eventually to output meshes.

The next tools are for creating those divisions. Any of the components that require a parameter input need a range of values from 0-1. The simplest way to do this is with the "Range" component. The default domain is 0-1 so you only need to give it a number of steps.

To make the range non-linear, there's a few components you can use. Graph mapper is the most common tool, but you could also use the gradient tool. 

But these can be difficult to work with and quite limiting. Graph mapper has a limited set of graph types to work with (I tend to use Bezier) and the gradient tool makes a steep curve which cannot change. Also making small changes is difficult and saving a setting for later is not easy.
So the next tool I made is a curve plotter. This takes your range of number (X values) and your remapped numbers (Y values) and plots the points to either a polyline or interpolated curve. This way you can see the curve the gradient is making or bake out a graph mapper curve you want to use later.

The next tool I made is a curve graph mapper, so you can map numbers using any curve drawn on the XY plane. This gives you much more freedom than the graph mapper and is easier to make small adjustments. Then you can always make many iterations of a curve and go back to any of them saved in the rhino file. There are options to view tags with the values on the curve as well as a gradient preview.

If you take a look at the curve created by the gradient tool, you can see it is basically creating a Bezier curve from the handles on the gradient (position is X value, color is Y value). The problem with using it for division parameters is the tangency of the points is always in the X direction creating a nearly horizontal section in the curve. This will give you a series of the same values, which we don't want. The falloff of the curve is also quite steep with no way of adjusting it.



If you make a lot of divisions you will also notice stepping in the curve. This is because the gradient uses RGB colors which is only a range of whole number from 0-255. So you only have a total of 256 values from 0-1.

Yet there is something elegant and user friendly about Bezier curves which makes them nice for creating gradients. So the last tool I made is for creating a Bezier curve from points. All you need to do is input at least 2 points. The second input is the tangent length multiplier (which can be one value for all or one per span of the curve) and the third is the tangent rotation in radians (also either one value or one per span).
The values are shown on the curve and can be baked as text tags if you want to save them and use the same points and values later. Or you can just bake out the curve. This makes for a simple smooth curve that makes a nice gradient.

Views: 566

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service