Raywiz Posted May 5, 2014 Share Posted May 5, 2014 Hi, first post here.. I am doing a design assignment in a class I want to fit a circle in every corner of a voronoi fracture piece. so that I can make a template to drill holes in a board place pegs in the holes and then wrap silver thread around the pegs and that will make a neclace! In a CAD program I would make circle with two tangent constrains, but its not procedural! I have put a circle manually in enclosed picture I have tried a foreach sop to process every piece, but my math skills are not so good, I suspect a vop sop is the solution... Best Regards David Quote Link to comment Share on other sites More sharing options...
eetu Posted May 5, 2014 Share Posted May 5, 2014 Yeah, it's some pretty basic trigonometry, you just have to learn it For every point of a polygon, I get vectors along both outgoing edges by calculating tangents with the "first edge" method, both as is and with flipped vertex order. From these I get the half vector, and when used with the distance h from above, it gets me the center of the sphere. All that per polygon inside a foreach SOP and: The control for the circle radius is a spare parameter on the foreach node. ee_poly_tangent_circles_v001.hip 4 Quote Link to comment Share on other sites More sharing options...
stevegh Posted May 5, 2014 Share Posted May 5, 2014 (edited) A much less mathematical solution, and quite a bit faster, is this? There is a fuse in there that gets rid of overlapping circles. sh_poly_tangent_circles_v001.hip Edited May 5, 2014 by stevegh 1 Quote Link to comment Share on other sites More sharing options...
eetu Posted May 5, 2014 Share Posted May 5, 2014 A much less mathematical solution, and quite a bit faster, is this? Ohh, how stupid am I? doh... Quote Link to comment Share on other sites More sharing options...
stevegh Posted May 5, 2014 Share Posted May 5, 2014 Oh please I am the stupid one, a poly extrude - pfft. Well done sir. Quote Link to comment Share on other sites More sharing options...
Raywiz Posted May 5, 2014 Author Share Posted May 5, 2014 Great thanx to you both! Know I can continue, and I will not take credit for it in my presentation! Kiitos och tack! Quote Link to comment Share on other sites More sharing options...
freaq Posted May 14, 2014 Share Posted May 14, 2014 does anyone know the actual math behind this btw?is it merely adding the "face" normals together for this and then "peaking"? or is it doing more?(I want to do a similar operation a a curve.) Quote Link to comment Share on other sites More sharing options...
eetu Posted May 14, 2014 Share Posted May 14, 2014 There's some splines and circles stuff in rdg's awesome thread. It's probably not what you actually want, but maybe someone will find some buried knowledge there Quote Link to comment Share on other sites More sharing options...
kgoossens Posted November 13, 2014 Share Posted November 13, 2014 does anyone know the actual math behind this btw? is it merely adding the "face" normals together for this and then "peaking"? or is it doing more? (I want to do a similar operation a a curve.) Hi Freek, You can find in your old lectures . Quote Link to comment Share on other sites More sharing options...
freaq Posted November 26, 2014 Share Posted November 26, 2014 (edited) I remembered this actually, but thatnks!unfortunately it doesn't seem to get me all the way there I need to instead of peak perfectly along the normals (which indeed is very similar) carveI already have the circle intersecting perfectly, but that seems to be a different value.. or maybe I'm just complicating the matters... sometimes ye olde master can still show me some tricks so it seems I figured I could just use pythagoras,h is the hypotheneuse, R is the far sideso H squared - R squared should give me the length, but it doesn't...even though it's supposed to be right angle triangle... soo I am confused. probably doing something very wrong... I'll give it another shot when I have some time Edited November 27, 2014 by freaq Quote Link to comment Share on other sites More sharing options...
kgoossens Posted November 29, 2014 Share Posted November 29, 2014 sqrt of (H squared - R squared) is the length. Didn't you forget about that by accident? Quote Link to comment Share on other sites More sharing options...
freaq Posted December 1, 2014 Share Posted December 1, 2014 no I know xD just somehow it's not working and I'm not sure,I'm getting the circle to fit perfectly, its carved perfectly to end where the intersecction is,just can't carve the original line to meet the endpoint of the circle for some reason.and seems to work on paper... potentially my carve is just not carving properly it's a surprisingly weird problem as the math all makes sense to me... Quote Link to comment Share on other sites More sharing options...
kgoossens Posted December 1, 2014 Share Posted December 1, 2014 Could you sent the scene to have a look at? Quote Link to comment Share on other sites More sharing options...
freaq Posted December 2, 2014 Share Posted December 2, 2014 probably can't but maybe I can make another one at home Quote Link to comment Share on other sites More sharing options...
kgoossens Posted December 4, 2014 Share Posted December 4, 2014 Hi Freek, Here is a small scene with a possible solution. CornerCircles.hipnc Quote Link to comment Share on other sites More sharing options...
freaq Posted December 4, 2014 Share Posted December 4, 2014 sweet I'll see if I can add the circle cutting in back this weekend allows for some really nice tools 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.