Jump to content

Maximise Pscale


nuki

Recommended Posts

I am struggling to find a comprehensive solution for the following problem: Given a scattered point cloud, how would I calculate a pscale for every point that is the maximum possible pscale while at the same time avoiding intersections between the spherical ranges they describe.

Generating the pscales between the points is easy of course but maximizing the space they use is giving me a lot of trouble. If you look at this image, you can clearly see the problem:

pscale_01.jpg.49a77449e43073fa2599b6db9ea5a7f1.jpg
Blue numbers are the @ptnum, red numbers are the number of their closest neighbour.


Points 6 and 9 work fine. They represent each others closest neighbour, thus "touch each others surface" fine. It gets tricky when points are not each others closest neighbours. Point 7 is closest to Point0 while Point 0 is closest to Point 1... My attempts at "fixing the gaps" finally lead to this:

pscale_02.jpg.b3319735169160cbb57446aa20cae6fd.jpg

But since Points 7 and 0 BOTH Need to be scaled up to touch their neighbour, they start to intersect.

I am at a bit of a loss here....

ClosestDistanceTest_mk_v003.hip

Edited by nuki
Link to comment
Share on other sites

thanks a lot for your file jamesr, this is definately a ton better than what I came up with! I think the overlap is a result of your step size. What really put a knot into my brain yesterday was finding a way to directly calculate the pscale in a single pass eg. by finding the min. of the lengths of all midwaypoints...and all that amounted to is that I am pretty sure there is no way to solve this other than incrementing the scale ^^.

Link to comment
Share on other sites

I was thinking step size too, but even with it very low and iterations very high it never seemed to go away. And yeah I think you're right, I think it must be iterated and validated, but I'm pretty sure it could be done in a for loop in a vex wrangle outside of the sop solver as well.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...