Drawing a parametric line with unitary director vector produces a longer straight line using `PGFPlots`Find a...
A starship is travelling at 0.9c and collides with a small rock. Will it leave a clean hole through, or will more happen?
Why maximum length of IP, TCP, UDP packet is not suit?
Can the "Friends" spell be used without making the target hostile?
Do authors have to be politically correct in article-writing?
Should I always close BufferedReader?
Is there any risk in sharing info about technologies and products we use with a supplier?
Does Skippy chunky peanut butter contain trans fat?
How to deal with possible delayed baggage?
Eww, those bytes are gross
Why do neural networks need so many training examples to perform?
How would an AI self awareness kill switch work?
The effect of fishing on total land area needed to feed an island settlement
How to define systemd "ConsistsOf" relationship
Existence of Riemann surface, holomorphic maps
Has Britain negotiated with any other countries outside the EU in preparation for the exit?
What is a good reason for every spaceship to carry a weapon on board?
Cryptic with some cross words
Best way to strengthen a wheel?
Is there a lava-breathing lizard creature (that could be worshipped by a cult) in 5e?
Potential client has a problematic employee I can't work with
How does Leonard in "Memento" remember reading and writing?
Does the ditching switch allow an A320 to float indefinitely?
Calculate the true diameter of stars from photographic plate
What is the difference between "...", '...', $'...', and $"..." quotes?
Drawing a parametric line with unitary director vector produces a longer straight line using `PGFPlots`
Find a good view for a function by parts using tikzpicture environment [Overleaf]pgfplots: positioning a normal and tangent vector on a 3d surfaceStraight line junction with an arcMake straight line between two nodesDrawing a straight line over a coordinateTikz: drawing a straight line down in a rotated scopeParametric tikzset style with argumentWhy isn't my TikZ line straight?Microstrip line drawing using TikZ - dimensionsDrawing straight line between two pointsDrawing a curve knowing its parametric equationsTIKZ drawing vector field
I would like to plot a normal bounded line to a surface in a point.
The surface is y=x
and the point is (1/2,1/2,1)
. The gradient is (-1,1,0)
, and at point (1/2,1/2,1)
is still the same, thus the normal line would be (x-1/2)/(-1)=(y-1/2)/(1)=(z-1)/(0)
, hence the line is described by (.5,.5,1)+t(-1,1,0)
.
However, I want the line to be bounded, in order to make a unitary director vector, but I am not able to do these. I am using t
between 0
and 1
, but these draw a long line; I want it to be a vector of length 1
.
I am not sure if this math is correct. If I find the unitary vector of (-1,1,0)
it is (-1,1,0)/(sqrt(2))
i.e. (-sqrt(2)/2,sqrt(2)/2,0)
then I still do not have a vector of length 1
(when t
is between 0
and 1
).
Here is my MWE:
documentclass{article}
usepackage[a4paper,margin=1in,footskip=0.25in]{geometry}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
begin{document}
begin{center}
begin{tikzpicture}
begin{axis} [
title={Without normalizing $(-1,1,0)$ ($tin[0,1]$)},
axis on top,
axis lines=center,
xlabel=$x$,
ylabel=$y$,
zlabel=$z$,
ticklabel style={font=tiny},
view={115}{25}
]
addplot3[opacity=.5,surf,samples=21,variable=t,variable y=s,domain=0:2,y domain=0:90,z buffer=sort,colormap={red}{color=(red) color=(red)}] ({t*cos(s)*(sqrt(2)*.5)},{t*cos(s)*(sqrt(2)*.5)},{t*sin(s)});%Red S
addplot3[-stealth,variable=t,domain=0:1] ({1/2+t},{1/2-t},{1});
end{axis}
end{tikzpicture}
hfill
begin{tikzpicture}
begin{axis} [
title={Normalizing $(-1,1,0)$ ($tin[0,1]$)},
axis on top,
axis lines=center,
xlabel=$x$,
ylabel=$y$,
zlabel=$z$,
ticklabel style={font=tiny},
view={115}{25}
]
addplot3[opacity=.5,surf,samples=21,variable=t,variable y=s,domain=0:2,y domain=0:90,z buffer=sort,colormap={red}{color=(red) color=(red)}] ({t*cos(s)*(sqrt(2)*.5)},{t*cos(s)*(sqrt(2)*.5)},{t*sin(s)});%Red S
addplot3[-stealth,variable=t,domain=0:1] ({1/2+(sqrt(2)/2)*t},{1/2-(sqrt(2)/2)*t},{1});
end{axis}
end{tikzpicture}
end{center}
end{document}
Even the line has a bad quality, it looks pixelated:
Does anyone know how to produce a vector of length 1
or what am I missing?
Some links of interest:
pgfplots
: positioning a normal and tangent vector on a 3d surface- Find a good view for a function by parts using
tikzpicture
environment [Overleaf]
Thanks!!
tikz-pgf
add a comment |
I would like to plot a normal bounded line to a surface in a point.
The surface is y=x
and the point is (1/2,1/2,1)
. The gradient is (-1,1,0)
, and at point (1/2,1/2,1)
is still the same, thus the normal line would be (x-1/2)/(-1)=(y-1/2)/(1)=(z-1)/(0)
, hence the line is described by (.5,.5,1)+t(-1,1,0)
.
However, I want the line to be bounded, in order to make a unitary director vector, but I am not able to do these. I am using t
between 0
and 1
, but these draw a long line; I want it to be a vector of length 1
.
I am not sure if this math is correct. If I find the unitary vector of (-1,1,0)
it is (-1,1,0)/(sqrt(2))
i.e. (-sqrt(2)/2,sqrt(2)/2,0)
then I still do not have a vector of length 1
(when t
is between 0
and 1
).
Here is my MWE:
documentclass{article}
usepackage[a4paper,margin=1in,footskip=0.25in]{geometry}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
begin{document}
begin{center}
begin{tikzpicture}
begin{axis} [
title={Without normalizing $(-1,1,0)$ ($tin[0,1]$)},
axis on top,
axis lines=center,
xlabel=$x$,
ylabel=$y$,
zlabel=$z$,
ticklabel style={font=tiny},
view={115}{25}
]
addplot3[opacity=.5,surf,samples=21,variable=t,variable y=s,domain=0:2,y domain=0:90,z buffer=sort,colormap={red}{color=(red) color=(red)}] ({t*cos(s)*(sqrt(2)*.5)},{t*cos(s)*(sqrt(2)*.5)},{t*sin(s)});%Red S
addplot3[-stealth,variable=t,domain=0:1] ({1/2+t},{1/2-t},{1});
end{axis}
end{tikzpicture}
hfill
begin{tikzpicture}
begin{axis} [
title={Normalizing $(-1,1,0)$ ($tin[0,1]$)},
axis on top,
axis lines=center,
xlabel=$x$,
ylabel=$y$,
zlabel=$z$,
ticklabel style={font=tiny},
view={115}{25}
]
addplot3[opacity=.5,surf,samples=21,variable=t,variable y=s,domain=0:2,y domain=0:90,z buffer=sort,colormap={red}{color=(red) color=(red)}] ({t*cos(s)*(sqrt(2)*.5)},{t*cos(s)*(sqrt(2)*.5)},{t*sin(s)});%Red S
addplot3[-stealth,variable=t,domain=0:1] ({1/2+(sqrt(2)/2)*t},{1/2-(sqrt(2)/2)*t},{1});
end{axis}
end{tikzpicture}
end{center}
end{document}
Even the line has a bad quality, it looks pixelated:
Does anyone know how to produce a vector of length 1
or what am I missing?
Some links of interest:
pgfplots
: positioning a normal and tangent vector on a 3d surface- Find a good view for a function by parts using
tikzpicture
environment [Overleaf]
Thanks!!
tikz-pgf
add a comment |
I would like to plot a normal bounded line to a surface in a point.
The surface is y=x
and the point is (1/2,1/2,1)
. The gradient is (-1,1,0)
, and at point (1/2,1/2,1)
is still the same, thus the normal line would be (x-1/2)/(-1)=(y-1/2)/(1)=(z-1)/(0)
, hence the line is described by (.5,.5,1)+t(-1,1,0)
.
However, I want the line to be bounded, in order to make a unitary director vector, but I am not able to do these. I am using t
between 0
and 1
, but these draw a long line; I want it to be a vector of length 1
.
I am not sure if this math is correct. If I find the unitary vector of (-1,1,0)
it is (-1,1,0)/(sqrt(2))
i.e. (-sqrt(2)/2,sqrt(2)/2,0)
then I still do not have a vector of length 1
(when t
is between 0
and 1
).
Here is my MWE:
documentclass{article}
usepackage[a4paper,margin=1in,footskip=0.25in]{geometry}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
begin{document}
begin{center}
begin{tikzpicture}
begin{axis} [
title={Without normalizing $(-1,1,0)$ ($tin[0,1]$)},
axis on top,
axis lines=center,
xlabel=$x$,
ylabel=$y$,
zlabel=$z$,
ticklabel style={font=tiny},
view={115}{25}
]
addplot3[opacity=.5,surf,samples=21,variable=t,variable y=s,domain=0:2,y domain=0:90,z buffer=sort,colormap={red}{color=(red) color=(red)}] ({t*cos(s)*(sqrt(2)*.5)},{t*cos(s)*(sqrt(2)*.5)},{t*sin(s)});%Red S
addplot3[-stealth,variable=t,domain=0:1] ({1/2+t},{1/2-t},{1});
end{axis}
end{tikzpicture}
hfill
begin{tikzpicture}
begin{axis} [
title={Normalizing $(-1,1,0)$ ($tin[0,1]$)},
axis on top,
axis lines=center,
xlabel=$x$,
ylabel=$y$,
zlabel=$z$,
ticklabel style={font=tiny},
view={115}{25}
]
addplot3[opacity=.5,surf,samples=21,variable=t,variable y=s,domain=0:2,y domain=0:90,z buffer=sort,colormap={red}{color=(red) color=(red)}] ({t*cos(s)*(sqrt(2)*.5)},{t*cos(s)*(sqrt(2)*.5)},{t*sin(s)});%Red S
addplot3[-stealth,variable=t,domain=0:1] ({1/2+(sqrt(2)/2)*t},{1/2-(sqrt(2)/2)*t},{1});
end{axis}
end{tikzpicture}
end{center}
end{document}
Even the line has a bad quality, it looks pixelated:
Does anyone know how to produce a vector of length 1
or what am I missing?
Some links of interest:
pgfplots
: positioning a normal and tangent vector on a 3d surface- Find a good view for a function by parts using
tikzpicture
environment [Overleaf]
Thanks!!
tikz-pgf
I would like to plot a normal bounded line to a surface in a point.
The surface is y=x
and the point is (1/2,1/2,1)
. The gradient is (-1,1,0)
, and at point (1/2,1/2,1)
is still the same, thus the normal line would be (x-1/2)/(-1)=(y-1/2)/(1)=(z-1)/(0)
, hence the line is described by (.5,.5,1)+t(-1,1,0)
.
However, I want the line to be bounded, in order to make a unitary director vector, but I am not able to do these. I am using t
between 0
and 1
, but these draw a long line; I want it to be a vector of length 1
.
I am not sure if this math is correct. If I find the unitary vector of (-1,1,0)
it is (-1,1,0)/(sqrt(2))
i.e. (-sqrt(2)/2,sqrt(2)/2,0)
then I still do not have a vector of length 1
(when t
is between 0
and 1
).
Here is my MWE:
documentclass{article}
usepackage[a4paper,margin=1in,footskip=0.25in]{geometry}
usepackage{pgfplots}
pgfplotsset{compat=1.15}
begin{document}
begin{center}
begin{tikzpicture}
begin{axis} [
title={Without normalizing $(-1,1,0)$ ($tin[0,1]$)},
axis on top,
axis lines=center,
xlabel=$x$,
ylabel=$y$,
zlabel=$z$,
ticklabel style={font=tiny},
view={115}{25}
]
addplot3[opacity=.5,surf,samples=21,variable=t,variable y=s,domain=0:2,y domain=0:90,z buffer=sort,colormap={red}{color=(red) color=(red)}] ({t*cos(s)*(sqrt(2)*.5)},{t*cos(s)*(sqrt(2)*.5)},{t*sin(s)});%Red S
addplot3[-stealth,variable=t,domain=0:1] ({1/2+t},{1/2-t},{1});
end{axis}
end{tikzpicture}
hfill
begin{tikzpicture}
begin{axis} [
title={Normalizing $(-1,1,0)$ ($tin[0,1]$)},
axis on top,
axis lines=center,
xlabel=$x$,
ylabel=$y$,
zlabel=$z$,
ticklabel style={font=tiny},
view={115}{25}
]
addplot3[opacity=.5,surf,samples=21,variable=t,variable y=s,domain=0:2,y domain=0:90,z buffer=sort,colormap={red}{color=(red) color=(red)}] ({t*cos(s)*(sqrt(2)*.5)},{t*cos(s)*(sqrt(2)*.5)},{t*sin(s)});%Red S
addplot3[-stealth,variable=t,domain=0:1] ({1/2+(sqrt(2)/2)*t},{1/2-(sqrt(2)/2)*t},{1});
end{axis}
end{tikzpicture}
end{center}
end{document}
Even the line has a bad quality, it looks pixelated:
Does anyone know how to produce a vector of length 1
or what am I missing?
Some links of interest:
pgfplots
: positioning a normal and tangent vector on a 3d surface- Find a good view for a function by parts using
tikzpicture
environment [Overleaf]
Thanks!!
tikz-pgf
tikz-pgf
edited 1 min ago
manooooh
asked 8 mins ago
manoooohmanooooh
1,1221516
1,1221516
add a comment |
add a comment |
0
active
oldest
votes
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
});
}
});
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%2f476811%2fdrawing-a-parametric-line-with-unitary-director-vector-produces-a-longer-straigh%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f476811%2fdrawing-a-parametric-line-with-unitary-director-vector-produces-a-longer-straigh%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