discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Rounded Crescent (lune) - geometry

M
MichaelAtOz
Sun, Sep 17, 2017 4:05 AM

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.

http://forum.openscad.org/file/t359/cresent_1.png

http://forum.openscad.org/file/t359/cresent_2.png

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/

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. <http://forum.openscad.org/file/t359/cresent_1.png> <http://forum.openscad.org/file/t359/cresent_2.png> 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/
J
jsc
Sun, Sep 17, 2017 4:32 AM

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:2360208

You 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/

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:2360208 You 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/
M
MichaelAtOz
Sun, Sep 17, 2017 6:54 AM

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.html

function 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;

http://forum.openscad.org/file/t359/Crescent_solved.png

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/

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.html function 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; <http://forum.openscad.org/file/t359/Crescent_solved.png> 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/
NH
nop head
Sun, Sep 17, 2017 8:34 AM

Do you need to calculate the geometry or just draw it?

I think this creates the same shape:

$fn = 100;
offset(5) offset(-5)
difference() {
circle(100);

translate([50, 0])
    circle(80);

}

On 17 September 2017 at 07:54, MichaelAtOz oz.at.michael@gmail.com wrote:

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.html

function 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;

http://forum.openscad.org/file/t359/Crescent_solved.png

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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Do you need to calculate the geometry or just draw it? I think this creates the same shape: $fn = 100; offset(5) offset(-5) difference() { circle(100); translate([50, 0]) circle(80); } On 17 September 2017 at 07:54, MichaelAtOz <oz.at.michael@gmail.com> wrote: > 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.html > > function 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; > > <http://forum.openscad.org/file/t359/Crescent_solved.png> > > > 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 > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
M
MichaelAtOz
Sun, Sep 17, 2017 9:28 PM

Thanks Nophead, I was just about to calculate the two tangent points so I
could remove the pointy bits. That's much simpler.


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/

Thanks Nophead, I was just about to calculate the two tangent points so I could remove the pointy bits. That's much simpler. ----- 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/