ram of creating sightline.
In the diagram formula is N=[((R+C)x(D+T))/D] - R where R is the vertical distance of eye above point of focus and D is the horizontal distance from eye to point of focus.
So I have very simple test script.
Call main()
Sub main()
Dim D,R,N
Dim T,C
T=1
C=1
For D=0 To 5 Step 0
D=D+T
For R=0 To 5 Step 0
N=(((R+C)*(D+T))/D)-R
R=R+N
Call Rhino.addpoint(Array(D,R,N))
Next
Next
End Sub
Basically I want to make all variable "D","R","T" and "C" as parametric number slider in GH
and repeat "D=D+T", "R=R+N" and "N=(((R+C)*(D+T))/D)-R" until certain times.
The question is how to make a incremental loop in GH.
If anyone think that there is a better solution to do this please teach me.
Thanks for your time!!
…
oning behind using the equality component to test for even numbers is flawed because of the data matching used by gh. It is testing like this:
0==0 True
2==1 False
4==2 False
6==3 False
etc
.............
Where as a Modulo 2 would work like this
0%2 = 0
1%2 = 1
2%2 = 0
3%2 = 1
4%2 = 0
5%2 = 1
6%2 = 0
7%2 = 1
8%2 = 0
9%2 = 1
......
Also I notice you have some errors in your expressions producing Nulls.
If you want it to be twice the value then you should have 2*D in the Expression and 10*D in the other
....
I attach a working version.…
ect, ByRef B As Object, ByRef C As Object, ByRef D As Object)
Dim tree1, tree2, tree3, tree4 As New datatree(Of System.Object)
Dim path1 As New GH_Path(0, 3) Dim path2 As New GH_Path(0, 4) Dim path3 As New GH_Path(0, 5) Dim path4 As New GH_Path(0, 6)
For i As Integer = 0 To x.Branch(0).count - 1 tree1.Add(x.Branch(0).item(i), path1) tree2.Add(x.Branch(1).item(i), path2) tree3.Add(x.Branch(2).item(i), path3) tree4.Add(x.Branch(3).item(i), path4) Next
a = tree1 b = tree2 c = tree3 d = tree4
This works I guess I'm just wondering if there is a better way.
Thanks again,
-Brian…
he contents to e.g. d:\test.csv
To draw in processing should be something like this (untested code, I don't have processing at this moment):
Table table = loadTable("D:\test.csv");println(table.getRowCount() + " total rows in table"); for (TableRow row : table.rows()) { line(row.GetFloat(0),row.GetFloat(1),row.GetFloat(2),row.GetFloat(3));}
…
ad over and would appreciate any thoughts.
I have a set of tessellated panels and edges with unique references. In general, panels share edges with other panels such that an edge borders two panels. In terms of a sample data structure to illustrate the point, it might look like this.
{0}
A
B
C
{1}
C
D
E
{2}
E
F
G
{3}
G
H
I
{4}
I
J
K
{5}
K
L
A
Where path represents a panel reference, and item a member reference: (e.g. {0;A} is panel 0, member A. Note the above is basically a 6 triangle umbrella arrangement (hexagon split into 6 triangles by center):
I'm looking to return a tree with:
-all unique list references in the set above,
-containing sub-set references to paths from whence they came.
In my example, this would be:
{A}
0
5
{B}
0
{C}
0
1
{D}
1
{E}
1
2
{F}
2
{G}
2
3
{H}
3
{I}
3
4
{J}
4
{K}
4
5
{L}
5
Member%20Panel%20References.gh
…