algorithmic modeling for Rhino
Metaballs evaluated with new fields components and tiny custom script. Refined (just a little) with weaverbird. Initial mesh obtained with 3d convex hull (avaible with Starling).
Tags:
Comment
Aha, the scaling was the step I was missing. I'll play around with this. All in all a pretty cool script - you've opened my eyes to the possibilities of scripting the field components!
@Andrew : I use points from charges to generate initial 3d convex hull. Then its subdivided with split polygons wb component. You need to scale hull a little (1.2-1.5) to put vertices in some distance to charges.
Are you using the same points for the point charges as you are for your convex hull?
Hi Andrew, this is the code of custom component. You just need to provide initial mesh vertices (here subdivided convex hull) as P input. The "fac" and force.length values are really small and really sensitive, so youll probably need to play with it more.
Private Sub RunScript(ByVal F As Object, ByVal P As List(Of Point3d), ByVal fac As Object, ByVal run As Object, ByVal stopat As Object, ByRef A As Object)
If run = True Then
If counter = 0 Then
field.Elements.Addrange(f)
actpt.AddRange(p)
End IfFor i As Integer = 0 To actpt.Count - 1 Step 1
Dim force As New Vector3d
force += field.SolveStep(actpt(i), fac, gh_differentialsolver.euler)
If force.Length * 1000 < stopat Then
actpt(i) -= (force * fac)
Else If force.length * 900 > stopat
actpt(i) += (force * fac)
ElseEnd If
Next
A = actpt
counter += 1
Else
counter = 0
field.Elements.Clear
actpt.Clear
A = p
End If
End Sub'<Custom additional code>
Dim field As New GH_Field
Dim actpt As New List (Of point3d)
Dim counter As Integer
Dim somevec As New vector3d(0, 0, 1)
'</Custom additional code>End Class
This is awesome. Are you willing to share the definition?
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by
You need to be a member of Grasshopper to add comments!