ot (Sqrt), so I had to type it differently like so: (pow(hyp,2) - pow(ArcL/blades,2))*.5 .Next step will be elaborating with some structure around the fan, and adding the input data from the firefly components.…
peats the same points N times apart distance 'i' along the z axis.
I accomplished having a random set of curves the first time by using type random, and accomplished the iteration by using loop. However, the loop does not re-randomize the number each time it goes through, thus I end up having the same curve repeated N times. I'm trying to figure it out how to rewrite the script so that through each loop or each iteration of the curve, I will get a new set of points for a new curve, thus have N different curves iterated along the z axis. The output of the vb button is connected to a interpolated curve button.
Here is the full script:
Private Sub RunScript(ByVal N As Integer, ByRef A As Object) Dim points As New list(Of Point3d) For i As int32 = 0 To N 'defining the points for cruve Dim pt1 As New point3d Dim pt2 As New point3d Dim pt3 As New point3d Dim pt4 As New point3d pt2 = New Point3d(pt1) pt3 = New Point3d(pt2) pt4 = New Point3d(pt3) 'equations for generating random points Dim RandomClass As New Random Dim RandomNumber As New Integer Dim RandomNumber2 As New Integer Dim RandomNumber3 As New Integer Dim RandomNumber4 As New Integer Dim RandomNumber5 As New Integer Dim RandomNumber6 As New Integer Dim RandomNumber7 As New Integer Dim RandomNumber8 As New Integer RandomNumber = RandomClass.Next(1, 10) RandomNumber2 = RandomClass.Next(-5, 5) RandomNumber3 = RandomClass.Next(1, 10) RandomNumber4 = RandomClass.Next(-5, 5) RandomNumber5 = RandomClass.Next(1, 10) RandomNumber6 = RandomClass.Next(-5, 5) RandomNumber7 = RandomClass.Next(1, 10) RandomNumber8 = RandomClass.Next(-5, 5) pt1.X = RandomNumber7 pt1.Y = RandomNumber8 pt1.Z = i pt2.X = pt1.X + RandomNumber pt2.Y = RandomNumber2 pt2.Z = i pt3.X = pt2.X + RandomNumber3 pt3.Y = RandomNumber4 pt3.Z = i pt4.X = pt3.X + RandomNumber5 pt4.Y = RandomNumber6 pt4.Z = i 'generating points for a curve. points.add(pt1) points.add(pt2) points.add(pt3) points.add(pt4) Next a = points End Sub
'<Custom additional code>
'</Custom additional code>
End Class
Thanks…
e curve
2) intersect the other curve with xz planes
3) decompose both point sets
4) create new point set with xy components from first curve and z components from second.
5) Interpolated curve.…
he points 3 and 4 sliding only on the Y axis. The same with the point 5 which should slide only on the X axis.
Right now each point is moving in a plane and i want to fix them on a straight line.
could you help me?
Thank you!
Here the file: Origami.gh…
und and now I understand that "t" is a variable that will drive the formulas for the X,Y and Z coordinates of the curve. So for a circle of radius 1, on the XY plane, centered at (0,0,0), "t" goes from 0 to 2PI and the formulas are X=1*cos(t), Y=1*sin(t) and Z=0.
Is that it?
The U and V coordinates of a point in a surface are similar to the "t" value or are they related to the lengths of the two dimensions of the surface?…
to do?
2) if (abs(sin(3 * pi() * ptList / ptLast)) < 0.5)
abs and sin are written with upper case letter and they are part of Math: Math.Abs(), Math.Sin()
Where is pi() coming from? It's a constant, not a function: Math.PI
3) if (ptList == A(n + 1))
Where is ptList defined?
A is of type Object, you cannot use it as a function. You've assigned the constants zero or one to A at the top of the script, how is it ever supposed to be == to ptList?
4) Zf(n) = Z(n) + 12 * A(n);
Again, Zf and Z are not defined anywhere as far as I can tell.
5) M = ptLast - n;
Where does M come from?
6) The script doesn't seem to do anything. Any values you want to output from your script back into Grasshopper have to be assigned to the A parameter, but you're only assigning to A right at the top.
Perhaps it would be better if you explained in English what you are trying to accomplish with this script.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
Added by David Rutten at 11:39am on April 12, 2010