s is like flattening your data PARTIALLY - chopping an index off the end of the branch paths without obliterating the tree entirely. When working with one "set" of input data, a flatten works to get these lists to match up - but when working with multiple sets, we need to be careful to preserve the original branch indices that keep all four of your original regions separate. As a rule, whenever you're feeding two data trees into any component, they should have the same number of branches. (or one should have branches and the other should be a flat list, in other cases).
The rule of thumb I tend to teach is this:
In 90% of cases...
For lists, all your inputs should either have 1 item or N items. That is to say, if you're feeding 4 items into one input and 9 items into another, something is probably wrong.
For trees, all your inputs should have either 1 branch or M branches. That is to say, if you're feeding a tree w/ branches {0;0} to {0;3} into one input, and a tree w branches {0;0;0} to {0;3;8} into the other input, something is probably wrong.
Grasshopper essentially matches up branches first, then lists second. By "matching" I mean it processes them together. Simple example of the Line component - it will match the first branch of points in the A input to the first branch of points in the B input, creating lines between those points, then match the second branches, the third branches, etc. THEN, it applies the same logic to the level of the list (with a pair of matched branches {0;2}, match all the items in those branches to each other - first item in one branch to the first item in the other branch, etc.)
This is a tricky concept but it seems like you're already well on your way to understanding it from your definition - "PShift" is a critical tool in your path management arsenal. I hope this (overly long) response helps clear things up for you!
…
s para resolver problemas que hoy se presentan en el diseño y fabricación digital de formas complejas, que en conjunto, son las tendencias e instrucciones mas utilizadas por las oficinas de arquitectura del mundo.
Tomando como plataforma Rhinoceros de McNeel Associates, se optimiza el diseño y fabricación usando Grasshopper, RhinoNest y RhinoCAM.
Se realizará en Lima, Perú el 12 y 13 Setiembre, de 8:00 AM a 6:00 PM., con un total de 16 horas.
Cupo máximo: 20 alumnos.
Inversión. (no incluye impuestos)
S/.900.00 Incluye Licencia Rhino
S/.750.00 NO incluye Licencia Rhino
Ambas incluyen certificado de McNeel Miami.
Instructor:
Andres Gonzalez, CEO McNeel Miami, desarrollador desde 1980. www.rhino3d.com
Organización
McNeel Miami, Pablo C. Herrera,
Pedro Arteaga y MGP Nuevas Artes www.mgp-peru.com
Contacto en Lima, Perú
Claudia Aller / contacto@mgp-peru.com
Contacto en Miami, USA
Jackie Nasser / jackie@mcneel.com…
st one bakes each mesh chunk into the document, the middle one calculates the isosurface values and has the following code:
Private Sub RunScript(ByVal x As List(Of Vector3d), ByVal y As Object, ByRef A As Object)
Dim nums As New list(Of Double)
For Each v As point3d In x
nums.add(mandelbulb(v))
Next
a = nums
End Sub
' custom additional code
Dim z As vector3d
Dim Iterations As Integer = 6
Dim Power As Integer = 8
Function mandelbulb(pos As vector3d) As Double
z = pos
Dim dr As Double = 1.0
Dim r As Double = 0.0
Dim int As Integer = 0
For i As Integer = 0 To iterations - 1r = z.Length
Dim theta As Double = Math.acos(z.Z / r)
Dim phi As Double = Math.atan2(z.Y, z.X)
dr = Math.pow(r, Power - 1.0) * Power * dr + 1.0
Dim zr As Double = Math.pow(r, Power)
theta = theta * Power
phi = phi * Power
Dim sintheta As Double = Math.sin(theta)
z.X = sintheta * Math.cos(phi)
z.Y = Math.sin(phi) * sintheta
z.Z = Math.cos(theta)
z = vector3d.Multiply(z, zr)
z = vector3d.Add(z, pos)
If r > 1.5 Then Exit For
Next
Return 0.5 * Math.log(r) * r / dr
End Function
I mainly got it from here: https://github.com/royvanrijn/mandelbulb.js, but I've seen almost the same code on several places.…
Added by Vicente Soler at 9:38am on December 19, 2012
ten, Graft, Simplify and Flip Matrix. There is also an additional example showing Integer Divide to which there is no existing component.
For those uninitiated in the dark arts of pathmapper the component can be found on the Sets Tab> Tree Section with the icon of a red cube. Section 8: The Garden of the Forking Path of the Grasshopper Primer 2nd Edition is dedicated to the Tree Structure implemented in GH v0.6. There is an extensive Help file accessed from the 'right click' Context Menu.
UPDATED to correct an error in the Flip Matrix demonstration path_count should be item_count. Plus reflecting the change of the Simplify Component and Additional demonstration of grouping without the Path Mapper
Updated: 2011-04-20
Replace Branches
Not sure if it's right to include this here as its actually encouraging you not to use the Path Mapper, but sometimes there are benefits to being able to keep the definition free from restrictions like the Path Mapper. When a data structure changes the Path Mapper is unable to adapt without user intervention. This is demonstrated in the two Grouping examples above. The Path Mapper method would need the user to manually change the Integer 6 if they ever increased the V Divide, where as the Replace Branches Component will simply update based on its inputs.
I hope to follow this up with some more..... …
I want to use standard components I have to use 2 or 3 to get the result or use a scripting component, but sometimes I fell this could be avoided if we could access geometry properties and methods directly, let's say we want to use the x coordinates of a bunch of points, instead of decomposing the points to get the X input we could directly type X in the expression editor input to do so similarly to what happens with math formulas.
mmmm, I suppose that methods will be a bit trickier if more inputs where necessary.
On the other hand GH is very easy to start doing things with because the interface allows all levels of knowledge as shown on this forum where most of the questions, I'd say, have to do with solving specific geometry problems or asking for people experiences in similar problems and not always, how do I use a component if you know what I mean.
Overall I'm so, so happy GH is out there in the hands of creative people and in the hands of creative developers! Perhaps there is no need for GH to do any task because it certainly does quite a lot and it is so versatile, even better, that the requests of users get implemented as far as possible.
I think it's very difficult to compare two programs unless you are at the same level of proficiency on both, in the future I'm going to pay more attention as to if there would be a simpler way to do things in GH and if it required some implementation.
My two pence, 8)
Evert…
Added by Evert Amador at 4:03am on February 23, 2011
ifically: I have a 100' vertical plane lofted between curved top and bottom profiles. I contour it every 8' (normal direction is Z, giving me 13 horizontal curves). I use Divide Curve to divide each contour into 10 segments. The "Points" output of Divide Curve now yields 13 branches with 11 items each, corresponding to 13 contours with 11 points from the left end of the curve to its right.
I now want to string "vertical" lines, and connect all the 2nd items in each branch together, all the 3rd items, etc... in order to make a polyline that travels between each 2nd point or 3rd point. i don't want to use Cull Pattern/Nth/Index because the number of subdivisions could change (11 could become 20, etc).
How do I connect the Nth item of each branch in this tree? Moreover, how do I connect all values in a branch with their corresponding values in all other branches?
Thanks for any replies,
Richman Neumann
Solomon Cordwell Buenz Architects
…
mbre de 9:00 am a 8:00 pm Este taller está dirigido principalmente a arquitectos y diseñadores interesados en el aprendizaje del diseño paramétrico y generativo aplicados a la generación y racionalización de geometrías complejas para su implementación en diferentes procesos de diseño. En el curso se abordarán los conceptos básicos y metodología para hacer frente a diversas problemáticas del diseño mediante el desarrollo de herramientas algorítmicas a través de un lenguaje de programación visual y el desarrollo de esquemas de fabricación digital. No se requieren conocimientos previos de Rhinoceros 3D ni de programación, conocimientos previos de CAD deseables. Estudiantes: 2,500 MXN Profesionales: 3,000 MXN
CONCURSO DE RENDERS - BECA DEL 100% - Parametric & Generative Architecture & Design Grasshopper Workshop.
- Publica tu render en www.facebook.com/3dmetrica - El render con más likes será el ganador. - Fecha límite de votaciones 15 de septiembre del 2012.
Informes e Inscripciones: workshop@3dmetrica.com 04455 28790084 www.3dmetrica.com www.facebook.com/3dmetrica
…
best thing that could be done would be to use a combination of several steps in order to reconstruct the tree how you want it.
First off, you would need to reduce your data down then "base branches" that you want. So what was {a;b} is now just {a}. The result is that all of the data that was in all those sub branches is now all under that main branch. So instead of just having 2 in each sub branch you'll have 2*(no. of branches) in your main branch.
From here on out, we're actually going to use the SubList component to reassemble the sub branches in a more ordered fashion. So after reducing the data, find out the number of items in each branch (list length) and then create an interval from 0 to the number of items. Now you need to divide that interval in a way where the number of divisions allow for the proper number of items that you're looking for. I did this by simply dividing the list lengths by the number of items I wanted, then feeding that into the Divide Interval component.
Then only thing about the divide interval component is that the way it divides is not necessarily conducive to extracting chunks because the "ends" of the divided intervals will tend to overlap. IOW, if I have an interval from 0 to 8, then divide it into 4 pieces (2 items for each sub interval), I'll end up with intervals of 0-2, 2-4, 4-6, and 6-8. Its not that this is wrong, but if I'm extracting indices, then 2, 4, and 6 get "doubled" by being at the end of one interval and the beginning of another. Therefore after you divide the interval, you then need to ressemble the interval so that the end of the interval is one integer lower, so 0-1, 2-3, 4-5, and 6-7 in the previous example.
After that just plug those adjusted intervals into the Sub List component and you'll essentially have the result your looking for. In my case, I then had to clean things back up with the path mapper because the result was {a;0;b} when you're really looking for {a;b}
The only glitch in this approach is that the number of items in each sub branch is only not even (branch {1;160} has only 1 item). I guess you could potentially use the list length from the original path structure to match this later on, but I'll have to work a bit more to get that to work.
I attached a file that goes through the process I described above.…
Added by Damien Alomar at 1:46pm on February 18, 2010
ted (in the old scheme, all inputs were always taken into account) and it's more obvious what happens to the data just by looking at an image. Also, it clears out the component menu and it's easier to add more functionality later on without creating too much confusion.
Interpolate will 'sample' the data at equally spaced intervals. Let's say you have a list of 8 fruits, as I used in my example. What happens if you interpolate this list using 4 samples? Well, the first and last sample are always centered on the first and last items in the original list. The in between samples are distributed at equidistant intervals:
So you'd end up with a list containing {Lemon, Bergamot, Mandarin, Tangerine}. If you interpolate this list using 12 equally spaced samples, it will look like this:
and it results in a list containing {Lemon, Lime, Lime, Bergamot, Grapefruit, Grapefruit, Orange, Orange, Mandarin, Rangpur, Rangpur, Tangerine}. Of course interpolating a list may result in weird sampled intervals because of the rounding of sample parameter to list indices.
Interpolation does not sample in between values. It will not return a value that is 30% Grapefruit and 70% Orange. This kind of interpolation is only possible on a subset of data types (numbers, vectors, points, colours etc.) but these components must operate on all data types. I added a specific interpolation component as well, that performs numeric sampling using 4 possible interpolation functions, but this is a wholly different kind of interpolation.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…