Can't make parabola without including the tipMacro to draw a parabola with pgf/TikZExample of matrix node in...
Why can't we use uninitialized local variable to access static content of its type?
Floating Point XOR
Is the name of an interval between two notes unique and absolute?
Inquiry answerer
How can I create folders in folders in terminal
How often is duct tape used during crewed space missions?
Whence comes increasing usage of "I'll do an X" instead of "I'll have" in ordering food?
Account creation and log-in system
Simple way to decompose a lists in a certain way?
What is the word for a person who destroys monuments?
Can one guy with a duplicator trigger a nuclear apocalypse?
All numbers in a 5x5 Minesweeper grid
Why are there two bearded faces wearing red hats on my stealth bomber icon?
What are the end bytes of *.docx file format
Should I inform my future product owner that there is a good chance that a team member will leave the company soon?
Strength of Female Chimpanzees vs. Male Chimpanzees?
Can Brexit be undone in an emergency?
Which block cipher parameters should be kept secret?
Why are two-stroke engines nearly unheard of in aviation?
Why are there no programmes / playbills for movies?
My passport was stamped with an exit stamp while transiting to another Schengen country via Turkey. Was this a mistake?
If people's daily habits are reliable then why is the stock market so unpredictable?
Why do we need to use transistors when building an OR gate?
How is underwater propagation of sound possible?
Can't make parabola without including the tip
Macro to draw a parabola with pgf/TikZExample of matrix node in trees in tikzpictureNumerical conditional within tikz keys?Drawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingExtending a Tikz ParabolaHow to prevent pgf/tikz from drawing a circle as an ellipse when using relative coordinates?How to add additional border on the left and add additional boxes in the right corner with a labelLine up nested tikz enviroments or how to get rid of themSine function in pgfplots and MATLAB. Why are different results obtained?How to invert a parabola bend in TikZ
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I am trying to make an absolute value parabola function with TikZ. When I try to create the right and left sides of the parabola(the ones that would be underneath the x-axis in a normal function) I can't without including a bend underneath the x-axis.
taskbegin{tikzpicture}
draw (-10,0)--(10,0);
draw(0,0) parabola bend(-3,6)(-6,0);
draw(0,0) parabola bend(-3,-6)(2,10);
draw(-6,0) parabola bend(-3,-6)(-8,10);
end{tikzpicture}
tikz-pgf
New contributor
add a comment
|
I am trying to make an absolute value parabola function with TikZ. When I try to create the right and left sides of the parabola(the ones that would be underneath the x-axis in a normal function) I can't without including a bend underneath the x-axis.
taskbegin{tikzpicture}
draw (-10,0)--(10,0);
draw(0,0) parabola bend(-3,6)(-6,0);
draw(0,0) parabola bend(-3,-6)(2,10);
draw(-6,0) parabola bend(-3,-6)(-8,10);
end{tikzpicture}
tikz-pgf
New contributor
add a comment
|
I am trying to make an absolute value parabola function with TikZ. When I try to create the right and left sides of the parabola(the ones that would be underneath the x-axis in a normal function) I can't without including a bend underneath the x-axis.
taskbegin{tikzpicture}
draw (-10,0)--(10,0);
draw(0,0) parabola bend(-3,6)(-6,0);
draw(0,0) parabola bend(-3,-6)(2,10);
draw(-6,0) parabola bend(-3,-6)(-8,10);
end{tikzpicture}
tikz-pgf
New contributor
I am trying to make an absolute value parabola function with TikZ. When I try to create the right and left sides of the parabola(the ones that would be underneath the x-axis in a normal function) I can't without including a bend underneath the x-axis.
taskbegin{tikzpicture}
draw (-10,0)--(10,0);
draw(0,0) parabola bend(-3,6)(-6,0);
draw(0,0) parabola bend(-3,-6)(2,10);
draw(-6,0) parabola bend(-3,-6)(-8,10);
end{tikzpicture}
tikz-pgf
tikz-pgf
New contributor
New contributor
edited 8 hours ago
DiaWaterBender 4u
New contributor
asked 8 hours ago
DiaWaterBender 4uDiaWaterBender 4u
112 bronze badges
112 bronze badges
New contributor
New contributor
add a comment
|
add a comment
|
3 Answers
3
active
oldest
votes
Easiest solution is to draw two parabolas, one upside down, and clip them both to just show the parts above your line:
documentclass[border=3.14,tikz]{standalone}
begin{document}
begin{tikzpicture}
draw (-5,0)--(5,0);
begin{scope}
clip (-5,0) rectangle (5,6);
draw (-4,6) parabola bend (0,-2) (4,6);
draw (-4,-6) parabola bend (0,2) (4,-6);
end{scope}
end{tikzpicture}
end{document}
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
add a comment
|
Another simple solution is use the plot
function and define parabola accordingly:
documentclass[tikz,border=3mm]{standalone}
begin{document}
begin{tikzpicture}
draw (-5,0)--(5,0);
draw[semithick, red] plot [domain=-2:2] (2*x,{abs(x*x-1)});
end{tikzpicture}
end{document}
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated thanabs(x^2)
this would be the correct approach.
– Skillmon
6 hours ago
add a comment
|
This is really just for fun. You can make TikZ reflect the parabola (or anything you draw) at the x axis (say) automatically. This can be done by installing a nonlinear transformation, which is in this case particularly simple.
documentclass[tikz,border=3mm]{standalone}
usepgfmodule{nonlineartransformations}
makeatletter
defyreflect{%
pgfmathsetmacro{myy}{abs(pgf@y)}%
pgf@y=myy pt}
begin{document}
begin{tikzpicture}
begin{scope}[transform shape nonlinear=true]
pgftransformnonlinear{yreflect}
draw (-5,0)--(5,0);
draw (-4,6) parabola bend (0,-2) (4,6);
end{scope}
end{tikzpicture}
end{document}
As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
5 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
5 hours ago
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/4.0/"u003ecc by-sa 4.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
});
}
});
DiaWaterBender 4u 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%2f508554%2fcant-make-parabola-without-including-the-tip%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Easiest solution is to draw two parabolas, one upside down, and clip them both to just show the parts above your line:
documentclass[border=3.14,tikz]{standalone}
begin{document}
begin{tikzpicture}
draw (-5,0)--(5,0);
begin{scope}
clip (-5,0) rectangle (5,6);
draw (-4,6) parabola bend (0,-2) (4,6);
draw (-4,-6) parabola bend (0,2) (4,-6);
end{scope}
end{tikzpicture}
end{document}
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
add a comment
|
Easiest solution is to draw two parabolas, one upside down, and clip them both to just show the parts above your line:
documentclass[border=3.14,tikz]{standalone}
begin{document}
begin{tikzpicture}
draw (-5,0)--(5,0);
begin{scope}
clip (-5,0) rectangle (5,6);
draw (-4,6) parabola bend (0,-2) (4,6);
draw (-4,-6) parabola bend (0,2) (4,-6);
end{scope}
end{tikzpicture}
end{document}
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
add a comment
|
Easiest solution is to draw two parabolas, one upside down, and clip them both to just show the parts above your line:
documentclass[border=3.14,tikz]{standalone}
begin{document}
begin{tikzpicture}
draw (-5,0)--(5,0);
begin{scope}
clip (-5,0) rectangle (5,6);
draw (-4,6) parabola bend (0,-2) (4,6);
draw (-4,-6) parabola bend (0,2) (4,-6);
end{scope}
end{tikzpicture}
end{document}
Easiest solution is to draw two parabolas, one upside down, and clip them both to just show the parts above your line:
documentclass[border=3.14,tikz]{standalone}
begin{document}
begin{tikzpicture}
draw (-5,0)--(5,0);
begin{scope}
clip (-5,0) rectangle (5,6);
draw (-4,6) parabola bend (0,-2) (4,6);
draw (-4,-6) parabola bend (0,2) (4,-6);
end{scope}
end{tikzpicture}
end{document}
edited 7 hours ago
answered 7 hours ago
SkillmonSkillmon
28.1k1 gold badge28 silver badges59 bronze badges
28.1k1 gold badge28 silver badges59 bronze badges
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
add a comment
|
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
Approved always very simple solutions. Very good.
– Sebastiano
7 hours ago
add a comment
|
Another simple solution is use the plot
function and define parabola accordingly:
documentclass[tikz,border=3mm]{standalone}
begin{document}
begin{tikzpicture}
draw (-5,0)--(5,0);
draw[semithick, red] plot [domain=-2:2] (2*x,{abs(x*x-1)});
end{tikzpicture}
end{document}
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated thanabs(x^2)
this would be the correct approach.
– Skillmon
6 hours ago
add a comment
|
Another simple solution is use the plot
function and define parabola accordingly:
documentclass[tikz,border=3mm]{standalone}
begin{document}
begin{tikzpicture}
draw (-5,0)--(5,0);
draw[semithick, red] plot [domain=-2:2] (2*x,{abs(x*x-1)});
end{tikzpicture}
end{document}
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated thanabs(x^2)
this would be the correct approach.
– Skillmon
6 hours ago
add a comment
|
Another simple solution is use the plot
function and define parabola accordingly:
documentclass[tikz,border=3mm]{standalone}
begin{document}
begin{tikzpicture}
draw (-5,0)--(5,0);
draw[semithick, red] plot [domain=-2:2] (2*x,{abs(x*x-1)});
end{tikzpicture}
end{document}
Another simple solution is use the plot
function and define parabola accordingly:
documentclass[tikz,border=3mm]{standalone}
begin{document}
begin{tikzpicture}
draw (-5,0)--(5,0);
draw[semithick, red] plot [domain=-2:2] (2*x,{abs(x*x-1)});
end{tikzpicture}
end{document}
answered 7 hours ago
ZarkoZarko
147k8 gold badges84 silver badges194 bronze badges
147k8 gold badges84 silver badges194 bronze badges
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated thanabs(x^2)
this would be the correct approach.
– Skillmon
6 hours ago
add a comment
|
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated thanabs(x^2)
this would be the correct approach.
– Skillmon
6 hours ago
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated than
abs(x^2)
this would be the correct approach.– Skillmon
6 hours ago
This would be much slower, though, and it is dependent on the sample size (in your output one can see kinks in the parabola for instance). For stuff more complicated than
abs(x^2)
this would be the correct approach.– Skillmon
6 hours ago
add a comment
|
This is really just for fun. You can make TikZ reflect the parabola (or anything you draw) at the x axis (say) automatically. This can be done by installing a nonlinear transformation, which is in this case particularly simple.
documentclass[tikz,border=3mm]{standalone}
usepgfmodule{nonlineartransformations}
makeatletter
defyreflect{%
pgfmathsetmacro{myy}{abs(pgf@y)}%
pgf@y=myy pt}
begin{document}
begin{tikzpicture}
begin{scope}[transform shape nonlinear=true]
pgftransformnonlinear{yreflect}
draw (-5,0)--(5,0);
draw (-4,6) parabola bend (0,-2) (4,6);
end{scope}
end{tikzpicture}
end{document}
As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
5 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
5 hours ago
add a comment
|
This is really just for fun. You can make TikZ reflect the parabola (or anything you draw) at the x axis (say) automatically. This can be done by installing a nonlinear transformation, which is in this case particularly simple.
documentclass[tikz,border=3mm]{standalone}
usepgfmodule{nonlineartransformations}
makeatletter
defyreflect{%
pgfmathsetmacro{myy}{abs(pgf@y)}%
pgf@y=myy pt}
begin{document}
begin{tikzpicture}
begin{scope}[transform shape nonlinear=true]
pgftransformnonlinear{yreflect}
draw (-5,0)--(5,0);
draw (-4,6) parabola bend (0,-2) (4,6);
end{scope}
end{tikzpicture}
end{document}
As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
5 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
5 hours ago
add a comment
|
This is really just for fun. You can make TikZ reflect the parabola (or anything you draw) at the x axis (say) automatically. This can be done by installing a nonlinear transformation, which is in this case particularly simple.
documentclass[tikz,border=3mm]{standalone}
usepgfmodule{nonlineartransformations}
makeatletter
defyreflect{%
pgfmathsetmacro{myy}{abs(pgf@y)}%
pgf@y=myy pt}
begin{document}
begin{tikzpicture}
begin{scope}[transform shape nonlinear=true]
pgftransformnonlinear{yreflect}
draw (-5,0)--(5,0);
draw (-4,6) parabola bend (0,-2) (4,6);
end{scope}
end{tikzpicture}
end{document}
As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.
This is really just for fun. You can make TikZ reflect the parabola (or anything you draw) at the x axis (say) automatically. This can be done by installing a nonlinear transformation, which is in this case particularly simple.
documentclass[tikz,border=3mm]{standalone}
usepgfmodule{nonlineartransformations}
makeatletter
defyreflect{%
pgfmathsetmacro{myy}{abs(pgf@y)}%
pgf@y=myy pt}
begin{document}
begin{tikzpicture}
begin{scope}[transform shape nonlinear=true]
pgftransformnonlinear{yreflect}
draw (-5,0)--(5,0);
draw (-4,6) parabola bend (0,-2) (4,6);
end{scope}
end{tikzpicture}
end{document}
As one can see, there are small gaps, so the solution is not as perfect as Skillmon's solution.
answered 6 hours ago
Schrödinger's catSchrödinger's cat
7,61511 silver badges23 bronze badges
7,61511 silver badges23 bronze badges
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
5 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
5 hours ago
add a comment
|
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
5 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
5 hours ago
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
5 hours ago
Please view the picture with 500/100, I feel parabol doesn't cut Ox axis.
– minhthien_2016
5 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
5 hours ago
@minhthien_2016 Yes, this is what is meant by "there are small gaps".
– Schrödinger's cat
5 hours ago
add a comment
|
DiaWaterBender 4u is a new contributor. Be nice, and check out our Code of Conduct.
DiaWaterBender 4u is a new contributor. Be nice, and check out our Code of Conduct.
DiaWaterBender 4u is a new contributor. Be nice, and check out our Code of Conduct.
DiaWaterBender 4u 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%2f508554%2fcant-make-parabola-without-including-the-tip%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