How to draw 2D dendrite shape with surface normal?
I found another answer to draw a smooth dendrite: draw a smooth dendrite
I would like some help extending this to produce a schematic of the dendrite shown below with a border and a surface normal. My idea is to copy the dendrite code from the answer above and rotate it. However, I am having trouble creating the center section.

tikz-pgf
New contributor
TikzNewbie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I found another answer to draw a smooth dendrite: draw a smooth dendrite
I would like some help extending this to produce a schematic of the dendrite shown below with a border and a surface normal. My idea is to copy the dendrite code from the answer above and rotate it. However, I am having trouble creating the center section.

tikz-pgf
New contributor
TikzNewbie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) includingdocumentclassand the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.
– samcarter
4 hours ago
It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you.
– samcarter
3 hours ago
add a comment |
I found another answer to draw a smooth dendrite: draw a smooth dendrite
I would like some help extending this to produce a schematic of the dendrite shown below with a border and a surface normal. My idea is to copy the dendrite code from the answer above and rotate it. However, I am having trouble creating the center section.

tikz-pgf
New contributor
TikzNewbie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I found another answer to draw a smooth dendrite: draw a smooth dendrite
I would like some help extending this to produce a schematic of the dendrite shown below with a border and a surface normal. My idea is to copy the dendrite code from the answer above and rotate it. However, I am having trouble creating the center section.

