Follyx Posted September 18, 2020 Share Posted September 18, 2020 (edited) interesting problem: traced a single letter. I want to convert it for further development in exactly ONE line. Sounds easy. Isnt it. Is it? Tried a lot of different ways as you can see in the attached file. Probably I dive into with the wrong Idea... We'll see. Would be nice if you could gime some hints. Llatest with a new resample sop the real problem appears... single_line.hip Edited September 19, 2020 by Follyx Quote Link to comment Share on other sites More sharing options...
Librarian Posted September 18, 2020 Share Posted September 18, 2020 @range = @ptnum/(@numpt - 1.0); min max curvature (Lab- min max average) @curvature = fit(@curvature, detail(0, "min_curvature"), detail(0, "max_curvature"), 0, 1); @curvature = chramp("curvature", @curvature); 1 Quote Link to comment Share on other sites More sharing options...
Follyx Posted September 18, 2020 Author Share Posted September 18, 2020 Librarian I'm a little confused. How and where should I use that? Quote Link to comment Share on other sites More sharing options...
Librarian Posted September 18, 2020 Share Posted September 18, 2020 That was just Hints ...you can use those with 1 Quote Link to comment Share on other sites More sharing options...
Follyx Posted September 19, 2020 Author Share Posted September 19, 2020 (edited) hm, spent the half night for using this approach. But this way is a new terrain for me and I dont find a good entrance. Its highly interesting. Unluckily precisly the min-max-average sop is without examples on the site. Would you mind to setup a small file with the approach you have described? That would help a lot. Definetely you waked up my interest with your reference from growth and form in this theme. Even if I'm a bit helpless with your file. Wich part of it is usable for my specific problem? Jesus, or thank god, learning with Houdini never stops, lol. Thank you in advanced. Olly Edited September 19, 2020 by Follyx Quote Link to comment Share on other sites More sharing options...
Librarian Posted September 19, 2020 Share Posted September 19, 2020 (edited) @Follyx Contour line 0.5 int drawLine(vector f; vector t){ int base=addpoint(0,f); int to=addpoint(0,t); int line=addprim(0,"polyline",base,to); return line; } //----------------------------- int read=0; if(npoints(1)>0){ read=1; } int maxLines=chi("maxLineCount"); float minLen=chf("minLineLength"); int pts[]=pcfind(read,"P",v@P,chf("maxLineLength"),chi("maxFindCount")); int randomConnect=chi("randomConnect"); int keepPointCount=min(1, max(0,chi("keepPointCount"))); int runner=0; vector curPos; int pt; if(randomConnect == 0){ for(int x=0; x<len(pts);++x){ pt=pts[x]; if(runner > maxLines){ break; } curPos=attrib(read,"point", "P", pt); if(length(curPos-v@P)>minLen && (@ptnum<pt || read)){ if(keepPointCount){ int to=pt; if(read){ to=addpoint(0,curPos); } addprim(0,"polyline",@ptnum,to); }else{ drawLine(v@P,curPos); } runner++; } } }else{ int l=len(pts); float fl=float(l); int rander=pts[int(random(@ptnum*fl+randomConnect)*fl*fl) % l]; curPos=attrib(read,"point", "P", rander); if(keepPointCount){ int to=rander; if(read){ to=addpoint(0,curPos); } addprim(0,"polyline",@ptnum,to); }else{ drawLine(v@P,curPos); } } Have Fun investigate Edited September 19, 2020 by Librarian 1 Quote Link to comment Share on other sites More sharing options...
Follyx Posted September 19, 2020 Author Share Posted September 19, 2020 (edited) ok, found a solution. But I want to try it on a conventional way. The solution in the file in the green Networkbox works for further purposes. But I am solid interested how to get that without the LAB Sop. In the red netwokbox the solution is not so far but here is now a problem with pointsorting. I let all the tried nodes in the file so you can see what I already tried to try. Hopefully there is an easy solution with the standard nodes as well. My Brain is working just to complicated today ;-) The Solution from librarian is for sure very professionel and I am also super interested in. But before I need a fast kick, wich I understand now, for furher development of the project. So thanky you in advance letter_single_line.hip Edited September 21, 2020 by Follyx 1 Quote Link to comment Share on other sites More sharing options...
Follyx Posted September 21, 2020 Author Share Posted September 21, 2020 (edited) thread was splitted unfortunately: second corresponding thread: well, after trying to elaborate for hours again at least I dont get a solution. Of course I could dissolve the surplus edges and points ( in this case edges) but I realy look forward to find a complete procedural way. Also the last file from yours have double edge at the ends. And I have to look forward to get a exacter aproxiamtion to the center for the line. Nevertheless I really learned a lot from your tips and approach and still examine in this direction. But the annoying "S" is still bugy. If it would need only this single letter I would say well... Although my interest would not be satisfied. But in this case it becomes eventually a lot of letters from hundreds of different people so it has to be watertight. Any more suggestion and/or tips Librarian and/or other? I am at my wit's end. Thanks in advance single_lineFix1-5.hiplc Edited September 21, 2020 by Follyx Quote Link to comment Share on other sites More sharing options...
Librarian Posted September 22, 2020 Share Posted September 22, 2020 Found Something that maybe can Help you in your Process ..Who knows Vex-argsort sort.hiplc 1 Quote Link to comment Share on other sites More sharing options...
Follyx Posted September 29, 2020 Author Share Posted September 29, 2020 (edited) Sorry for the late reply, was ill for few days. After a little modifying for my needs the sorting example helped me out. Again, thanks a lot. Edited September 29, 2020 by Follyx Quote Link to comment Share on other sites More sharing options...
Follyx Posted September 30, 2020 Author Share Posted September 30, 2020 after studying this "easy" problem with first class help from librarian I analyzed the straight-skeleton-2d-SOP from SideFX Labs wich follows a similiar approach for the solution. Nice to have a node wich do the job for me. Better to have a person, librarian in this case, wich shows up similiar approaches and more or less assist in learning the substance. So the offals of the corresponding node, if there is one, is completely understandable. Problem solved with a lot of new knowledge. Great. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.