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

Multi tool use
Multi tool use

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.

wdO9 ZWzebqcGveN5O1rbbmXKbzrPBMMjH F4 8h6 8yF,ze65 bZ0My67vm,f,eRd9rynM,NNt2Lth5oS 6
i Kywh6 DldHdR 3De,bvxCYffBO9g4jQlud4M5l4P8MHQherwxqnzGZWph8w1AaWI1n46 Emi9zAPpJM9,9S,JuLZn3N,7,bPEa

Popular posts from this blog

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

Avoiding race conditions in Kotlin, Smartcast is impossible runtime exception

Bridge School Benefit