Jump to content

AntoineSfx

Members
  • Content count

    88
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

2 Neutral

About AntoineSfx

  • Rank
    Peon

Personal Information

  • Name
    Antoine L
  • Location
    France
  1. Combining two Primitives

    Probably a bit beyond the scope of the question, but I will leave this link here::
  2. Is there a way to have one parameter control that would have no more individual controls than required to encode all the necessary values to define this furniture ? Ideally, something like one float ramp, which would serve as a way to define the segments in the x direction ({1,1,1} here). Then for each segment, an additional ramp for the other dimension (y) I could somehow encode all of this in something bigger, but it would be less intuitive. Also, how do you access the ramp stops from VEX ?
  3. Douglas-Peucker polygon simpification

    This works. Polyreduce doesn't reduce polygons though, as I suspected from the documentation.
  4. Douglas-Peucker polygon simpification

    Thanks, it wasn't clear from the doc that it also applied to polygons.
  5. So , I assume it is not implemented by any node, otherwise I would have found that term ( Douglas-Peucker ) sidefx.com This is an algorithm to simplify polygon by removing points that are almost (less than some epsilon) colinear https://en.wikipedia.org/wiki/Ramer–Douglas–Peucker_algorithm Do you think it would be a nice addition to resample ? Maybe it's already there and I can't find it.
  6. Not that it solves your problem, but here is a clarification of the problem you're trying to solve: https://doc.cgal.org/latest/Surface_mesh_skeletonization/index.html At least you have the name of the problem, and one implementation in C++ / CGAL. I'm working on something related, (CGAL + Houdini) maybe it's not that hard to offload some work to CGAL..
  7. Why does a part of this code runs only once in VEX ?

    the real question is, why does printf("numpt=%d\n", @numpt); seems to be outside of the points loop, while printf("ptnum=%d\n", @ptnum); seems to be be inside the points loop. I assume some optimization is made on the program, but I can't find exactly what. I know that vcc (or should I say the VM running its output) runs several threads, but it's unclear what happens to the VEX I wrote in that box.
  8. Why does a part of this code runs only once in VEX ?

    Operators precedence is such that non contrived expressions don't require additional parenthesis.. Unless you want to assign the result of a comparison or something. It's built-in in the BNF. However it doesn't explain why I have that behavior on the original code.
  9. Input is a line, I'm trying to set a different pscale attribute on the first and last point. In PointWrangle (Run over Points), I have this: f@pscale=chf("scl") ; float scale=chf("scl"); printf("begin %f\n",scale); printf("numpt=%d\n", @numpt); printf("ptnum=%d\n", @ptnum); if (@ptnum==0 || @ptnum== @numpt-1) f@pscale=chf("scl") ; else f@pscale=1 ; output: (twice the same thing) begin 0.101000 numpt=10 ptnum=0 ptnum=1 ptnum=2 ptnum=3 ptnum=4 ptnum=5 ptnum=6 ptnum=7 ptnum=8 ptnum=9 begin 0.101000 numpt=10 ptnum=0 ptnum=1 ptnum=2 ptnum=3 ptnum=4 ptnum=5 ptnum=6 ptnum=7 ptnum=8 ptnum=9 Is the compiler parallelizing portion of codes which refer to points attributes ?
  10. How to make a skinned sweep that can be subdivided ?

    Here is how I solved it for simple (regular polygon looking) cross sections: make the first and last point closer to the second and second from last, then set pscale to 0 for the first and last point. then after the skin, fuse the points which are close to each other, and at this point you have the topology of a sphere. This works better if the "radius" of the cross section curve is about the same size of the segments of the sweep profile polygon, to keep the quadrilaterals about the same size. Otherwise, there will be abrupt changes in the curvature ( the same way you do angles in NURBS curves by doubling points) For more complex curves (not convex), I haven't yet found a good solution, because I think this would require to compute the straight skeleton, which is not something which has a good implementation in Houdini. Polyexpand2D is the closest Houdini has to offer, but it seems hard to uses it as a straight skeleton operator. CGAL has it function This works for polygons because the straight skeleton happens to be the center, which is the point where all the vertices converge when scaled to 0.
  11. Unroll a planar curve

    Thanks. BTW the search function used by Invision is confusing. I didn't find it for some reason and I almost sent another Hawaii’s missile alert.
  12. Is there a clever way to unroll a planar curve, of course in a progressive way ? The effect I'm trying to achieve is a rug unrolling after an initial impulse , or with the effect of a constant force in a fixed direction. So far, I've tried to stitch curves created to the specifications explicitly (one line + 1 Archimedean spiral) but it's neither very stable nor procedural. This is highly dependent on the parametric equation of the initial curve. I was thinking of doing something like this: once I have the resampled curve as polygon, I could define the whole curve as a n-uple of (vector, angle), angle being the relative angle to the next point. Then flatten the curve by changing all the angles to zero, in a nice ease in / ease out, several points at a time.
  13. Define a function in point wrangle

    ok. Typo.. I meant BNF, the formal definition of the language (Backus normal form) Also, the use case of the keyword function is for nested functions. So I assume the whole VEX block is really run inside a parallel for loop over prim / points ..
  14. Define a function in point wrangle

    This solves my problem. May I ask where you have found this ? Is there a BNF for VEX ?
  15. Define a function in point wrangle

    actually .. a lot a functions do that. I need a more powerful version of neighbours, hence the question in the first place.
×