Solvent-accessible and -excluded surface
up vote
3
down vote
favorite
I would like to reproduce this graph in TikZ:

I'm not new to TikZ and I can imagine how to draw the lines in green and black, but I cannot imagine how to draw the line in red (which is draw by th borders of the probe sphere rolling on the green atoms).
tikz-pgf pgfplots draw
add a comment |
up vote
3
down vote
favorite
I would like to reproduce this graph in TikZ:

I'm not new to TikZ and I can imagine how to draw the lines in green and black, but I cannot imagine how to draw the line in red (which is draw by th borders of the probe sphere rolling on the green atoms).
tikz-pgf pgfplots draw
Perhaps you could then add a sample of the black and green lines, then people will have time to focus on getting you the red lines.
– Phelype Oleinik
4 hours ago
@PhelypeOleinik: I wanted to get the whole concept before starting to draw (and start over). I would draw the green and black line with superpostion of filled circles of different radii.
– Kyle_the_hacker
4 hours ago
I guess that the red line requires sort of a "theory" that determines the point at which the red line departs from the circle. It might be related to the position where certain tangents hit the circle. Do you have such a "theory" or prescription? Looking at the pic again, what determines the radius of the probe sphere?
– marmot
4 hours ago
1
@marmot: the radius of the probe sphere is fixed, the sphere rolls on the green atoms; the sphere moves in such a way that its center stays on the black line.
– Kyle_the_hacker
4 hours ago
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I would like to reproduce this graph in TikZ:

I'm not new to TikZ and I can imagine how to draw the lines in green and black, but I cannot imagine how to draw the line in red (which is draw by th borders of the probe sphere rolling on the green atoms).
tikz-pgf pgfplots draw
I would like to reproduce this graph in TikZ:

