algorithmic modeling for Rhino
Hello,
I am trying to implement in VB the Interpolate data (interp) component, but does not work me like it should.
I've done this:
Private Sub RunScript(ByVal D As List(Of Double), ByVal t As List(Of Double), ByRef A As Object)
Dim interp As interpolator = New Interpolator(D.ToArray)
Dim list As New list(Of Double)
For i As int32 = 0 To t.count - 1
Dim paso As Double = (1 / t.count) * i
Dim val As Double = interp.InterpolateLinear(paso)
list.add(val)
Next
A = list
End Sub
Or I am missing something, or I'm doing it wrong, or I misunderstood what this method does.
Could someone help me understand what's going on?
Thank You!!!!
Tags:
Could someone help?
I tried, but to no avail... what I did notice, is that the native Interpolate component has the t input access set as Item - not List... I'm sorry I can't be of more help.
I tried as well and found that Linear only works on 2 values, while CatmullRom/Cubic work with the first 3. Meanwhile, i wrote a quick interpolator in python (shouldn't be too hard to translate). Here's a website with some easing equations you can plug in: http://gizma.com/easing/ .
Nice link, Thanks Javier!
Works here. You just need to sample at the same intervals. The component automatically scales the interpolation parameters to fit the domain.
Yes, David! Thank you so much !! I never would find by myself.
Very grateful for all other answers.
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
© 2024 Created by Scott Davidson. Powered by