tikz-pgf
tikz-pgf
New contributor
TikzNewbie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
TikzNewbie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 3 hours ago
TikzNewbie
31
31
New contributor
TikzNewbie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 4 hours ago
TikzNewbieTikzNewbie
1
1
New contributor
TikzNewbie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
TikzNewbie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
TikzNewbie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) includingdocumentclassand the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.
– samcarter
4 hours ago
It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you.
– samcarter
3 hours ago
add a comment |
1
Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) includingdocumentclassand the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.
– samcarter
4 hours ago
It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you.
– samcarter
3 hours ago
1
1
Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including
documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.– samcarter
4 hours ago
Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including
documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.– samcarter
4 hours ago
It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you.
– samcarter
3 hours ago
It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you.
– samcarter
3 hours ago
add a comment |
1 Answer
1
active
oldest
votes
Here is a way to use the other answer to patch together a continuous path. I do not have the time for fine-tuning. You just copy the path from this answer and make it a style using insert path. The patches can then be moved and rotated and, what is important here, combined to a longer path.
documentclass[tikz,border=3.14mm]{standalone}
begin{document}
begin{tikzpicture}[thick,scale=0.4,
dentrite leg/.style={insert path={% based on https://tex.stackexchange.com/a/182966/121799
foreach X in {0,...,10}
{ -- ++(0.25,5-0.4*X) -- ++(0.5,0) -- ++(0.25, -5+0.4*X) -- ++(0.5,0) }
-- ++(0.3,1) to[out=0,in=135] ++(2,-1.5) coordinate(dentrite-top-#1)
to[out=-135,in=0] ++(-2,-1.5) -- ++(-0.3,1)
foreach X in {10,9,...,0}
{ -- ++(-0.5,0)-- ++(-0.25, -5+0.4*X)-- ++(-0.5,0) -- ++(-0.25,5-0.4*X) }
}}]
path foreach X in {0,1,2,3} {(45-90*X:6) + (-45-90*X:-0.5)coordinate (XX)};
draw[fill=green!70!blue,rotate=45,rounded corners=1mm] (X0) [dentrite leg=0]
[rotate=-90] to[out=45,in=-225] (X1) [dentrite leg=1]
[rotate=-90] to[out=45,in=-225] (X2) [dentrite leg=2]
[rotate=-90] to[out=45,in=-225] (X3) [dentrite leg=3]
[rotate=-90] to[out=45,in=-135] cycle;
draw[-latex] (dentrite-top-3) -- ++ (135:1) node[above left]{$vec n$};
end{tikzpicture}
end{document}

I understand that this may not be the final version of the picture you are after. You will need to tune things here and there to arrive there, I focused on the simple things.
add a comment |
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
});
}
});
TikzNewbie is a new contributor. Be nice, and check out our Code of Conduct.
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%2f480762%2fhow-to-draw-2d-dendrite-shape-with-surface-normal%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Here is a way to use the other answer to patch together a continuous path. I do not have the time for fine-tuning. You just copy the path from this answer and make it a style using insert path. The patches can then be moved and rotated and, what is important here, combined to a longer path.
documentclass[tikz,border=3.14mm]{standalone}
begin{document}
begin{tikzpicture}[thick,scale=0.4,
dentrite leg/.style={insert path={% based on https://tex.stackexchange.com/a/182966/121799
foreach X in {0,...,10}
{ -- ++(0.25,5-0.4*X) -- ++(0.5,0) -- ++(0.25, -5+0.4*X) -- ++(0.5,0) }
-- ++(0.3,1) to[out=0,in=135] ++(2,-1.5) coordinate(dentrite-top-#1)
to[out=-135,in=0] ++(-2,-1.5) -- ++(-0.3,1)
foreach X in {10,9,...,0}
{ -- ++(-0.5,0)-- ++(-0.25, -5+0.4*X)-- ++(-0.5,0) -- ++(-0.25,5-0.4*X) }
}}]
path foreach X in {0,1,2,3} {(45-90*X:6) + (-45-90*X:-0.5)coordinate (XX)};
draw[fill=green!70!blue,rotate=45,rounded corners=1mm] (X0) [dentrite leg=0]
[rotate=-90] to[out=45,in=-225] (X1) [dentrite leg=1]
[rotate=-90] to[out=45,in=-225] (X2) [dentrite leg=2]
[rotate=-90] to[out=45,in=-225] (X3) [dentrite leg=3]
[rotate=-90] to[out=45,in=-135] cycle;
draw[-latex] (dentrite-top-3) -- ++ (135:1) node[above left]{$vec n$};
end{tikzpicture}
end{document}

I understand that this may not be the final version of the picture you are after. You will need to tune things here and there to arrive there, I focused on the simple things.
add a comment |
Here is a way to use the other answer to patch together a continuous path. I do not have the time for fine-tuning. You just copy the path from this answer and make it a style using insert path. The patches can then be moved and rotated and, what is important here, combined to a longer path.
documentclass[tikz,border=3.14mm]{standalone}
begin{document}
begin{tikzpicture}[thick,scale=0.4,
dentrite leg/.style={insert path={% based on https://tex.stackexchange.com/a/182966/121799
foreach X in {0,...,10}
{ -- ++(0.25,5-0.4*X) -- ++(0.5,0) -- ++(0.25, -5+0.4*X) -- ++(0.5,0) }
-- ++(0.3,1) to[out=0,in=135] ++(2,-1.5) coordinate(dentrite-top-#1)
to[out=-135,in=0] ++(-2,-1.5) -- ++(-0.3,1)
foreach X in {10,9,...,0}
{ -- ++(-0.5,0)-- ++(-0.25, -5+0.4*X)-- ++(-0.5,0) -- ++(-0.25,5-0.4*X) }
}}]
path foreach X in {0,1,2,3} {(45-90*X:6) + (-45-90*X:-0.5)coordinate (XX)};
draw[fill=green!70!blue,rotate=45,rounded corners=1mm] (X0) [dentrite leg=0]
[rotate=-90] to[out=45,in=-225] (X1) [dentrite leg=1]
[rotate=-90] to[out=45,in=-225] (X2) [dentrite leg=2]
[rotate=-90] to[out=45,in=-225] (X3) [dentrite leg=3]
[rotate=-90] to[out=45,in=-135] cycle;
draw[-latex] (dentrite-top-3) -- ++ (135:1) node[above left]{$vec n$};
end{tikzpicture}
end{document}

I understand that this may not be the final version of the picture you are after. You will need to tune things here and there to arrive there, I focused on the simple things.
add a comment |
Here is a way to use the other answer to patch together a continuous path. I do not have the time for fine-tuning. You just copy the path from this answer and make it a style using insert path. The patches can then be moved and rotated and, what is important here, combined to a longer path.
documentclass[tikz,border=3.14mm]{standalone}
begin{document}
begin{tikzpicture}[thick,scale=0.4,
dentrite leg/.style={insert path={% based on https://tex.stackexchange.com/a/182966/121799
foreach X in {0,...,10}
{ -- ++(0.25,5-0.4*X) -- ++(0.5,0) -- ++(0.25, -5+0.4*X) -- ++(0.5,0) }
-- ++(0.3,1) to[out=0,in=135] ++(2,-1.5) coordinate(dentrite-top-#1)
to[out=-135,in=0] ++(-2,-1.5) -- ++(-0.3,1)
foreach X in {10,9,...,0}
{ -- ++(-0.5,0)-- ++(-0.25, -5+0.4*X)-- ++(-0.5,0) -- ++(-0.25,5-0.4*X) }
}}]
path foreach X in {0,1,2,3} {(45-90*X:6) + (-45-90*X:-0.5)coordinate (XX)};
draw[fill=green!70!blue,rotate=45,rounded corners=1mm] (X0) [dentrite leg=0]
[rotate=-90] to[out=45,in=-225] (X1) [dentrite leg=1]
[rotate=-90] to[out=45,in=-225] (X2) [dentrite leg=2]
[rotate=-90] to[out=45,in=-225] (X3) [dentrite leg=3]
[rotate=-90] to[out=45,in=-135] cycle;
draw[-latex] (dentrite-top-3) -- ++ (135:1) node[above left]{$vec n$};
end{tikzpicture}
end{document}

I understand that this may not be the final version of the picture you are after. You will need to tune things here and there to arrive there, I focused on the simple things.
Here is a way to use the other answer to patch together a continuous path. I do not have the time for fine-tuning. You just copy the path from this answer and make it a style using insert path. The patches can then be moved and rotated and, what is important here, combined to a longer path.
documentclass[tikz,border=3.14mm]{standalone}
begin{document}
begin{tikzpicture}[thick,scale=0.4,
dentrite leg/.style={insert path={% based on https://tex.stackexchange.com/a/182966/121799
foreach X in {0,...,10}
{ -- ++(0.25,5-0.4*X) -- ++(0.5,0) -- ++(0.25, -5+0.4*X) -- ++(0.5,0) }
-- ++(0.3,1) to[out=0,in=135] ++(2,-1.5) coordinate(dentrite-top-#1)
to[out=-135,in=0] ++(-2,-1.5) -- ++(-0.3,1)
foreach X in {10,9,...,0}
{ -- ++(-0.5,0)-- ++(-0.25, -5+0.4*X)-- ++(-0.5,0) -- ++(-0.25,5-0.4*X) }
}}]
path foreach X in {0,1,2,3} {(45-90*X:6) + (-45-90*X:-0.5)coordinate (XX)};
draw[fill=green!70!blue,rotate=45,rounded corners=1mm] (X0) [dentrite leg=0]
[rotate=-90] to[out=45,in=-225] (X1) [dentrite leg=1]
[rotate=-90] to[out=45,in=-225] (X2) [dentrite leg=2]
[rotate=-90] to[out=45,in=-225] (X3) [dentrite leg=3]
[rotate=-90] to[out=45,in=-135] cycle;
draw[-latex] (dentrite-top-3) -- ++ (135:1) node[above left]{$vec n$};
end{tikzpicture}
end{document}

I understand that this may not be the final version of the picture you are after. You will need to tune things here and there to arrive there, I focused on the simple things.
answered 2 hours ago
marmotmarmot
110k5137256
110k5137256
add a comment |
add a comment |
TikzNewbie is a new contributor. Be nice, and check out our Code of Conduct.
TikzNewbie is a new contributor. Be nice, and check out our Code of Conduct.
TikzNewbie is a new contributor. Be nice, and check out our Code of Conduct.
TikzNewbie is a new contributor. Be nice, and check out our Code of Conduct.
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.
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%2f480762%2fhow-to-draw-2d-dendrite-shape-with-surface-normal%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
1
Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including
documentclassand the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem.– samcarter
4 hours ago
It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The Stack Exchange staff can merge them together for you.
– samcarter
3 hours ago