TREE B
{0} n=1 {0;1} n=4
{1} n=1 {0;4} n=4
{2} n=1 {1;1} n=4
{1;2} n=4
{1;3} n=4
{1;4} n=4
{2;1} n=2
{2;2} n=4
{2;3} n=4
{2;4} n=4
Both trees are generated from sliders, so could have any number of branches, although they are tied together. Tree A is a set of division points on a line, Tree B is a set of intersections from lines generated radially from the first (in this case three) points. I am trying to perform a "closest point" operation between the first tree and the second tree-- only, I do not want them to cross list, or long or short list. I want the {0} point to operate with those entries in the 2nd tree that start with {0,x}. So it would look like
{0} --> closest point with {0;1},{0;4}
{1} --> closest point with {1;1},{1,2},{1,3},{1,4} etc
I cannot figure out how this works. What I am visually trying to do is cast rays from a string of points so that they stop when they encounter another curve. I am having trouble picking through the intersection events to get what I want. Check the attached files for some clarity. THANK YOU…
Added by Joshua Jordan at 12:06am on February 5, 2012
pe and its surface.
However, I don't have that much knowledge about both grasshopper and Mathematica.. I mean I can only make assumptions and think about relations of certain functions but that's all.
If you can help me on this, I would appreciate it so much.
You can see a screenshot of the code and model of the demonstration from mathematica in attachment.
And here is the mathematica code;
Manipulate[ Module[{\[CurlyEpsilon] = 10^-6, c1 = Tan[a1], c2 = Tan[a2], c3 = Tan[a3], c4 = Tan[a4], c5 = Tan[a5], c6 = Tan[a6]}, ContourPlot3D[ Evaluate[ c6 Sin[3 x] Sin[2 y] Sin[z] + c4 Sin[2 x] Sin[3 y] Sin[z] + c5 Sin[3 x] Sin[y] Sin[2 z] + c2 Sin[x] Sin[3 y] Sin[2 z] + c3 Sin[2 x] Sin[y] Sin[3 z] + c1 Sin[x] Sin[2 y] Sin[3 z] == 0], {x, \[CurlyEpsilon], Pi - \[CurlyEpsilon]}, {y, \[CurlyEpsilon], Pi - \[CurlyEpsilon]}, {z, \[CurlyEpsilon], Pi - \[CurlyEpsilon]}, Mesh -> False, ImageSize -> {400, 400}, Boxed -> False, Axes -> False, NormalsFunction -> "Average", PlotPoints -> ControlActive[10, 30], PerformanceGoal -> "Speed"]], {{a1, 1, "\!\(\*SubscriptBox[\(\[Alpha]\), \(1\)]\)"}, -Pi/2 - 0.01, Pi/2 + 0.01, ImageSize -> Tiny}, {{a2, 1, "\!\(\*SubscriptBox[\(\[Alpha]\), \(2\)]\)"}, -Pi/2 - 0.01, Pi/2 + 0.01, ImageSize -> Tiny}, {{a3, 1, "\!\(\*SubscriptBox[\(\[Alpha]\), \(3\)]\)"}, -Pi/2 - 0.01, Pi/2 + 0.01, ImageSize -> Tiny}, {{a4, 1, "\!\(\*SubscriptBox[\(\[Alpha]\), \(4\)]\)"}, -Pi/2 - 0.01, Pi/2 + 0.01, ImageSize -> Tiny}, {{a5, 1, "\!\(\*SubscriptBox[\(\[Alpha]\), \(5\)]\)"}, -Pi/2 - 0.01, Pi/2 + 0.01, ImageSize -> Tiny}, {{a6, 1, "\!\(\*SubscriptBox[\(\[Alpha]\), \(6\)]\)"}, -Pi/2 - 0.01, Pi/2 + 0.01, ImageSize -> Tiny}, AutorunSequencing -> {1, 3, 5}, ControlPlacement -> Left]…