Closed enzyme69 closed 10 years ago
@nortikin I am just "Participant" and not "Contributor" so I cannot Labels, I don't think.
I'm not sure how we would express a recursive loop in the sv node structure, currently recursion must happen inside a node as code. It would be possible to approximate the output of that algorithm with a clever set of nodes. I think that is what in synthesis terminology is called subtractive modeling, as opposed to additive.
Where in subtractive modeling you mask, delete, filter stuff. In additive modeling you grow something from a set of parameters.. yes, perfect for SN, parametrized algorithms - but also perfect for Sverchok Nodes if you get away from the idea that you are getting nodes to do what you might do by hand.
see how little code produces these: http://www.mrdoob.com/lab/javascript/webgl/city/01/ http://jsdo.it/zz85/7jWa
"Substractive" and "Additive" Modeling. That's new term for me.
Cheers for the link. MrDoob is really awesome, I have seen his WebGL works.
A quick test with multiple lines to do intersection. Apparently this does not work:
https://dl.dropboxusercontent.com/u/3654459/SVERCHOK_GITHUB/lines_random_intersection_006.blend
I just realized something:
"Intersect Edges" actually keeps the older edges.
I thought that if I have 2 lines, crossing each other, I would end up with just 5 points, and 4 edges. But that is not the case.
What is the advice to clean up Intersect Edges?
Regarding, recursion or rather iteration would be possible using a kind of while/for
node group construct, I started think about recently, it would have to pretty explicit.
But before we get to that we need do some changes, so short term no.
Right now one can use text in/out to iterate to a certain state. For design the amount of iterations is usually not so large.
I was even experimenting with a reload and dump on every update scheme that can produce interesting effects but want think about the a bit more.
Maybe SN node is the answer for now. Cheers @ly20
Text In and Out to iterate?
Ok, issue number 2 is the Intersect Edges that gives/leaves extra bit of data, like overlapping edges and multiple vertices. @Zeffii any idea?
@enzyme69 for now you must merge meshes first, before sending to intersect edges. stick a mesh-join infront of that
I think I did the merge, @zeffii still getting strange thing.
On 20 May 2014 17:11, Dealga McArdle notifications@github.com wrote:
@enzyme69 https://github.com/enzyme69 for now you must merge meshes first, before sending to intersect edges.
— Reply to this email directly or view it on GitHubhttps://github.com/nortikin/sverchok/issues/181#issuecomment-43593080 .
Here is the Blend @zeffii : https://dl.dropboxusercontent.com/u/3654459/SVERCHOK_GITHUB/lines_intersection_003.blend
I am trying to merge 2 lines only for now, to keep it simple.
Look at the result. Open Blend and scrub on timeline to update view.
It gives some to many lines and points as outputs. Perhaps it would be an idea to separate the output into intersection points and intersecting lines or something.
there is also no guarantee that the vertex indices will be where you expect.
The node slices all intersecting geometry, which is an expensive operation. I could have added optional remove doubles but there is a node for that and I didn't want to force doubles removals because there are other scenarios where you want all separate geometry.
@zeffii on the 2nd example, I did exactly that, but the result still too many edges. Remove double is cleaning something, but there are some overlapping edges, was probably a left over.
Thanks, i see now, it doesn't seem to be removing the original edges. weird (but fixable)
@zeffii Also would it be possible to just get the intersection points? Or is there some order so they are easy to get?
Yeah I think so, this is mostly a port from the XALL tinyCAD tool, but it makes sense to have a mode that returns only vertices of intersections (much lighter operation probably) -- but it won't be happening in the immediate future. -- added to todolist.
:+1: The ever growing todos...
Cheers Dealga, I appending this to try again in the future then.
On Tuesday, 20 May 2014, Dealga McArdle notifications@github.com wrote:
Yeah I think so, this is mostly a port from the XALL tinyCAD tool, but it makes sense to have a mode that returns only vertices of intersections (much lighter operation probably) -- but it won't be happening in the immediate future. -- added to todolist.
— Reply to this email directly or view it on GitHubhttps://github.com/nortikin/sverchok/issues/181#issuecomment-43597043 .
unless something happens to me, this particular point will be done because it bugs me :)
Alright, let me test that! Cheers!
Alright, it's working! Let me try on 3 lines scenario.
Also working!
Case closed? Or pending until Zeffii added the Intersecting Points output? :+1:
Nice and clean. I can proceed with my creation of random lines making box. However, I will need to deal with Face creation.
Next node wishlist: Fill Holes Faces based on the number of vertices (just like Blender function)
The funny thing is, with the setup like we had above, it will delete any edges without intersection point. Not mind it too much.
yeah, non intersecting edges get trashed straight away, that's probably not ideal in some scenarios - worth fixing. I think both issues are fixed with the same change to the code. Outputting intersection vertices only is perhaps possible by adding a new mode to the node, this may break stuff and I have no intention of maintaining two versions of this node.
But my mind is not clear right now for these fun things.
My "random" and range is not so random. Strange...
No worries @zeffii later when you are on the flow, you can jump to this problem. "Intersect Edge" is still a pretty cool node.
I don't know how it is used in Math, but interesting.
Randomness is tricky sometimes, what setup did you use, and what result did you expect?
Here is the BLEND for study. https://dl.dropboxusercontent.com/u/3654459/SVERCHOK_GITHUB/lines_intersection_015.blend
I think if we have GPS data tracing of people walking around area, interesting to see the POINT OF INTERSECTION.
@ly29 The Random seems to avoid negative value.
Oh, I just remembered random is just between 0 - 1 ...!
A map interval node would be helpful I have thought many times. For input x in [a,b] map to [c,d]. For r from random [0,1] map to [-1,1] would give distribution as you want. With a clamp option also.
map would definitely find good use cases. perhaps a second random node to include range, also : numpy has some neat distribution types
Random -1 and /2 this time. The interesting thing is depending on the number of "Divisions" in the range, I am getting result that is more Negative or more Positive.
Map node is awesome to have. I like Map.
Map and Interpolate.
Value A and Value B, and another value to go from A to B.
Map = Old Value Min, Old Value Max, New Value Min, New Value Max, and Original Value.
-1 * 2 more even random, but I still play around with the "Divisions" to get more even result. Not too positive, or not too negative.
This reminds me of Airplane Route Visualization.
random -> -0.5 -> *2
Weird that "List Range" Division cannot be lower than 2.
However, getting result I want, more equally distributed lines from A to B.
Thanks @ly29 and @zeffii
List Range is deprecated but the new node works the same way.
The mode is called Count, maybe it should be interval, I think a minimum of 2 makes sense if you want a interval with numbers in [a,b]. Count=1 would be the average of start stop I guess. Could make sense perhaps. (a+b)/2
Different random distributions would be good also. Have considered it but put it off.
Done.
Thanks Sverchok Wizards!!
On Wednesday, May 21, 2014, ly29 notifications@github.com wrote:
[image: maprange]https://cloud.githubusercontent.com/assets/6241382/3038790/a27f2016-e0d2-11e3-9ca3-e2a4d6368e72.png Done.
— Reply to this email directly or view it on GitHubhttps://github.com/nortikin/sverchok/issues/181#issuecomment-43738402 .
I don't know what this pattern is called but I think quite beautiful. http://blenderthings.blogspot.nl/2013/08/irregular-stone-patterns-in-osl-first.html
Anyone reckon if I made random vertical lines along horizontal lines I could easily "intersect" it and get interesting BOX patterns? => I will try this.
Now, imagine I have random irregular shapes like area Map of the World, and then from whatever BOX pattern I have above, I want it to FIT into the shape and then nicely intersect cut again.
Is this hard to do in Sverchok?
My guess is using List Mask and then, some what do random Projection Cutting, but in a less random fashion.
For example: Imagine a paper, and I cut into 2 rectangles, and then for each rectangle, I cut it again in vertical or horizontal, but random. And then cut it again.
Recursion in Sverchok, maybe that's what I am thinking.