# Rounded Crescent (lune) - geometry

5 messages
Open this post in threaded view
|

## Rounded Crescent (lune) - geometry

 Administrator I could have a go from first principles, but I imagine that most geometry has been studied to death decades ago or even in ancient times. I'm wanting to round the points of a crescent. So far my search has discovered that in Geometry it's called a lune. So I want the coordinates of the center of a third circle of radius Rc, that touches the tangent of two circles (Ra,Rb) offset by X, making a lune. i.e. the center of the blue circle. Now I imagine this has been studied and it has a name, like Gandalf's Circles or something, and the workings are published somewhere. In the case below, it just happens to be easily calculated, I'm sure that was a fluke, as it doesn't works for different Ra/Rb... // Rcescent rounded tips \$fn=90; t=0.4; Ra=100; Rb=100; X=Ra/2; Rc=5; difference() {   circle(Ra+t/2);   translate([Ra/2,0])     circle(Rb); } %translate([Ra/2,0]) {   color("red")     Circle(Rb);   color("green")     Circle(Rb+Rc); } %color("purple")   Circle(Ra-Rc); color("blue") translate([Rc-t/2,Ra-Rc-t/2])   Circle(Rc); module Circle(r,t=t,d) { // radius or diameter, thickness   R=(r != undef) ? r : (d != undef) ? d/2 : 1;   render()   difference() {     circle(R+t/2);     circle(R-t/2);   } }   ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out! -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org Admin - email* me if you need anything, or if I've done something stupid... * click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Open this post in threaded view
|

## Re: Rounded Crescent (lune) - geometry

 In the general case, it becomes the "Problem of Apollonius": a circle tangent to three circles. Wikipedia and Wolfram Mathworld have good articles on it. Your problem is not well defined in that any number of circles can be drawn within your lune depending on how much rounding you want to do. The third circle is centered at one of the cusps and determines the amount of the round. I came up with an OpenSCAD function to solve the problem of Apollonius in the external tangents case here: https://www.thingiverse.com/thing:2360208You would need to adapt that to change some of the signs around for your problem. When investigating this, I did not find any treatments that worked out the math to an implementable solution.  This may be useful, along with a few minutes with pencil and paper: http://mathforum.org/mathimages/index.php/Problem_of_Apollonius-- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: Rounded Crescent (lune) - geometry

 Administrator In reply to this post by MichaelAtOz Actually circle-circle intersection with offset by radius of the rounding circle. // Rcescent rounded tips \$fn=90; t=0.4; Ra=100; Rb=80; X=50; Rc=5; difference() {   circle(Ra+t/2);   translate([X,0])     circle(Rb); } %translate([X,0]) {   color("red")     Circle(Rb);   color("green")     Circle(Rb+Rc); } %color("purple")   Circle(Ra-Rc); Xc=x(Ra-Rc,Rb+Rc,X); Yc=y(Ra-Rc,Rb+Rc,X); echo(Xc,sq(X),sq(Rb),sq(Ra),2*X); echo(Yc,sq(X),sq(Rb),sq(Ra)); translate([Xc,Yc]) color("black") circle(1); color("blue") translate([Xc,Yc])   Circle(Rc); module Circle(r,t=t,d) { // radius or diameter, thickness   R=(r != undef) ? r : (d != undef) ? d/2 : 1;   render()   difference() {     circle(R+t/2);     circle(R-t/2);   } } // circle-circle intersection, R r two circle radii  centered at (0,0) (d,0) function sq(x)=x*x; // via http://mathworld.wolfram.com/Circle-CircleIntersection.htmlfunction x(R,r,d) = ( sq(d) - sq(r) + sq(R) ) / (2*d) ; function y(R,r,d) = (1/d) * sqrt( (-d+r-R) * (-d-r+R) * (-d+r+R) * (d+r+R) )/2; Can I call that Michaels Circle? ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out! -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org Admin - email* me if you need anything, or if I've done something stupid... * click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!