Multiple Tangents in Tikz
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I would like to draw an ellipse with a large number of tangents drawn on it. Currently my code is very tedious to draw a lot of tangents for and the compiling time takes considerably longer for more and more tangents. Here is my current code:
documentclass[english]article
usepackage[T1]fontenc
usepackage[latin9]luainputenc
makeatletter
usepackagetikz
usetikzlibrarydecorations.markings
makeatother
usepackagebabel
begindocument
begintikzpicture[
tangent/.style=
decoration=
markings,% switch on markings
mark=
at position #1
with
coordinate (tangent point-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,0pt);
coordinate (tangent unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (1,0pt);
coordinate (tangent orthogonal unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,1);
,
postaction=decorate
,
use tangent/.style=
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
,
use tangent/.default=1
]
foreach x in 0,0.05,...,1.1
draw [
tangent=0,
tangent=0.1,
tangent=0.2,
tangent=0.2,
tangent=0.3,
tangent=0.4,
tangent=0.5,
tangent=0.6,
tangent=0.7,
tangent=0.8,
tangent=0.9,
tangent=1.0,
tangent=1.1,
] (-0.25,0)
to [out=-90,in=-90] (1.25,0)
to [out=90,in=90] (-0.25,0);
beginscope
clip (0,0) circle (1.5);
draw [thick, use tangent] (-3,0) -- (3,0);
draw [thick, use tangent=2] (-3,0) -- (3,0);
draw [thick, use tangent=3] (-3,0) -- (3,0);
draw [thick, use tangent=4] (-3,0) -- (3,0);
draw [thick, use tangent=5] (-3,0) -- (3,0);
draw [thick, use tangent=6] (-3,0) -- (3,0);
draw [thick, use tangent=7] (-3,0) -- (3,0);
draw [thick, use tangent=8] (-3,0) -- (3,0);
draw [thick, use tangent=9] (-3,0) -- (3,0);
draw [thick, use tangent=10] (-3,0) -- (3,0);
draw [thick, use tangent=11] (-3,0) -- (3,0);
endscope
draw (0,0) circle (1.5);
fill (0,0) circle (0.1) (1,0) circle (0.1);
endtikzpicture
enddocument
The code produces the following image, which is not that many tangents.
So I would like an easy way to draw more tangents around the ellipse inside the circle
tikz-pgf
add a comment |Â
up vote
1
down vote
favorite
I would like to draw an ellipse with a large number of tangents drawn on it. Currently my code is very tedious to draw a lot of tangents for and the compiling time takes considerably longer for more and more tangents. Here is my current code:
documentclass[english]article
usepackage[T1]fontenc
usepackage[latin9]luainputenc
makeatletter
usepackagetikz
usetikzlibrarydecorations.markings
makeatother
usepackagebabel
begindocument
begintikzpicture[
tangent/.style=
decoration=
markings,% switch on markings
mark=
at position #1
with
coordinate (tangent point-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,0pt);
coordinate (tangent unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (1,0pt);
coordinate (tangent orthogonal unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,1);
,
postaction=decorate
,
use tangent/.style=
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
,
use tangent/.default=1
]
foreach x in 0,0.05,...,1.1
draw [
tangent=0,
tangent=0.1,
tangent=0.2,
tangent=0.2,
tangent=0.3,
tangent=0.4,
tangent=0.5,
tangent=0.6,
tangent=0.7,
tangent=0.8,
tangent=0.9,
tangent=1.0,
tangent=1.1,
] (-0.25,0)
to [out=-90,in=-90] (1.25,0)
to [out=90,in=90] (-0.25,0);
beginscope
clip (0,0) circle (1.5);
draw [thick, use tangent] (-3,0) -- (3,0);
draw [thick, use tangent=2] (-3,0) -- (3,0);
draw [thick, use tangent=3] (-3,0) -- (3,0);
draw [thick, use tangent=4] (-3,0) -- (3,0);
draw [thick, use tangent=5] (-3,0) -- (3,0);
draw [thick, use tangent=6] (-3,0) -- (3,0);
draw [thick, use tangent=7] (-3,0) -- (3,0);
draw [thick, use tangent=8] (-3,0) -- (3,0);
draw [thick, use tangent=9] (-3,0) -- (3,0);
draw [thick, use tangent=10] (-3,0) -- (3,0);
draw [thick, use tangent=11] (-3,0) -- (3,0);
endscope
draw (0,0) circle (1.5);
fill (0,0) circle (0.1) (1,0) circle (0.1);
endtikzpicture
enddocument
The code produces the following image, which is not that many tangents.
So I would like an easy way to draw more tangents around the ellipse inside the circle
tikz-pgf
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I would like to draw an ellipse with a large number of tangents drawn on it. Currently my code is very tedious to draw a lot of tangents for and the compiling time takes considerably longer for more and more tangents. Here is my current code:
documentclass[english]article
usepackage[T1]fontenc
usepackage[latin9]luainputenc
makeatletter
usepackagetikz
usetikzlibrarydecorations.markings
makeatother
usepackagebabel
begindocument
begintikzpicture[
tangent/.style=
decoration=
markings,% switch on markings
mark=
at position #1
with
coordinate (tangent point-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,0pt);
coordinate (tangent unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (1,0pt);
coordinate (tangent orthogonal unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,1);
,
postaction=decorate
,
use tangent/.style=
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
,
use tangent/.default=1
]
foreach x in 0,0.05,...,1.1
draw [
tangent=0,
tangent=0.1,
tangent=0.2,
tangent=0.2,
tangent=0.3,
tangent=0.4,
tangent=0.5,
tangent=0.6,
tangent=0.7,
tangent=0.8,
tangent=0.9,
tangent=1.0,
tangent=1.1,
] (-0.25,0)
to [out=-90,in=-90] (1.25,0)
to [out=90,in=90] (-0.25,0);
beginscope
clip (0,0) circle (1.5);
draw [thick, use tangent] (-3,0) -- (3,0);
draw [thick, use tangent=2] (-3,0) -- (3,0);
draw [thick, use tangent=3] (-3,0) -- (3,0);
draw [thick, use tangent=4] (-3,0) -- (3,0);
draw [thick, use tangent=5] (-3,0) -- (3,0);
draw [thick, use tangent=6] (-3,0) -- (3,0);
draw [thick, use tangent=7] (-3,0) -- (3,0);
draw [thick, use tangent=8] (-3,0) -- (3,0);
draw [thick, use tangent=9] (-3,0) -- (3,0);
draw [thick, use tangent=10] (-3,0) -- (3,0);
draw [thick, use tangent=11] (-3,0) -- (3,0);
endscope
draw (0,0) circle (1.5);
fill (0,0) circle (0.1) (1,0) circle (0.1);
endtikzpicture
enddocument
The code produces the following image, which is not that many tangents.
So I would like an easy way to draw more tangents around the ellipse inside the circle
tikz-pgf
I would like to draw an ellipse with a large number of tangents drawn on it. Currently my code is very tedious to draw a lot of tangents for and the compiling time takes considerably longer for more and more tangents. Here is my current code:
documentclass[english]article
usepackage[T1]fontenc
usepackage[latin9]luainputenc
makeatletter
usepackagetikz
usetikzlibrarydecorations.markings
makeatother
usepackagebabel
begindocument
begintikzpicture[
tangent/.style=
decoration=
markings,% switch on markings
mark=
at position #1
with
coordinate (tangent point-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,0pt);
coordinate (tangent unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (1,0pt);
coordinate (tangent orthogonal unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,1);
,
postaction=decorate
,
use tangent/.style=
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
,
use tangent/.default=1
]
foreach x in 0,0.05,...,1.1
draw [
tangent=0,
tangent=0.1,
tangent=0.2,
tangent=0.2,
tangent=0.3,
tangent=0.4,
tangent=0.5,
tangent=0.6,
tangent=0.7,
tangent=0.8,
tangent=0.9,
tangent=1.0,
tangent=1.1,
] (-0.25,0)
to [out=-90,in=-90] (1.25,0)
to [out=90,in=90] (-0.25,0);
beginscope
clip (0,0) circle (1.5);
draw [thick, use tangent] (-3,0) -- (3,0);
draw [thick, use tangent=2] (-3,0) -- (3,0);
draw [thick, use tangent=3] (-3,0) -- (3,0);
draw [thick, use tangent=4] (-3,0) -- (3,0);
draw [thick, use tangent=5] (-3,0) -- (3,0);
draw [thick, use tangent=6] (-3,0) -- (3,0);
draw [thick, use tangent=7] (-3,0) -- (3,0);
draw [thick, use tangent=8] (-3,0) -- (3,0);
draw [thick, use tangent=9] (-3,0) -- (3,0);
draw [thick, use tangent=10] (-3,0) -- (3,0);
draw [thick, use tangent=11] (-3,0) -- (3,0);
endscope
draw (0,0) circle (1.5);
fill (0,0) circle (0.1) (1,0) circle (0.1);
endtikzpicture
enddocument
The code produces the following image, which is not that many tangents.
So I would like an easy way to draw more tangents around the ellipse inside the circle
tikz-pgf
tikz-pgf
asked 1 hour ago


sab hoque
1,023317
1,023317
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
With a bit of code reorganisation ;)
documentclass[english]article
usepackage[T1]fontenc
usepackage[latin9]luainputenc
makeatletter
usepackagetikz
usetikzlibrarydecorations.markings
makeatother
usepackagebabel
begindocument
begintikzpicture[
tangent/.style=
decoration=
markings,% switch on markings
mark=
at position #1
with
coordinate (tangent point-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,0pt);
coordinate (tangent unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (1,0pt);
coordinate (tangent orthogonal unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,1);
,
postaction=decorate
,
use tangent/.style=
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
,
use tangent/.default=1
]
beginscope
clip (0,0) circle (1.5);
foreach x in 0,0.02,...,1.1
draw [tangent=x] (-0.25,0) to [out=-90,in=-90] (1.25,0) to [out=90,in=90] (-0.25,0);
draw [thick, use tangent] (-3,0) -- (3,0);
endscope
draw (0,0) circle (1.5);
fill (0,0) circle (0.1) (1,0) circle (0.1);
endtikzpicture
enddocument
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
With a bit of code reorganisation ;)
documentclass[english]article
usepackage[T1]fontenc
usepackage[latin9]luainputenc
makeatletter
usepackagetikz
usetikzlibrarydecorations.markings
makeatother
usepackagebabel
begindocument
begintikzpicture[
tangent/.style=
decoration=
markings,% switch on markings
mark=
at position #1
with
coordinate (tangent point-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,0pt);
coordinate (tangent unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (1,0pt);
coordinate (tangent orthogonal unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,1);
,
postaction=decorate
,
use tangent/.style=
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
,
use tangent/.default=1
]
beginscope
clip (0,0) circle (1.5);
foreach x in 0,0.02,...,1.1
draw [tangent=x] (-0.25,0) to [out=-90,in=-90] (1.25,0) to [out=90,in=90] (-0.25,0);
draw [thick, use tangent] (-3,0) -- (3,0);
endscope
draw (0,0) circle (1.5);
fill (0,0) circle (0.1) (1,0) circle (0.1);
endtikzpicture
enddocument
add a comment |Â
up vote
4
down vote
accepted
With a bit of code reorganisation ;)
documentclass[english]article
usepackage[T1]fontenc
usepackage[latin9]luainputenc
makeatletter
usepackagetikz
usetikzlibrarydecorations.markings
makeatother
usepackagebabel
begindocument
begintikzpicture[
tangent/.style=
decoration=
markings,% switch on markings
mark=
at position #1
with
coordinate (tangent point-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,0pt);
coordinate (tangent unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (1,0pt);
coordinate (tangent orthogonal unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,1);
,
postaction=decorate
,
use tangent/.style=
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
,
use tangent/.default=1
]
beginscope
clip (0,0) circle (1.5);
foreach x in 0,0.02,...,1.1
draw [tangent=x] (-0.25,0) to [out=-90,in=-90] (1.25,0) to [out=90,in=90] (-0.25,0);
draw [thick, use tangent] (-3,0) -- (3,0);
endscope
draw (0,0) circle (1.5);
fill (0,0) circle (0.1) (1,0) circle (0.1);
endtikzpicture
enddocument
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
With a bit of code reorganisation ;)
documentclass[english]article
usepackage[T1]fontenc
usepackage[latin9]luainputenc
makeatletter
usepackagetikz
usetikzlibrarydecorations.markings
makeatother
usepackagebabel
begindocument
begintikzpicture[
tangent/.style=
decoration=
markings,% switch on markings
mark=
at position #1
with
coordinate (tangent point-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,0pt);
coordinate (tangent unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (1,0pt);
coordinate (tangent orthogonal unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,1);
,
postaction=decorate
,
use tangent/.style=
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
,
use tangent/.default=1
]
beginscope
clip (0,0) circle (1.5);
foreach x in 0,0.02,...,1.1
draw [tangent=x] (-0.25,0) to [out=-90,in=-90] (1.25,0) to [out=90,in=90] (-0.25,0);
draw [thick, use tangent] (-3,0) -- (3,0);
endscope
draw (0,0) circle (1.5);
fill (0,0) circle (0.1) (1,0) circle (0.1);
endtikzpicture
enddocument
With a bit of code reorganisation ;)
documentclass[english]article
usepackage[T1]fontenc
usepackage[latin9]luainputenc
makeatletter
usepackagetikz
usetikzlibrarydecorations.markings
makeatother
usepackagebabel
begindocument
begintikzpicture[
tangent/.style=
decoration=
markings,% switch on markings
mark=
at position #1
with
coordinate (tangent point-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,0pt);
coordinate (tangent unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (1,0pt);
coordinate (tangent orthogonal unit vector-pgfkeysvalueof/pgf/decoration/mark info/sequence number) at (0pt,1);
,
postaction=decorate
,
use tangent/.style=
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
,
use tangent/.default=1
]
beginscope
clip (0,0) circle (1.5);
foreach x in 0,0.02,...,1.1
draw [tangent=x] (-0.25,0) to [out=-90,in=-90] (1.25,0) to [out=90,in=90] (-0.25,0);
draw [thick, use tangent] (-3,0) -- (3,0);
endscope
draw (0,0) circle (1.5);
fill (0,0) circle (0.1) (1,0) circle (0.1);
endtikzpicture
enddocument
edited 46 mins ago
answered 1 hour ago


BambOo
2,632323
2,632323
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f452237%2fmultiple-tangents-in-tikz%23new-answer', 'question_page');
);
Post as a guest
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
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
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