Shift control points from Bezier curves












1















Is it possible to add an offset to the control points of the bezier curves to make my red line to pass through the center of the point cloud?
Here is my mwe:



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [
label=right:XXX,
] (firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [
label=above:XXX
] (client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
label=XXX
] (dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
label=center:XXX,
] (cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [
label=below:XXX
] (server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [
label=right:XXX
] (server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls (firewall) and (cloud).. (server1)node{};
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}


And here is the output:
Output










share|improve this question


















  • 1





    If this is what you want, then just set both the control in the red line to cloud: .. controls (cloud) .. in place of .. controls (firewall) and (cloud) ...

    – Partha D.
    Jan 28 at 12:54











  • Oky, this will do it, but is there any option to add an offset?

    – Warok
    Jan 28 at 15:38
















1















Is it possible to add an offset to the control points of the bezier curves to make my red line to pass through the center of the point cloud?
Here is my mwe:



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [
label=right:XXX,
] (firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [
label=above:XXX
] (client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
label=XXX
] (dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
label=center:XXX,
] (cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [
label=below:XXX
] (server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [
label=right:XXX
] (server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls (firewall) and (cloud).. (server1)node{};
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}


And here is the output:
Output










share|improve this question


















  • 1





    If this is what you want, then just set both the control in the red line to cloud: .. controls (cloud) .. in place of .. controls (firewall) and (cloud) ...

    – Partha D.
    Jan 28 at 12:54











  • Oky, this will do it, but is there any option to add an offset?

    – Warok
    Jan 28 at 15:38














1












1








1








Is it possible to add an offset to the control points of the bezier curves to make my red line to pass through the center of the point cloud?
Here is my mwe:



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [
label=right:XXX,
] (firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [
label=above:XXX
] (client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
label=XXX
] (dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
label=center:XXX,
] (cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [
label=below:XXX
] (server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [
label=right:XXX
] (server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls (firewall) and (cloud).. (server1)node{};
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}


And here is the output:
Output










share|improve this question














Is it possible to add an offset to the control points of the bezier curves to make my red line to pass through the center of the point cloud?
Here is my mwe:



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [
label=right:XXX,
] (firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [
label=above:XXX
] (client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
label=XXX
] (dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
label=center:XXX,
] (cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [
label=below:XXX
] (server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [
label=right:XXX
] (server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls (firewall) and (cloud).. (server1)node{};
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}


And here is the output:
Output







bezier






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 28 at 8:10









WarokWarok

1289




1289








  • 1





    If this is what you want, then just set both the control in the red line to cloud: .. controls (cloud) .. in place of .. controls (firewall) and (cloud) ...

    – Partha D.
    Jan 28 at 12:54











  • Oky, this will do it, but is there any option to add an offset?

    – Warok
    Jan 28 at 15:38














  • 1





    If this is what you want, then just set both the control in the red line to cloud: .. controls (cloud) .. in place of .. controls (firewall) and (cloud) ...

    – Partha D.
    Jan 28 at 12:54











  • Oky, this will do it, but is there any option to add an offset?

    – Warok
    Jan 28 at 15:38








1




1





If this is what you want, then just set both the control in the red line to cloud: .. controls (cloud) .. in place of .. controls (firewall) and (cloud) ...

– Partha D.
Jan 28 at 12:54





If this is what you want, then just set both the control in the red line to cloud: .. controls (cloud) .. in place of .. controls (firewall) and (cloud) ...

– Partha D.
Jan 28 at 12:54













Oky, this will do it, but is there any option to add an offset?

– Warok
Jan 28 at 15:38





Oky, this will do it, but is there any option to add an offset?

– Warok
Jan 28 at 15:38










2 Answers
2






active

oldest

votes


















2














Is that close to what you are asking for:



enter image description here



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [
label=right:XXX,
] (firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [
label=above:XXX
] (client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
label=XXX
] (dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
%label=center:XXX,
] (cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [
label=below:XXX
] (server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [
label=right:XXX
] (server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls ([yshift=-2.5cm]firewall) and ([xshift=-1cm]cloud).. (server1)node{};
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}





share|improve this answer
























  • Nice job, thanks man

    – Warok
    Jan 29 at 9:36











  • @Warok Pleased to know that your problem is fixed

    – Hafid Boukhoulda
    Jan 29 at 10:50



















3














While @Hafid Boukhoulda gives a flexible, general approach for offset, setting both the control points to the same point (cloud) makes the Beizer curve look smooth, simple and beautiful -- and hence could be another choice to consider if it meets your requirements.



enter image description here



...for which I used the code:



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [label=right:XXX]
(firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [label=above:XXX]
(client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [label=XXX]
(dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [label=center:{}]
(cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [label=below:XXX]
(server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [label=right:XXX]
(server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls (cloud) .. (server1)node{};
% only one control (cloud) instead of two
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}





share|improve this answer
























  • Nice job, thanks dude

    – Warok
    Jan 29 at 9:36











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f472185%2fshift-control-points-from-bezier-curves%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














Is that close to what you are asking for:



enter image description here



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [
label=right:XXX,
] (firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [
label=above:XXX
] (client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
label=XXX
] (dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
%label=center:XXX,
] (cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [
label=below:XXX
] (server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [
label=right:XXX
] (server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls ([yshift=-2.5cm]firewall) and ([xshift=-1cm]cloud).. (server1)node{};
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}





share|improve this answer
























  • Nice job, thanks man

    – Warok
    Jan 29 at 9:36











  • @Warok Pleased to know that your problem is fixed

    – Hafid Boukhoulda
    Jan 29 at 10:50
















2














Is that close to what you are asking for:



enter image description here



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [
label=right:XXX,
] (firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [
label=above:XXX
] (client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
label=XXX
] (dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
%label=center:XXX,
] (cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [
label=below:XXX
] (server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [
label=right:XXX
] (server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls ([yshift=-2.5cm]firewall) and ([xshift=-1cm]cloud).. (server1)node{};
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}





share|improve this answer
























  • Nice job, thanks man

    – Warok
    Jan 29 at 9:36











  • @Warok Pleased to know that your problem is fixed

    – Hafid Boukhoulda
    Jan 29 at 10:50














2












2








2







Is that close to what you are asking for:



enter image description here



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [
label=right:XXX,
] (firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [
label=above:XXX
] (client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
label=XXX
] (dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
%label=center:XXX,
] (cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [
label=below:XXX
] (server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [
label=right:XXX
] (server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls ([yshift=-2.5cm]firewall) and ([xshift=-1cm]cloud).. (server1)node{};
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}





share|improve this answer













Is that close to what you are asking for:



enter image description here



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [
label=right:XXX,
] (firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [
label=above:XXX
] (client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
label=XXX
] (dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [
%label=center:XXX,
] (cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [
label=below:XXX
] (server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [
label=right:XXX
] (server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls ([yshift=-2.5cm]firewall) and ([xshift=-1cm]cloud).. (server1)node{};
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}






share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 28 at 18:34









Hafid BoukhouldaHafid Boukhoulda

3,0921520




3,0921520













  • Nice job, thanks man

    – Warok
    Jan 29 at 9:36











  • @Warok Pleased to know that your problem is fixed

    – Hafid Boukhoulda
    Jan 29 at 10:50



















  • Nice job, thanks man

    – Warok
    Jan 29 at 9:36











  • @Warok Pleased to know that your problem is fixed

    – Hafid Boukhoulda
    Jan 29 at 10:50

















Nice job, thanks man

– Warok
Jan 29 at 9:36





Nice job, thanks man

– Warok
Jan 29 at 9:36













@Warok Pleased to know that your problem is fixed

– Hafid Boukhoulda
Jan 29 at 10:50





@Warok Pleased to know that your problem is fixed

– Hafid Boukhoulda
Jan 29 at 10:50











3














While @Hafid Boukhoulda gives a flexible, general approach for offset, setting both the control points to the same point (cloud) makes the Beizer curve look smooth, simple and beautiful -- and hence could be another choice to consider if it meets your requirements.



enter image description here



...for which I used the code:



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [label=right:XXX]
(firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [label=above:XXX]
(client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [label=XXX]
(dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [label=center:{}]
(cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [label=below:XXX]
(server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [label=right:XXX]
(server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls (cloud) .. (server1)node{};
% only one control (cloud) instead of two
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}





share|improve this answer
























  • Nice job, thanks dude

    – Warok
    Jan 29 at 9:36
















3














While @Hafid Boukhoulda gives a flexible, general approach for offset, setting both the control points to the same point (cloud) makes the Beizer curve look smooth, simple and beautiful -- and hence could be another choice to consider if it meets your requirements.



enter image description here



...for which I used the code:



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [label=right:XXX]
(firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [label=above:XXX]
(client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [label=XXX]
(dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [label=center:{}]
(cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [label=below:XXX]
(server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [label=right:XXX]
(server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls (cloud) .. (server1)node{};
% only one control (cloud) instead of two
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}





share|improve this answer
























  • Nice job, thanks dude

    – Warok
    Jan 29 at 9:36














3












3








3







While @Hafid Boukhoulda gives a flexible, general approach for offset, setting both the control points to the same point (cloud) makes the Beizer curve look smooth, simple and beautiful -- and hence could be another choice to consider if it meets your requirements.



enter image description here



...for which I used the code:



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [label=right:XXX]
(firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [label=above:XXX]
(client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [label=XXX]
(dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [label=center:{}]
(cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [label=below:XXX]
(server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [label=right:XXX]
(server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls (cloud) .. (server1)node{};
% only one control (cloud) instead of two
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}





share|improve this answer













While @Hafid Boukhoulda gives a flexible, general approach for offset, setting both the control points to the same point (cloud) makes the Beizer curve look smooth, simple and beautiful -- and hence could be another choice to consider if it meets your requirements.



enter image description here



...for which I used the code:



documentclass{article}
usepackage{xcolor}
usepackage{tikz}
usetikzlibrary{chains}
usetikzlibrary{positioning}
usetikzlibrary{backgrounds}
usetikzlibrary{trees}

usetikzlibrary{arrows,automata}
usepackage{epstopdf}
definecolor{mycolor}{RGB}{8,108,131}
usepackage{array}
usepackage{adjustbox}
usetikzlibrary{shapes}

begin{document}
begin{tikzpicture}[
scale=0.8,
transform shape,
show background rectangle,
background rectangle/.style={fill=gray!10},
box/.style={draw, font=itshape}
]
coordinate (b) at (current page.center);
node [label=right:XXX]
(firewall)at(b) {includegraphics[width=9mm]{example-image-a}};
node [label=above:XXX]
(client) at ([yshift=2cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [label=XXX]
(dnsServer) at([xshift=-5cm]firewall){includegraphics[width=9mm]{example-image-a}};
node [label=center:{}]
(cloud) at ([yshift=-2cm]firewall){includegraphics[width=9mm]{example-image-b}};
node [label=below:XXX]
(server1) at([xshift=5cm]cloud){includegraphics[width=9mm]{example-image-a}};
node [label=right:XXX]
(server2) at([xshift=5cm]server1){includegraphics[width=9mm]{example-image-a}};
draw [thick,mycolor,->](client) .. controls (firewall) .. (dnsServer)node[very near start, left]{1};
draw [thick,mycolor,->](dnsServer) .. controls (firewall)and (cloud) .. (server1)node[very near end, left]{2};
draw [thick,mycolor,<->](server1)--(server2)node[midway,above]{3 et 4};
draw [thick,mycolor,->](server1) .. controls (cloud) and (firewall).. (client)node[very near start, right]{5};
draw [thick,red,->](client) .. controls (cloud) .. (server1)node{};
% only one control (cloud) instead of two
path[mycolor,->] (client) edge [loop right] node {6} ();
end{tikzpicture}
end{document}






share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 29 at 3:31









Partha D.Partha D.

76517




76517













  • Nice job, thanks dude

    – Warok
    Jan 29 at 9:36



















  • Nice job, thanks dude

    – Warok
    Jan 29 at 9:36

















Nice job, thanks dude

– Warok
Jan 29 at 9:36





Nice job, thanks dude

– Warok
Jan 29 at 9:36


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f472185%2fshift-control-points-from-bezier-curves%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Can I use Tabulator js library in my java Spring + Thymeleaf project?