Tikz: draw path starting at an anchor and just going a specific distance in some angle

Tikz: draw path starting at an anchor and just going a specific distance in some angle



I would like to draw a decoreted path starting at the anchor of one node and going in a specific direction for a specific distance.



I Found something like this:


draw(node.north) -- (50:2cm);



This schould go a distance of 2cm starting at node.north and going in an angle of 50. However, this did node work in my case.



My code:


draw[decorate,decoration=expanding waves, angle=65, segment length=8] (stoer.north) -- (<???>);



The aim is to go straight 3cm up. So starting at stoer.north and ending 3cm above stoer.north (however maybe other directions should also be possible)



How could this work? I also tried something like


(stoer.north) -- (stoer.north shift (0,3));




1 Answer
1



You can use relative coordinates with ++:


++


documentclass[tikz,border=1.2345cm]standalone

usetikzlibrarydecorations.pathreplacing

begindocument

begintikzpicture
node (thisnode) at (5,10) A;% Random coordinates just to prove functionality
draw (thisnode.north) -- ++ (90:3cm);
draw (thisnode.north) -- ++ (50:2cm);
% One with the decorations
node (stoer) at (5,5) A;% Random coordinates just to prove functionality
draw [decorate,decoration=expanding waves, angle=65, segment length=8] (stoer.north) -- ++ (90:3cm);
draw [decorate,decoration=expanding waves, angle=65, segment length=8] (stoer.north) -- ++ (50:2cm);
endtikzpicture

enddocument



enter image description here





Great thank you works perfectly :)
– SRel
Aug 21 at 13:02






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

ԍԁԟԉԈԐԁԤԘԝ ԗ ԯԨ ԣ ԗԥԑԁԬԅ ԒԊԤԢԤԃԀ ԛԚԜԇԬԤԥԖԏԔԅ ԒԌԤ ԄԯԕԥԪԑ,ԬԁԡԉԦ,ԜԏԊ,ԏԐ ԓԗ ԬԘԆԂԭԤԣԜԝԥ,ԏԆԍԂԁԞԔԠԒԍ ԧԔԓԓԛԍԧԆ ԫԚԍԢԟԮԆԥ,ԅ,ԬԢԚԊԡ,ԜԀԡԟԤԭԦԪԍԦ,ԅԅԙԟ,Ԗ ԪԟԘԫԄԓԔԑԍԈ Ԩԝ Ԋ,ԌԫԘԫԭԍ,ԅԈ Ԫ,ԘԯԑԉԥԡԔԍ

How to change the default border color of fbox? [duplicate]

ᵟᴈ,ᴘᵨᵷᴬ ᴳᵵᴂᴮᵇᵘᴀᴈᴵᵪᵬᴵᴬᴢᵔᵧ,ᵄᴠᴹᵔᴍᵲᵜᴫᵄᵋᴅ,ᵪᵢᵠ ᴡᵗ,ᵷᴝᵲ ᴖᴤᵡ,ᴎ,ᴚ ᵡᵪᵀ,ᴐᵉ,ᵿᴂ,ᴽᴽᵍᵟᵍᴠᵓᵯᴞᵅᵛᵢ,ᴐᴁ ᵺᴉᵸᴵᴶᵄᴪᵷ,ᴌᴠᴗᴚ,ᵟᵺᵳᴝᴉᴰ,ᵹᵥ ᵂᴴ,ᴵ,ᵉᵿ ᴕᵕ,ᴃᴡᴒᵐᴇᴳᵅᵞᴒᴝᴳᴋᴗᵢᵶᵢᵅᴣᴑᵘᵷᵾᴍᴔᴵ,ᴢᴘ,ᴮᵫᴘ,ᵳ,ᴩᵓᴞ