I'm not new to TikZ and I can imagine how to draw the lines in green and black, but I cannot imagine how to draw the line in red (which is draw by th borders of the probe sphere rolling on the green atoms).
tikz-pgf pgfplots draw
tikz-pgf pgfplots draw
asked 4 hours ago
Kyle_the_hacker
597317
597317
Perhaps you could then add a sample of the black and green lines, then people will have time to focus on getting you the red lines.
– Phelype Oleinik
4 hours ago
@PhelypeOleinik: I wanted to get the whole concept before starting to draw (and start over). I would draw the green and black line with superpostion of filled circles of different radii.
– Kyle_the_hacker
4 hours ago
I guess that the red line requires sort of a "theory" that determines the point at which the red line departs from the circle. It might be related to the position where certain tangents hit the circle. Do you have such a "theory" or prescription? Looking at the pic again, what determines the radius of the probe sphere?
– marmot
4 hours ago
1
@marmot: the radius of the probe sphere is fixed, the sphere rolls on the green atoms; the sphere moves in such a way that its center stays on the black line.
– Kyle_the_hacker
4 hours ago
add a comment |
Perhaps you could then add a sample of the black and green lines, then people will have time to focus on getting you the red lines.
– Phelype Oleinik
4 hours ago
@PhelypeOleinik: I wanted to get the whole concept before starting to draw (and start over). I would draw the green and black line with superpostion of filled circles of different radii.
– Kyle_the_hacker
4 hours ago
I guess that the red line requires sort of a "theory" that determines the point at which the red line departs from the circle. It might be related to the position where certain tangents hit the circle. Do you have such a "theory" or prescription? Looking at the pic again, what determines the radius of the probe sphere?
– marmot
4 hours ago
1
@marmot: the radius of the probe sphere is fixed, the sphere rolls on the green atoms; the sphere moves in such a way that its center stays on the black line.
– Kyle_the_hacker
4 hours ago
Perhaps you could then add a sample of the black and green lines, then people will have time to focus on getting you the red lines.
– Phelype Oleinik
4 hours ago
Perhaps you could then add a sample of the black and green lines, then people will have time to focus on getting you the red lines.
– Phelype Oleinik
4 hours ago
@PhelypeOleinik: I wanted to get the whole concept before starting to draw (and start over). I would draw the green and black line with superpostion of filled circles of different radii.
– Kyle_the_hacker
4 hours ago
@PhelypeOleinik: I wanted to get the whole concept before starting to draw (and start over). I would draw the green and black line with superpostion of filled circles of different radii.
– Kyle_the_hacker
4 hours ago
I guess that the red line requires sort of a "theory" that determines the point at which the red line departs from the circle. It might be related to the position where certain tangents hit the circle. Do you have such a "theory" or prescription? Looking at the pic again, what determines the radius of the probe sphere?
– marmot
4 hours ago
I guess that the red line requires sort of a "theory" that determines the point at which the red line departs from the circle. It might be related to the position where certain tangents hit the circle. Do you have such a "theory" or prescription? Looking at the pic again, what determines the radius of the probe sphere?
– marmot
4 hours ago
1
1
@marmot: the radius of the probe sphere is fixed, the sphere rolls on the green atoms; the sphere moves in such a way that its center stays on the black line.
– Kyle_the_hacker
4 hours ago
@marmot: the radius of the probe sphere is fixed, the sphere rolls on the green atoms; the sphere moves in such a way that its center stays on the black line.
– Kyle_the_hacker
4 hours ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
Here is a proposal (essentially repeating the tricks from here). Each of the arcs is computed from the probe sphere touching two neighboring atoms. The corresponding path is computed with merge circles. The paths along the boundaries of the atoms are done with path along circle. And this answer comes also with the styles get circle intersections and midcircle that allows one to conveniently wipe out the overlaps.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{calc}
tikzset{merge circles/.style n args={4}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle((#4+ProbeSphereRadius),n1,(#3+ProbeSphereRadius))},
n4={mangle(n1,(#4+ProbeSphereRadius),(#3+ProbeSphereRadius))}
in %pgfextra{typeout{n1,n2,n3,n4}}
($(#1)+(+n2+n3:#3)$) arc(180+n2+n3:180+n2+n3+n4:ProbeSphereRadius)
}},
path along circle/.style args={with center #1 from #2 to #3}{insert path={
let p1=($(#2)-(#1)$), p2=($(#3)-(#1)$),
n1={atan2(y1,x1)}, n2={atan2(y2,x2)}, n3={veclen(x1,y1)},
n5={ifthenelse(n2<n1,n2,n2-360)}
in %pgfextra{typeout{n1,n2,n5}}
(#2) arc(n1:n5:n3)}},
get circle intersections/.style n args={6}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle(#4,n1,#3)},
n4={mangle(n1,#4,#3)}
in ($(#1)+(+n2+n3:#3)$) coordinate (#5)
($(#1)+(+n2-n3:#3)$) coordinate (#6)}},
midcircle/.style args={of #1 and #2}{insert path={
let p1=($(#2)-(#1)$),n1={veclen(x1,y1)/2} in ($(#1)!0.5!(#2)$) circle (n1)}}
}
begin{document}
begin{tikzpicture}[font=sffamily,declare function={%
mangle(a,b,c)=acos((b/c+c/b-(a/b)*(a/c))/2);}]
pgfkeys{probe sphere radius/.store in=ProbeSphereRadius,
probe sphere radius=1}
% define radii and center coordinates of the atoms
edeflstR{{0,1.7,1,1.8,1.8,1,1.7,1}}
edeflstCoords{(-4,1.5),(-1.2,2),(1.3,0.4),(4.5,0.1),(2.4,-2.3),(-2.3,-0.9),(-5.1,-1.4)}
% draw halo
foreach Coord [count=Z] in lstCoords
{pgfmathsetmacro{myR}{lstR[Z]+0.8}
draw[dashed,thick] Coord coordinate (cZ) circle (myR);}
foreach X/Y in {1/2,1/6,1/7,2/6,2/3,3/4,3/5,3/6,4/5,6/7}
{pgfmathsetmacro{myRone}{lstR[X]+0.8}
pgfmathsetmacro{myRtwo}{lstR[Y]+0.8}
fill[white,get circle intersections={cX}{cY}{myRone}{myRtwo}{aux1}{aux2}]
[midcircle=of aux1 and aux2];}
% draw atoms
foreach Coord [count=Z] in lstCoords
{pgfmathsetmacro{myR}{lstR[Z]}
draw[green!40!black,thick] Coord coordinate (cZ)
node{atom Z} circle (myR);}
% merge atoms
foreach X/Y in {1/6,3/4}
{pgfmathsetmacro{myRone}{lstR[X]}
pgfmathsetmacro{myRtwo}{lstR[Y]}
fill[white,get circle intersections={cX}{cY}{myRone}{myRtwo}{aux1}{aux2}]
[midcircle=of aux1 and aux2];}
draw[red,thick]
[merge circles={c1}{c2}{lstR[1]}{lstR[2]}] coordinate[pos=0](p0) coordinate[pos=1](p1)
[merge circles={c2}{c3}{lstR[2]}{lstR[3]}] coordinate[pos=0](p2) coordinate[pos=1](p3)
[merge circles={c3}{c4}{lstR[3]}{lstR[4]}] coordinate[pos=0](p4) coordinate[pos=1](p5)
[merge circles={c4}{c5}{lstR[4]}{lstR[5]}] coordinate[pos=0](p6) coordinate[pos=1](p7)
[merge circles={c5}{c3}{lstR[5]}{lstR[3]}] coordinate[pos=0](p8) coordinate[pos=1](p9)
[merge circles={c3}{c6}{lstR[3]}{lstR[6]}] coordinate[pos=0](p10) coordinate[pos=1](p11)
[merge circles={c6}{c7}{lstR[6]}{lstR[7]}] coordinate[pos=0](p12) coordinate[pos=1](p13)
[merge circles={c7}{c1}{lstR[7]}{lstR[1]}] coordinate[pos=0](p14) coordinate[pos=1](p15)
;
draw[red,thick]
[path along circle=with center c2 from p1 to p2,
path along circle=with center c3 from p3 to p4,
path along circle=with center c4 from p5 to p6,
path along circle=with center c5 from p7 to p8,
path along circle=with center c3 from p9 to p10,
path along circle=with center c6 from p11 to p12,
path along circle=with center c7 from p13 to p14,
path along circle=with center c1 from p15 to p0];
end{tikzpicture}
end{document}

The following animation explains how that works.
documentclass{beamer}
beamertemplatenavigationsymbolsempty
usepackage{tikz}
usetikzlibrary{calc}
tikzset{merge circles/.style n args={4}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle((#4+ProbeSphereRadius),n1,(#3+ProbeSphereRadius))},
n4={mangle(n1,(#4+ProbeSphereRadius),(#3+ProbeSphereRadius))}
in %pgfextra{typeout{n1,n2,n3,n4}}
($(#1)+(+n2+n3:#3)$) arc(180+n2+n3:180+n2+n3+n4:ProbeSphereRadius)
}},
path along circle/.style args={with center #1 from #2 to #3}{insert path={
let p1=($(#2)-(#1)$), p2=($(#3)-(#1)$),
n1={atan2(y1,x1)}, n2={atan2(y2,x2)}, n3={veclen(x1,y1)},
n5={ifthenelse(n2<n1,n2,n2-360)}
in %pgfextra{typeout{n1,n2,n5}}
(#2) arc(n1:n5:n3)}},
get circle intersections/.style n args={6}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle(#4,n1,#3)},
n4={mangle(n1,#4,#3)}
in ($(#1)+(+n2+n3:#3)$) coordinate (#5)
($(#1)+(+n2-n3:#3)$) coordinate (#6)}},
midcircle/.style args={of #1 and #2}{insert path={
let p1=($(#2)-(#1)$),n1={veclen(x1,y1)/2} in ($(#1)!0.5!(#2)$) circle (n1)}}
}
begin{document}
begin{frame}[t]
frametitle{}
centerline{begin{tikzpicture}[scale=0.9,declare function={%
mangle(a,b,c)=acos((b/c+c/b-(a/b)*(a/c))/2);}]
pgfkeys{probe sphere radius/.store in=ProbeSphereRadius,
probe sphere radius=1}
draw (0,0) coordinate (c1) circle (3);
draw (4,1) coordinate (c2) circle (2);
draw (3,-2) coordinate (c3) circle (2);
only<2->{fill[white,get circle intersections={c1}{c2}{3}{2}{x1}{x2}]
[midcircle=of x1 and x2];
fill[white,get circle intersections={c2}{c3}{2}{2}{x3}{x4}]
[midcircle=of x3 and x4];
fill[white,get circle intersections={c3}{c1}{2}{3}{x5}{x6}]
[midcircle=of x5 and x6];
}
only<3->{
draw[red]
[merge circles={c1}{c2}{3}{2}] coordinate[pos=0](p0) coordinate[pos=1](p1)
[merge circles={c2}{c3}{2}{2}] coordinate[pos=0](p2) coordinate[pos=1](p3)
[merge circles={c3}{c1}{2}{3}] coordinate[pos=0](p4) coordinate[pos=1](p5)
[path along circle=with center c2 from p1 to p2,
path along circle=with center c3 from p3 to p4,
path along circle=with center c1 from p5 to p0];}
end{tikzpicture}}
begin{enumerate}
item Draw the circles.
item<2-> Wipe out the overlaps. only<2>{First determine the coordinates at
which the circles intersect with texttt{get circle intersections}
and then fill the midcircles with texttt{midcircle}.}
item<3-> Draw the arcs between the circles with texttt{merge circles}
as well as the arcs along the circles with texttt{path along circle}.
end{enumerate}
end{frame}
end{document}

add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Here is a proposal (essentially repeating the tricks from here). Each of the arcs is computed from the probe sphere touching two neighboring atoms. The corresponding path is computed with merge circles. The paths along the boundaries of the atoms are done with path along circle. And this answer comes also with the styles get circle intersections and midcircle that allows one to conveniently wipe out the overlaps.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{calc}
tikzset{merge circles/.style n args={4}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle((#4+ProbeSphereRadius),n1,(#3+ProbeSphereRadius))},
n4={mangle(n1,(#4+ProbeSphereRadius),(#3+ProbeSphereRadius))}
in %pgfextra{typeout{n1,n2,n3,n4}}
($(#1)+(+n2+n3:#3)$) arc(180+n2+n3:180+n2+n3+n4:ProbeSphereRadius)
}},
path along circle/.style args={with center #1 from #2 to #3}{insert path={
let p1=($(#2)-(#1)$), p2=($(#3)-(#1)$),
n1={atan2(y1,x1)}, n2={atan2(y2,x2)}, n3={veclen(x1,y1)},
n5={ifthenelse(n2<n1,n2,n2-360)}
in %pgfextra{typeout{n1,n2,n5}}
(#2) arc(n1:n5:n3)}},
get circle intersections/.style n args={6}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle(#4,n1,#3)},
n4={mangle(n1,#4,#3)}
in ($(#1)+(+n2+n3:#3)$) coordinate (#5)
($(#1)+(+n2-n3:#3)$) coordinate (#6)}},
midcircle/.style args={of #1 and #2}{insert path={
let p1=($(#2)-(#1)$),n1={veclen(x1,y1)/2} in ($(#1)!0.5!(#2)$) circle (n1)}}
}
begin{document}
begin{tikzpicture}[font=sffamily,declare function={%
mangle(a,b,c)=acos((b/c+c/b-(a/b)*(a/c))/2);}]
pgfkeys{probe sphere radius/.store in=ProbeSphereRadius,
probe sphere radius=1}
% define radii and center coordinates of the atoms
edeflstR{{0,1.7,1,1.8,1.8,1,1.7,1}}
edeflstCoords{(-4,1.5),(-1.2,2),(1.3,0.4),(4.5,0.1),(2.4,-2.3),(-2.3,-0.9),(-5.1,-1.4)}
% draw halo
foreach Coord [count=Z] in lstCoords
{pgfmathsetmacro{myR}{lstR[Z]+0.8}
draw[dashed,thick] Coord coordinate (cZ) circle (myR);}
foreach X/Y in {1/2,1/6,1/7,2/6,2/3,3/4,3/5,3/6,4/5,6/7}
{pgfmathsetmacro{myRone}{lstR[X]+0.8}
pgfmathsetmacro{myRtwo}{lstR[Y]+0.8}
fill[white,get circle intersections={cX}{cY}{myRone}{myRtwo}{aux1}{aux2}]
[midcircle=of aux1 and aux2];}
% draw atoms
foreach Coord [count=Z] in lstCoords
{pgfmathsetmacro{myR}{lstR[Z]}
draw[green!40!black,thick] Coord coordinate (cZ)
node{atom Z} circle (myR);}
% merge atoms
foreach X/Y in {1/6,3/4}
{pgfmathsetmacro{myRone}{lstR[X]}
pgfmathsetmacro{myRtwo}{lstR[Y]}
fill[white,get circle intersections={cX}{cY}{myRone}{myRtwo}{aux1}{aux2}]
[midcircle=of aux1 and aux2];}
draw[red,thick]
[merge circles={c1}{c2}{lstR[1]}{lstR[2]}] coordinate[pos=0](p0) coordinate[pos=1](p1)
[merge circles={c2}{c3}{lstR[2]}{lstR[3]}] coordinate[pos=0](p2) coordinate[pos=1](p3)
[merge circles={c3}{c4}{lstR[3]}{lstR[4]}] coordinate[pos=0](p4) coordinate[pos=1](p5)
[merge circles={c4}{c5}{lstR[4]}{lstR[5]}] coordinate[pos=0](p6) coordinate[pos=1](p7)
[merge circles={c5}{c3}{lstR[5]}{lstR[3]}] coordinate[pos=0](p8) coordinate[pos=1](p9)
[merge circles={c3}{c6}{lstR[3]}{lstR[6]}] coordinate[pos=0](p10) coordinate[pos=1](p11)
[merge circles={c6}{c7}{lstR[6]}{lstR[7]}] coordinate[pos=0](p12) coordinate[pos=1](p13)
[merge circles={c7}{c1}{lstR[7]}{lstR[1]}] coordinate[pos=0](p14) coordinate[pos=1](p15)
;
draw[red,thick]
[path along circle=with center c2 from p1 to p2,
path along circle=with center c3 from p3 to p4,
path along circle=with center c4 from p5 to p6,
path along circle=with center c5 from p7 to p8,
path along circle=with center c3 from p9 to p10,
path along circle=with center c6 from p11 to p12,
path along circle=with center c7 from p13 to p14,
path along circle=with center c1 from p15 to p0];
end{tikzpicture}
end{document}

The following animation explains how that works.
documentclass{beamer}
beamertemplatenavigationsymbolsempty
usepackage{tikz}
usetikzlibrary{calc}
tikzset{merge circles/.style n args={4}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle((#4+ProbeSphereRadius),n1,(#3+ProbeSphereRadius))},
n4={mangle(n1,(#4+ProbeSphereRadius),(#3+ProbeSphereRadius))}
in %pgfextra{typeout{n1,n2,n3,n4}}
($(#1)+(+n2+n3:#3)$) arc(180+n2+n3:180+n2+n3+n4:ProbeSphereRadius)
}},
path along circle/.style args={with center #1 from #2 to #3}{insert path={
let p1=($(#2)-(#1)$), p2=($(#3)-(#1)$),
n1={atan2(y1,x1)}, n2={atan2(y2,x2)}, n3={veclen(x1,y1)},
n5={ifthenelse(n2<n1,n2,n2-360)}
in %pgfextra{typeout{n1,n2,n5}}
(#2) arc(n1:n5:n3)}},
get circle intersections/.style n args={6}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle(#4,n1,#3)},
n4={mangle(n1,#4,#3)}
in ($(#1)+(+n2+n3:#3)$) coordinate (#5)
($(#1)+(+n2-n3:#3)$) coordinate (#6)}},
midcircle/.style args={of #1 and #2}{insert path={
let p1=($(#2)-(#1)$),n1={veclen(x1,y1)/2} in ($(#1)!0.5!(#2)$) circle (n1)}}
}
begin{document}
begin{frame}[t]
frametitle{}
centerline{begin{tikzpicture}[scale=0.9,declare function={%
mangle(a,b,c)=acos((b/c+c/b-(a/b)*(a/c))/2);}]
pgfkeys{probe sphere radius/.store in=ProbeSphereRadius,
probe sphere radius=1}
draw (0,0) coordinate (c1) circle (3);
draw (4,1) coordinate (c2) circle (2);
draw (3,-2) coordinate (c3) circle (2);
only<2->{fill[white,get circle intersections={c1}{c2}{3}{2}{x1}{x2}]
[midcircle=of x1 and x2];
fill[white,get circle intersections={c2}{c3}{2}{2}{x3}{x4}]
[midcircle=of x3 and x4];
fill[white,get circle intersections={c3}{c1}{2}{3}{x5}{x6}]
[midcircle=of x5 and x6];
}
only<3->{
draw[red]
[merge circles={c1}{c2}{3}{2}] coordinate[pos=0](p0) coordinate[pos=1](p1)
[merge circles={c2}{c3}{2}{2}] coordinate[pos=0](p2) coordinate[pos=1](p3)
[merge circles={c3}{c1}{2}{3}] coordinate[pos=0](p4) coordinate[pos=1](p5)
[path along circle=with center c2 from p1 to p2,
path along circle=with center c3 from p3 to p4,
path along circle=with center c1 from p5 to p0];}
end{tikzpicture}}
begin{enumerate}
item Draw the circles.
item<2-> Wipe out the overlaps. only<2>{First determine the coordinates at
which the circles intersect with texttt{get circle intersections}
and then fill the midcircles with texttt{midcircle}.}
item<3-> Draw the arcs between the circles with texttt{merge circles}
as well as the arcs along the circles with texttt{path along circle}.
end{enumerate}
end{frame}
end{document}

add a comment |
up vote
2
down vote
Here is a proposal (essentially repeating the tricks from here). Each of the arcs is computed from the probe sphere touching two neighboring atoms. The corresponding path is computed with merge circles. The paths along the boundaries of the atoms are done with path along circle. And this answer comes also with the styles get circle intersections and midcircle that allows one to conveniently wipe out the overlaps.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{calc}
tikzset{merge circles/.style n args={4}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle((#4+ProbeSphereRadius),n1,(#3+ProbeSphereRadius))},
n4={mangle(n1,(#4+ProbeSphereRadius),(#3+ProbeSphereRadius))}
in %pgfextra{typeout{n1,n2,n3,n4}}
($(#1)+(+n2+n3:#3)$) arc(180+n2+n3:180+n2+n3+n4:ProbeSphereRadius)
}},
path along circle/.style args={with center #1 from #2 to #3}{insert path={
let p1=($(#2)-(#1)$), p2=($(#3)-(#1)$),
n1={atan2(y1,x1)}, n2={atan2(y2,x2)}, n3={veclen(x1,y1)},
n5={ifthenelse(n2<n1,n2,n2-360)}
in %pgfextra{typeout{n1,n2,n5}}
(#2) arc(n1:n5:n3)}},
get circle intersections/.style n args={6}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle(#4,n1,#3)},
n4={mangle(n1,#4,#3)}
in ($(#1)+(+n2+n3:#3)$) coordinate (#5)
($(#1)+(+n2-n3:#3)$) coordinate (#6)}},
midcircle/.style args={of #1 and #2}{insert path={
let p1=($(#2)-(#1)$),n1={veclen(x1,y1)/2} in ($(#1)!0.5!(#2)$) circle (n1)}}
}
begin{document}
begin{tikzpicture}[font=sffamily,declare function={%
mangle(a,b,c)=acos((b/c+c/b-(a/b)*(a/c))/2);}]
pgfkeys{probe sphere radius/.store in=ProbeSphereRadius,
probe sphere radius=1}
% define radii and center coordinates of the atoms
edeflstR{{0,1.7,1,1.8,1.8,1,1.7,1}}
edeflstCoords{(-4,1.5),(-1.2,2),(1.3,0.4),(4.5,0.1),(2.4,-2.3),(-2.3,-0.9),(-5.1,-1.4)}
% draw halo
foreach Coord [count=Z] in lstCoords
{pgfmathsetmacro{myR}{lstR[Z]+0.8}
draw[dashed,thick] Coord coordinate (cZ) circle (myR);}
foreach X/Y in {1/2,1/6,1/7,2/6,2/3,3/4,3/5,3/6,4/5,6/7}
{pgfmathsetmacro{myRone}{lstR[X]+0.8}
pgfmathsetmacro{myRtwo}{lstR[Y]+0.8}
fill[white,get circle intersections={cX}{cY}{myRone}{myRtwo}{aux1}{aux2}]
[midcircle=of aux1 and aux2];}
% draw atoms
foreach Coord [count=Z] in lstCoords
{pgfmathsetmacro{myR}{lstR[Z]}
draw[green!40!black,thick] Coord coordinate (cZ)
node{atom Z} circle (myR);}
% merge atoms
foreach X/Y in {1/6,3/4}
{pgfmathsetmacro{myRone}{lstR[X]}
pgfmathsetmacro{myRtwo}{lstR[Y]}
fill[white,get circle intersections={cX}{cY}{myRone}{myRtwo}{aux1}{aux2}]
[midcircle=of aux1 and aux2];}
draw[red,thick]
[merge circles={c1}{c2}{lstR[1]}{lstR[2]}] coordinate[pos=0](p0) coordinate[pos=1](p1)
[merge circles={c2}{c3}{lstR[2]}{lstR[3]}] coordinate[pos=0](p2) coordinate[pos=1](p3)
[merge circles={c3}{c4}{lstR[3]}{lstR[4]}] coordinate[pos=0](p4) coordinate[pos=1](p5)
[merge circles={c4}{c5}{lstR[4]}{lstR[5]}] coordinate[pos=0](p6) coordinate[pos=1](p7)
[merge circles={c5}{c3}{lstR[5]}{lstR[3]}] coordinate[pos=0](p8) coordinate[pos=1](p9)
[merge circles={c3}{c6}{lstR[3]}{lstR[6]}] coordinate[pos=0](p10) coordinate[pos=1](p11)
[merge circles={c6}{c7}{lstR[6]}{lstR[7]}] coordinate[pos=0](p12) coordinate[pos=1](p13)
[merge circles={c7}{c1}{lstR[7]}{lstR[1]}] coordinate[pos=0](p14) coordinate[pos=1](p15)
;
draw[red,thick]
[path along circle=with center c2 from p1 to p2,
path along circle=with center c3 from p3 to p4,
path along circle=with center c4 from p5 to p6,
path along circle=with center c5 from p7 to p8,
path along circle=with center c3 from p9 to p10,
path along circle=with center c6 from p11 to p12,
path along circle=with center c7 from p13 to p14,
path along circle=with center c1 from p15 to p0];
end{tikzpicture}
end{document}

The following animation explains how that works.
documentclass{beamer}
beamertemplatenavigationsymbolsempty
usepackage{tikz}
usetikzlibrary{calc}
tikzset{merge circles/.style n args={4}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle((#4+ProbeSphereRadius),n1,(#3+ProbeSphereRadius))},
n4={mangle(n1,(#4+ProbeSphereRadius),(#3+ProbeSphereRadius))}
in %pgfextra{typeout{n1,n2,n3,n4}}
($(#1)+(+n2+n3:#3)$) arc(180+n2+n3:180+n2+n3+n4:ProbeSphereRadius)
}},
path along circle/.style args={with center #1 from #2 to #3}{insert path={
let p1=($(#2)-(#1)$), p2=($(#3)-(#1)$),
n1={atan2(y1,x1)}, n2={atan2(y2,x2)}, n3={veclen(x1,y1)},
n5={ifthenelse(n2<n1,n2,n2-360)}
in %pgfextra{typeout{n1,n2,n5}}
(#2) arc(n1:n5:n3)}},
get circle intersections/.style n args={6}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle(#4,n1,#3)},
n4={mangle(n1,#4,#3)}
in ($(#1)+(+n2+n3:#3)$) coordinate (#5)
($(#1)+(+n2-n3:#3)$) coordinate (#6)}},
midcircle/.style args={of #1 and #2}{insert path={
let p1=($(#2)-(#1)$),n1={veclen(x1,y1)/2} in ($(#1)!0.5!(#2)$) circle (n1)}}
}
begin{document}
begin{frame}[t]
frametitle{}
centerline{begin{tikzpicture}[scale=0.9,declare function={%
mangle(a,b,c)=acos((b/c+c/b-(a/b)*(a/c))/2);}]
pgfkeys{probe sphere radius/.store in=ProbeSphereRadius,
probe sphere radius=1}
draw (0,0) coordinate (c1) circle (3);
draw (4,1) coordinate (c2) circle (2);
draw (3,-2) coordinate (c3) circle (2);
only<2->{fill[white,get circle intersections={c1}{c2}{3}{2}{x1}{x2}]
[midcircle=of x1 and x2];
fill[white,get circle intersections={c2}{c3}{2}{2}{x3}{x4}]
[midcircle=of x3 and x4];
fill[white,get circle intersections={c3}{c1}{2}{3}{x5}{x6}]
[midcircle=of x5 and x6];
}
only<3->{
draw[red]
[merge circles={c1}{c2}{3}{2}] coordinate[pos=0](p0) coordinate[pos=1](p1)
[merge circles={c2}{c3}{2}{2}] coordinate[pos=0](p2) coordinate[pos=1](p3)
[merge circles={c3}{c1}{2}{3}] coordinate[pos=0](p4) coordinate[pos=1](p5)
[path along circle=with center c2 from p1 to p2,
path along circle=with center c3 from p3 to p4,
path along circle=with center c1 from p5 to p0];}
end{tikzpicture}}
begin{enumerate}
item Draw the circles.
item<2-> Wipe out the overlaps. only<2>{First determine the coordinates at
which the circles intersect with texttt{get circle intersections}
and then fill the midcircles with texttt{midcircle}.}
item<3-> Draw the arcs between the circles with texttt{merge circles}
as well as the arcs along the circles with texttt{path along circle}.
end{enumerate}
end{frame}
end{document}

add a comment |
up vote
2
down vote
up vote
2
down vote
Here is a proposal (essentially repeating the tricks from here). Each of the arcs is computed from the probe sphere touching two neighboring atoms. The corresponding path is computed with merge circles. The paths along the boundaries of the atoms are done with path along circle. And this answer comes also with the styles get circle intersections and midcircle that allows one to conveniently wipe out the overlaps.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{calc}
tikzset{merge circles/.style n args={4}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle((#4+ProbeSphereRadius),n1,(#3+ProbeSphereRadius))},
n4={mangle(n1,(#4+ProbeSphereRadius),(#3+ProbeSphereRadius))}
in %pgfextra{typeout{n1,n2,n3,n4}}
($(#1)+(+n2+n3:#3)$) arc(180+n2+n3:180+n2+n3+n4:ProbeSphereRadius)
}},
path along circle/.style args={with center #1 from #2 to #3}{insert path={
let p1=($(#2)-(#1)$), p2=($(#3)-(#1)$),
n1={atan2(y1,x1)}, n2={atan2(y2,x2)}, n3={veclen(x1,y1)},
n5={ifthenelse(n2<n1,n2,n2-360)}
in %pgfextra{typeout{n1,n2,n5}}
(#2) arc(n1:n5:n3)}},
get circle intersections/.style n args={6}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle(#4,n1,#3)},
n4={mangle(n1,#4,#3)}
in ($(#1)+(+n2+n3:#3)$) coordinate (#5)
($(#1)+(+n2-n3:#3)$) coordinate (#6)}},
midcircle/.style args={of #1 and #2}{insert path={
let p1=($(#2)-(#1)$),n1={veclen(x1,y1)/2} in ($(#1)!0.5!(#2)$) circle (n1)}}
}
begin{document}
begin{tikzpicture}[font=sffamily,declare function={%
mangle(a,b,c)=acos((b/c+c/b-(a/b)*(a/c))/2);}]
pgfkeys{probe sphere radius/.store in=ProbeSphereRadius,
probe sphere radius=1}
% define radii and center coordinates of the atoms
edeflstR{{0,1.7,1,1.8,1.8,1,1.7,1}}
edeflstCoords{(-4,1.5),(-1.2,2),(1.3,0.4),(4.5,0.1),(2.4,-2.3),(-2.3,-0.9),(-5.1,-1.4)}
% draw halo
foreach Coord [count=Z] in lstCoords
{pgfmathsetmacro{myR}{lstR[Z]+0.8}
draw[dashed,thick] Coord coordinate (cZ) circle (myR);}
foreach X/Y in {1/2,1/6,1/7,2/6,2/3,3/4,3/5,3/6,4/5,6/7}
{pgfmathsetmacro{myRone}{lstR[X]+0.8}
pgfmathsetmacro{myRtwo}{lstR[Y]+0.8}
fill[white,get circle intersections={cX}{cY}{myRone}{myRtwo}{aux1}{aux2}]
[midcircle=of aux1 and aux2];}
% draw atoms
foreach Coord [count=Z] in lstCoords
{pgfmathsetmacro{myR}{lstR[Z]}
draw[green!40!black,thick] Coord coordinate (cZ)
node{atom Z} circle (myR);}
% merge atoms
foreach X/Y in {1/6,3/4}
{pgfmathsetmacro{myRone}{lstR[X]}
pgfmathsetmacro{myRtwo}{lstR[Y]}
fill[white,get circle intersections={cX}{cY}{myRone}{myRtwo}{aux1}{aux2}]
[midcircle=of aux1 and aux2];}
draw[red,thick]
[merge circles={c1}{c2}{lstR[1]}{lstR[2]}] coordinate[pos=0](p0) coordinate[pos=1](p1)
[merge circles={c2}{c3}{lstR[2]}{lstR[3]}] coordinate[pos=0](p2) coordinate[pos=1](p3)
[merge circles={c3}{c4}{lstR[3]}{lstR[4]}] coordinate[pos=0](p4) coordinate[pos=1](p5)
[merge circles={c4}{c5}{lstR[4]}{lstR[5]}] coordinate[pos=0](p6) coordinate[pos=1](p7)
[merge circles={c5}{c3}{lstR[5]}{lstR[3]}] coordinate[pos=0](p8) coordinate[pos=1](p9)
[merge circles={c3}{c6}{lstR[3]}{lstR[6]}] coordinate[pos=0](p10) coordinate[pos=1](p11)
[merge circles={c6}{c7}{lstR[6]}{lstR[7]}] coordinate[pos=0](p12) coordinate[pos=1](p13)
[merge circles={c7}{c1}{lstR[7]}{lstR[1]}] coordinate[pos=0](p14) coordinate[pos=1](p15)
;
draw[red,thick]
[path along circle=with center c2 from p1 to p2,
path along circle=with center c3 from p3 to p4,
path along circle=with center c4 from p5 to p6,
path along circle=with center c5 from p7 to p8,
path along circle=with center c3 from p9 to p10,
path along circle=with center c6 from p11 to p12,
path along circle=with center c7 from p13 to p14,
path along circle=with center c1 from p15 to p0];
end{tikzpicture}
end{document}

The following animation explains how that works.
documentclass{beamer}
beamertemplatenavigationsymbolsempty
usepackage{tikz}
usetikzlibrary{calc}
tikzset{merge circles/.style n args={4}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle((#4+ProbeSphereRadius),n1,(#3+ProbeSphereRadius))},
n4={mangle(n1,(#4+ProbeSphereRadius),(#3+ProbeSphereRadius))}
in %pgfextra{typeout{n1,n2,n3,n4}}
($(#1)+(+n2+n3:#3)$) arc(180+n2+n3:180+n2+n3+n4:ProbeSphereRadius)
}},
path along circle/.style args={with center #1 from #2 to #3}{insert path={
let p1=($(#2)-(#1)$), p2=($(#3)-(#1)$),
n1={atan2(y1,x1)}, n2={atan2(y2,x2)}, n3={veclen(x1,y1)},
n5={ifthenelse(n2<n1,n2,n2-360)}
in %pgfextra{typeout{n1,n2,n5}}
(#2) arc(n1:n5:n3)}},
get circle intersections/.style n args={6}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle(#4,n1,#3)},
n4={mangle(n1,#4,#3)}
in ($(#1)+(+n2+n3:#3)$) coordinate (#5)
($(#1)+(+n2-n3:#3)$) coordinate (#6)}},
midcircle/.style args={of #1 and #2}{insert path={
let p1=($(#2)-(#1)$),n1={veclen(x1,y1)/2} in ($(#1)!0.5!(#2)$) circle (n1)}}
}
begin{document}
begin{frame}[t]
frametitle{}
centerline{begin{tikzpicture}[scale=0.9,declare function={%
mangle(a,b,c)=acos((b/c+c/b-(a/b)*(a/c))/2);}]
pgfkeys{probe sphere radius/.store in=ProbeSphereRadius,
probe sphere radius=1}
draw (0,0) coordinate (c1) circle (3);
draw (4,1) coordinate (c2) circle (2);
draw (3,-2) coordinate (c3) circle (2);
only<2->{fill[white,get circle intersections={c1}{c2}{3}{2}{x1}{x2}]
[midcircle=of x1 and x2];
fill[white,get circle intersections={c2}{c3}{2}{2}{x3}{x4}]
[midcircle=of x3 and x4];
fill[white,get circle intersections={c3}{c1}{2}{3}{x5}{x6}]
[midcircle=of x5 and x6];
}
only<3->{
draw[red]
[merge circles={c1}{c2}{3}{2}] coordinate[pos=0](p0) coordinate[pos=1](p1)
[merge circles={c2}{c3}{2}{2}] coordinate[pos=0](p2) coordinate[pos=1](p3)
[merge circles={c3}{c1}{2}{3}] coordinate[pos=0](p4) coordinate[pos=1](p5)
[path along circle=with center c2 from p1 to p2,
path along circle=with center c3 from p3 to p4,
path along circle=with center c1 from p5 to p0];}
end{tikzpicture}}
begin{enumerate}
item Draw the circles.
item<2-> Wipe out the overlaps. only<2>{First determine the coordinates at
which the circles intersect with texttt{get circle intersections}
and then fill the midcircles with texttt{midcircle}.}
item<3-> Draw the arcs between the circles with texttt{merge circles}
as well as the arcs along the circles with texttt{path along circle}.
end{enumerate}
end{frame}
end{document}

Here is a proposal (essentially repeating the tricks from here). Each of the arcs is computed from the probe sphere touching two neighboring atoms. The corresponding path is computed with merge circles. The paths along the boundaries of the atoms are done with path along circle. And this answer comes also with the styles get circle intersections and midcircle that allows one to conveniently wipe out the overlaps.
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{calc}
tikzset{merge circles/.style n args={4}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle((#4+ProbeSphereRadius),n1,(#3+ProbeSphereRadius))},
n4={mangle(n1,(#4+ProbeSphereRadius),(#3+ProbeSphereRadius))}
in %pgfextra{typeout{n1,n2,n3,n4}}
($(#1)+(+n2+n3:#3)$) arc(180+n2+n3:180+n2+n3+n4:ProbeSphereRadius)
}},
path along circle/.style args={with center #1 from #2 to #3}{insert path={
let p1=($(#2)-(#1)$), p2=($(#3)-(#1)$),
n1={atan2(y1,x1)}, n2={atan2(y2,x2)}, n3={veclen(x1,y1)},
n5={ifthenelse(n2<n1,n2,n2-360)}
in %pgfextra{typeout{n1,n2,n5}}
(#2) arc(n1:n5:n3)}},
get circle intersections/.style n args={6}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle(#4,n1,#3)},
n4={mangle(n1,#4,#3)}
in ($(#1)+(+n2+n3:#3)$) coordinate (#5)
($(#1)+(+n2-n3:#3)$) coordinate (#6)}},
midcircle/.style args={of #1 and #2}{insert path={
let p1=($(#2)-(#1)$),n1={veclen(x1,y1)/2} in ($(#1)!0.5!(#2)$) circle (n1)}}
}
begin{document}
begin{tikzpicture}[font=sffamily,declare function={%
mangle(a,b,c)=acos((b/c+c/b-(a/b)*(a/c))/2);}]
pgfkeys{probe sphere radius/.store in=ProbeSphereRadius,
probe sphere radius=1}
% define radii and center coordinates of the atoms
edeflstR{{0,1.7,1,1.8,1.8,1,1.7,1}}
edeflstCoords{(-4,1.5),(-1.2,2),(1.3,0.4),(4.5,0.1),(2.4,-2.3),(-2.3,-0.9),(-5.1,-1.4)}
% draw halo
foreach Coord [count=Z] in lstCoords
{pgfmathsetmacro{myR}{lstR[Z]+0.8}
draw[dashed,thick] Coord coordinate (cZ) circle (myR);}
foreach X/Y in {1/2,1/6,1/7,2/6,2/3,3/4,3/5,3/6,4/5,6/7}
{pgfmathsetmacro{myRone}{lstR[X]+0.8}
pgfmathsetmacro{myRtwo}{lstR[Y]+0.8}
fill[white,get circle intersections={cX}{cY}{myRone}{myRtwo}{aux1}{aux2}]
[midcircle=of aux1 and aux2];}
% draw atoms
foreach Coord [count=Z] in lstCoords
{pgfmathsetmacro{myR}{lstR[Z]}
draw[green!40!black,thick] Coord coordinate (cZ)
node{atom Z} circle (myR);}
% merge atoms
foreach X/Y in {1/6,3/4}
{pgfmathsetmacro{myRone}{lstR[X]}
pgfmathsetmacro{myRtwo}{lstR[Y]}
fill[white,get circle intersections={cX}{cY}{myRone}{myRtwo}{aux1}{aux2}]
[midcircle=of aux1 and aux2];}
draw[red,thick]
[merge circles={c1}{c2}{lstR[1]}{lstR[2]}] coordinate[pos=0](p0) coordinate[pos=1](p1)
[merge circles={c2}{c3}{lstR[2]}{lstR[3]}] coordinate[pos=0](p2) coordinate[pos=1](p3)
[merge circles={c3}{c4}{lstR[3]}{lstR[4]}] coordinate[pos=0](p4) coordinate[pos=1](p5)
[merge circles={c4}{c5}{lstR[4]}{lstR[5]}] coordinate[pos=0](p6) coordinate[pos=1](p7)
[merge circles={c5}{c3}{lstR[5]}{lstR[3]}] coordinate[pos=0](p8) coordinate[pos=1](p9)
[merge circles={c3}{c6}{lstR[3]}{lstR[6]}] coordinate[pos=0](p10) coordinate[pos=1](p11)
[merge circles={c6}{c7}{lstR[6]}{lstR[7]}] coordinate[pos=0](p12) coordinate[pos=1](p13)
[merge circles={c7}{c1}{lstR[7]}{lstR[1]}] coordinate[pos=0](p14) coordinate[pos=1](p15)
;
draw[red,thick]
[path along circle=with center c2 from p1 to p2,
path along circle=with center c3 from p3 to p4,
path along circle=with center c4 from p5 to p6,
path along circle=with center c5 from p7 to p8,
path along circle=with center c3 from p9 to p10,
path along circle=with center c6 from p11 to p12,
path along circle=with center c7 from p13 to p14,
path along circle=with center c1 from p15 to p0];
end{tikzpicture}
end{document}

The following animation explains how that works.
documentclass{beamer}
beamertemplatenavigationsymbolsempty
usepackage{tikz}
usetikzlibrary{calc}
tikzset{merge circles/.style n args={4}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle((#4+ProbeSphereRadius),n1,(#3+ProbeSphereRadius))},
n4={mangle(n1,(#4+ProbeSphereRadius),(#3+ProbeSphereRadius))}
in %pgfextra{typeout{n1,n2,n3,n4}}
($(#1)+(+n2+n3:#3)$) arc(180+n2+n3:180+n2+n3+n4:ProbeSphereRadius)
}},
path along circle/.style args={with center #1 from #2 to #3}{insert path={
let p1=($(#2)-(#1)$), p2=($(#3)-(#1)$),
n1={atan2(y1,x1)}, n2={atan2(y2,x2)}, n3={veclen(x1,y1)},
n5={ifthenelse(n2<n1,n2,n2-360)}
in %pgfextra{typeout{n1,n2,n5}}
(#2) arc(n1:n5:n3)}},
get circle intersections/.style n args={6}{insert path={
let p1=(#1),p2=(#2),n1={veclen(x1-x2,y1-y2)*1pt/1cm},
n2={atan2(y2-y1,x2-x1)},
n3={mangle(#4,n1,#3)},
n4={mangle(n1,#4,#3)}
in ($(#1)+(+n2+n3:#3)$) coordinate (#5)
($(#1)+(+n2-n3:#3)$) coordinate (#6)}},
midcircle/.style args={of #1 and #2}{insert path={
let p1=($(#2)-(#1)$),n1={veclen(x1,y1)/2} in ($(#1)!0.5!(#2)$) circle (n1)}}
}
begin{document}
begin{frame}[t]
frametitle{}
centerline{begin{tikzpicture}[scale=0.9,declare function={%
mangle(a,b,c)=acos((b/c+c/b-(a/b)*(a/c))/2);}]
pgfkeys{probe sphere radius/.store in=ProbeSphereRadius,
probe sphere radius=1}
draw (0,0) coordinate (c1) circle (3);
draw (4,1) coordinate (c2) circle (2);
draw (3,-2) coordinate (c3) circle (2);
only<2->{fill[white,get circle intersections={c1}{c2}{3}{2}{x1}{x2}]
[midcircle=of x1 and x2];
fill[white,get circle intersections={c2}{c3}{2}{2}{x3}{x4}]
[midcircle=of x3 and x4];
fill[white,get circle intersections={c3}{c1}{2}{3}{x5}{x6}]
[midcircle=of x5 and x6];
}
only<3->{
draw[red]
[merge circles={c1}{c2}{3}{2}] coordinate[pos=0](p0) coordinate[pos=1](p1)
[merge circles={c2}{c3}{2}{2}] coordinate[pos=0](p2) coordinate[pos=1](p3)
[merge circles={c3}{c1}{2}{3}] coordinate[pos=0](p4) coordinate[pos=1](p5)
[path along circle=with center c2 from p1 to p2,
path along circle=with center c3 from p3 to p4,
path along circle=with center c1 from p5 to p0];}
end{tikzpicture}}
begin{enumerate}
item Draw the circles.
item<2-> Wipe out the overlaps. only<2>{First determine the coordinates at
which the circles intersect with texttt{get circle intersections}
and then fill the midcircles with texttt{midcircle}.}
item<3-> Draw the arcs between the circles with texttt{merge circles}
as well as the arcs along the circles with texttt{path along circle}.
end{enumerate}
end{frame}
end{document}

edited 15 mins ago
answered 3 hours ago
marmot
80.6k491172
80.6k491172
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463219%2fsolvent-accessible-and-excluded-surface%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Perhaps you could then add a sample of the black and green lines, then people will have time to focus on getting you the red lines.
– Phelype Oleinik
4 hours ago
@PhelypeOleinik: I wanted to get the whole concept before starting to draw (and start over). I would draw the green and black line with superpostion of filled circles of different radii.
– Kyle_the_hacker
4 hours ago
I guess that the red line requires sort of a "theory" that determines the point at which the red line departs from the circle. It might be related to the position where certain tangents hit the circle. Do you have such a "theory" or prescription? Looking at the pic again, what determines the radius of the probe sphere?
– marmot
4 hours ago
1
@marmot: the radius of the probe sphere is fixed, the sphere rolls on the green atoms; the sphere moves in such a way that its center stays on the black line.
– Kyle_the_hacker
4 hours ago