Drawing a cuve which start in (-2,-4) goes in (0,0) and then in (4,4)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












Hi I write this code but I don't understand why its not curve..



documentclass[12pt]report
begindocument

beginfigure [H]
begintikzpicture
draw[-latex] (-2,0) -- (6,0) node[right] $Return%$;
draw[-latex] (0,-4) -- (0,6) node[above] $Utility$;
draw (-2,-4) .. controls (0,0) and (0,0)..(5,5);

endtikzpicture
endfigure
enddocument


I need to do this thanks<code>enter image description here</code>



where are the errors??










share|improve this question







New contributor




Tommaso Dellolmo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • I'd use three points and to the control points as relative polar coordinates, ++(30:1), then the control points are vectors at the end of the curve segments and by controlling the length and direction you control the curve. Just make sure that the two control points in and out of zero, are on the same line, but opposite directions.
    – daleif
    25 mins ago










  • You need to put the line usepackagetikz in your preamble, and change the capital H to a small h in beginfigure[H]. That's what is preventing your current code from compiling!
    – Thevesh Theva
    24 mins ago















up vote
2
down vote

favorite












Hi I write this code but I don't understand why its not curve..



documentclass[12pt]report
begindocument

beginfigure [H]
begintikzpicture
draw[-latex] (-2,0) -- (6,0) node[right] $Return%$;
draw[-latex] (0,-4) -- (0,6) node[above] $Utility$;
draw (-2,-4) .. controls (0,0) and (0,0)..(5,5);

endtikzpicture
endfigure
enddocument


I need to do this thanks<code>enter image description here</code>



where are the errors??










share|improve this question







New contributor




Tommaso Dellolmo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • I'd use three points and to the control points as relative polar coordinates, ++(30:1), then the control points are vectors at the end of the curve segments and by controlling the length and direction you control the curve. Just make sure that the two control points in and out of zero, are on the same line, but opposite directions.
    – daleif
    25 mins ago










  • You need to put the line usepackagetikz in your preamble, and change the capital H to a small h in beginfigure[H]. That's what is preventing your current code from compiling!
    – Thevesh Theva
    24 mins ago













up vote
2
down vote

favorite









up vote
2
down vote

favorite











Hi I write this code but I don't understand why its not curve..



documentclass[12pt]report
begindocument

beginfigure [H]
begintikzpicture
draw[-latex] (-2,0) -- (6,0) node[right] $Return%$;
draw[-latex] (0,-4) -- (0,6) node[above] $Utility$;
draw (-2,-4) .. controls (0,0) and (0,0)..(5,5);

endtikzpicture
endfigure
enddocument


I need to do this thanks<code>enter image description here</code>



where are the errors??










share|improve this question







New contributor




Tommaso Dellolmo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











Hi I write this code but I don't understand why its not curve..



documentclass[12pt]report
begindocument

beginfigure [H]
begintikzpicture
draw[-latex] (-2,0) -- (6,0) node[right] $Return%$;
draw[-latex] (0,-4) -- (0,6) node[above] $Utility$;
draw (-2,-4) .. controls (0,0) and (0,0)..(5,5);

endtikzpicture
endfigure
enddocument


I need to do this thanks<code>enter image description here</code>



where are the errors??







tikz-pgf






share|improve this question







New contributor




Tommaso Dellolmo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Tommaso Dellolmo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Tommaso Dellolmo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 56 mins ago









Tommaso Dellolmo

403




403




New contributor




Tommaso Dellolmo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Tommaso Dellolmo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Tommaso Dellolmo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • I'd use three points and to the control points as relative polar coordinates, ++(30:1), then the control points are vectors at the end of the curve segments and by controlling the length and direction you control the curve. Just make sure that the two control points in and out of zero, are on the same line, but opposite directions.
    – daleif
    25 mins ago










  • You need to put the line usepackagetikz in your preamble, and change the capital H to a small h in beginfigure[H]. That's what is preventing your current code from compiling!
    – Thevesh Theva
    24 mins ago

















  • I'd use three points and to the control points as relative polar coordinates, ++(30:1), then the control points are vectors at the end of the curve segments and by controlling the length and direction you control the curve. Just make sure that the two control points in and out of zero, are on the same line, but opposite directions.
    – daleif
    25 mins ago










  • You need to put the line usepackagetikz in your preamble, and change the capital H to a small h in beginfigure[H]. That's what is preventing your current code from compiling!
    – Thevesh Theva
    24 mins ago
















I'd use three points and to the control points as relative polar coordinates, ++(30:1), then the control points are vectors at the end of the curve segments and by controlling the length and direction you control the curve. Just make sure that the two control points in and out of zero, are on the same line, but opposite directions.
– daleif
25 mins ago




I'd use three points and to the control points as relative polar coordinates, ++(30:1), then the control points are vectors at the end of the curve segments and by controlling the length and direction you control the curve. Just make sure that the two control points in and out of zero, are on the same line, but opposite directions.
– daleif
25 mins ago












You need to put the line usepackagetikz in your preamble, and change the capital H to a small h in beginfigure[H]. That's what is preventing your current code from compiling!
– Thevesh Theva
24 mins ago





You need to put the line usepackagetikz in your preamble, and change the capital H to a small h in beginfigure[H]. That's what is preventing your current code from compiling!
– Thevesh Theva
24 mins ago











1 Answer
1






active

oldest

votes

















up vote
5
down vote













There's certainly more powerful tools available. Nevertheless, here's a simple approach that renders:



enter image description here



Here's the code:



documentclass[12pt,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc
begindocument
defaeAngleAB80
defaeAngleCD55
defaeANgleEF5

begintikzpicture[%%
%% control point/.style=inner sep=2pt,circle,draw=red,
control point/.style=inner sep=2pt,circle,
primary point/.style=inner sep=2pt,circle,draw=blue,
]

draw[-latex] (-2,0) -- (6,0) node[right] $Return%$;
draw[-latex] (0,-4) -- (0,6) node[above] $Utility$;

node[primary point] (P1) at (-2,-4) ;
node[primary point] (P2) at (0,0) ;
node[primary point] (P3) at (7,4) ;

node[control point] (C1) at ($(P1)+(aeAngleAB:10pt)$) ;
node[control point] (C2) at ($(P2)+(180+aeAngleCD:40pt)$) ;
node[control point] (C3) at ($(P2)+(aeAngleCD:110pt)$) ;
node[control point] (C4) at ($(P3)+(180+aeANgleEF:60pt)$) ;

%% path[dashed,magenta,draw] (P1) -- (C1) -- (C2) -- (P2) -- (C3) -- (C4) -- (P3);
path[dashed,magenta] (P1) -- (C1) -- (C2) -- (P2) -- (C3) -- (C4) -- (P3);

draw[blue] (P1) .. controls (C1) and (C2) .. (P2);
draw[blue] (P2) .. controls (C3) and (C4) .. (P3);

endtikzpicture

enddocument


Add draw=red to the key control point and add draw to the path[dashed,magenta] to see the interaction between control points and the graph



enter image description here






share|improve this answer




















  • @Tommaso Dellolmo This is a great suggestion for how to get the result you want, but I just want to stress that your problems were caused by not loading the tikz package and wrong syntax for the figure environment.
    – Thevesh Theva
    20 mins ago










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',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Tommaso Dellolmo is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f453911%2fdrawing-a-cuve-which-start-in-2-4-goes-in-0-0-and-then-in-4-4%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
5
down vote













There's certainly more powerful tools available. Nevertheless, here's a simple approach that renders:



enter image description here



Here's the code:



documentclass[12pt,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc
begindocument
defaeAngleAB80
defaeAngleCD55
defaeANgleEF5

begintikzpicture[%%
%% control point/.style=inner sep=2pt,circle,draw=red,
control point/.style=inner sep=2pt,circle,
primary point/.style=inner sep=2pt,circle,draw=blue,
]

draw[-latex] (-2,0) -- (6,0) node[right] $Return%$;
draw[-latex] (0,-4) -- (0,6) node[above] $Utility$;

node[primary point] (P1) at (-2,-4) ;
node[primary point] (P2) at (0,0) ;
node[primary point] (P3) at (7,4) ;

node[control point] (C1) at ($(P1)+(aeAngleAB:10pt)$) ;
node[control point] (C2) at ($(P2)+(180+aeAngleCD:40pt)$) ;
node[control point] (C3) at ($(P2)+(aeAngleCD:110pt)$) ;
node[control point] (C4) at ($(P3)+(180+aeANgleEF:60pt)$) ;

%% path[dashed,magenta,draw] (P1) -- (C1) -- (C2) -- (P2) -- (C3) -- (C4) -- (P3);
path[dashed,magenta] (P1) -- (C1) -- (C2) -- (P2) -- (C3) -- (C4) -- (P3);

draw[blue] (P1) .. controls (C1) and (C2) .. (P2);
draw[blue] (P2) .. controls (C3) and (C4) .. (P3);

endtikzpicture

enddocument


Add draw=red to the key control point and add draw to the path[dashed,magenta] to see the interaction between control points and the graph



enter image description here






share|improve this answer




















  • @Tommaso Dellolmo This is a great suggestion for how to get the result you want, but I just want to stress that your problems were caused by not loading the tikz package and wrong syntax for the figure environment.
    – Thevesh Theva
    20 mins ago














up vote
5
down vote













There's certainly more powerful tools available. Nevertheless, here's a simple approach that renders:



enter image description here



Here's the code:



documentclass[12pt,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc
begindocument
defaeAngleAB80
defaeAngleCD55
defaeANgleEF5

begintikzpicture[%%
%% control point/.style=inner sep=2pt,circle,draw=red,
control point/.style=inner sep=2pt,circle,
primary point/.style=inner sep=2pt,circle,draw=blue,
]

draw[-latex] (-2,0) -- (6,0) node[right] $Return%$;
draw[-latex] (0,-4) -- (0,6) node[above] $Utility$;

node[primary point] (P1) at (-2,-4) ;
node[primary point] (P2) at (0,0) ;
node[primary point] (P3) at (7,4) ;

node[control point] (C1) at ($(P1)+(aeAngleAB:10pt)$) ;
node[control point] (C2) at ($(P2)+(180+aeAngleCD:40pt)$) ;
node[control point] (C3) at ($(P2)+(aeAngleCD:110pt)$) ;
node[control point] (C4) at ($(P3)+(180+aeANgleEF:60pt)$) ;

%% path[dashed,magenta,draw] (P1) -- (C1) -- (C2) -- (P2) -- (C3) -- (C4) -- (P3);
path[dashed,magenta] (P1) -- (C1) -- (C2) -- (P2) -- (C3) -- (C4) -- (P3);

draw[blue] (P1) .. controls (C1) and (C2) .. (P2);
draw[blue] (P2) .. controls (C3) and (C4) .. (P3);

endtikzpicture

enddocument


Add draw=red to the key control point and add draw to the path[dashed,magenta] to see the interaction between control points and the graph



enter image description here






share|improve this answer




















  • @Tommaso Dellolmo This is a great suggestion for how to get the result you want, but I just want to stress that your problems were caused by not loading the tikz package and wrong syntax for the figure environment.
    – Thevesh Theva
    20 mins ago












up vote
5
down vote










up vote
5
down vote









There's certainly more powerful tools available. Nevertheless, here's a simple approach that renders:



enter image description here



Here's the code:



documentclass[12pt,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc
begindocument
defaeAngleAB80
defaeAngleCD55
defaeANgleEF5

begintikzpicture[%%
%% control point/.style=inner sep=2pt,circle,draw=red,
control point/.style=inner sep=2pt,circle,
primary point/.style=inner sep=2pt,circle,draw=blue,
]

draw[-latex] (-2,0) -- (6,0) node[right] $Return%$;
draw[-latex] (0,-4) -- (0,6) node[above] $Utility$;

node[primary point] (P1) at (-2,-4) ;
node[primary point] (P2) at (0,0) ;
node[primary point] (P3) at (7,4) ;

node[control point] (C1) at ($(P1)+(aeAngleAB:10pt)$) ;
node[control point] (C2) at ($(P2)+(180+aeAngleCD:40pt)$) ;
node[control point] (C3) at ($(P2)+(aeAngleCD:110pt)$) ;
node[control point] (C4) at ($(P3)+(180+aeANgleEF:60pt)$) ;

%% path[dashed,magenta,draw] (P1) -- (C1) -- (C2) -- (P2) -- (C3) -- (C4) -- (P3);
path[dashed,magenta] (P1) -- (C1) -- (C2) -- (P2) -- (C3) -- (C4) -- (P3);

draw[blue] (P1) .. controls (C1) and (C2) .. (P2);
draw[blue] (P2) .. controls (C3) and (C4) .. (P3);

endtikzpicture

enddocument


Add draw=red to the key control point and add draw to the path[dashed,magenta] to see the interaction between control points and the graph



enter image description here






share|improve this answer












There's certainly more powerful tools available. Nevertheless, here's a simple approach that renders:



enter image description here



Here's the code:



documentclass[12pt,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc
begindocument
defaeAngleAB80
defaeAngleCD55
defaeANgleEF5

begintikzpicture[%%
%% control point/.style=inner sep=2pt,circle,draw=red,
control point/.style=inner sep=2pt,circle,
primary point/.style=inner sep=2pt,circle,draw=blue,
]

draw[-latex] (-2,0) -- (6,0) node[right] $Return%$;
draw[-latex] (0,-4) -- (0,6) node[above] $Utility$;

node[primary point] (P1) at (-2,-4) ;
node[primary point] (P2) at (0,0) ;
node[primary point] (P3) at (7,4) ;

node[control point] (C1) at ($(P1)+(aeAngleAB:10pt)$) ;
node[control point] (C2) at ($(P2)+(180+aeAngleCD:40pt)$) ;
node[control point] (C3) at ($(P2)+(aeAngleCD:110pt)$) ;
node[control point] (C4) at ($(P3)+(180+aeANgleEF:60pt)$) ;

%% path[dashed,magenta,draw] (P1) -- (C1) -- (C2) -- (P2) -- (C3) -- (C4) -- (P3);
path[dashed,magenta] (P1) -- (C1) -- (C2) -- (P2) -- (C3) -- (C4) -- (P3);

draw[blue] (P1) .. controls (C1) and (C2) .. (P2);
draw[blue] (P2) .. controls (C3) and (C4) .. (P3);

endtikzpicture

enddocument


Add draw=red to the key control point and add draw to the path[dashed,magenta] to see the interaction between control points and the graph



enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered 23 mins ago









A.Ellett

35.2k1063163




35.2k1063163











  • @Tommaso Dellolmo This is a great suggestion for how to get the result you want, but I just want to stress that your problems were caused by not loading the tikz package and wrong syntax for the figure environment.
    – Thevesh Theva
    20 mins ago
















  • @Tommaso Dellolmo This is a great suggestion for how to get the result you want, but I just want to stress that your problems were caused by not loading the tikz package and wrong syntax for the figure environment.
    – Thevesh Theva
    20 mins ago















@Tommaso Dellolmo This is a great suggestion for how to get the result you want, but I just want to stress that your problems were caused by not loading the tikz package and wrong syntax for the figure environment.
– Thevesh Theva
20 mins ago




@Tommaso Dellolmo This is a great suggestion for how to get the result you want, but I just want to stress that your problems were caused by not loading the tikz package and wrong syntax for the figure environment.
– Thevesh Theva
20 mins ago










Tommaso Dellolmo is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















Tommaso Dellolmo is a new contributor. Be nice, and check out our Code of Conduct.












Tommaso Dellolmo is a new contributor. Be nice, and check out our Code of Conduct.











Tommaso Dellolmo is a new contributor. Be nice, and check out our Code of Conduct.













 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f453911%2fdrawing-a-cuve-which-start-in-2-4-goes-in-0-0-and-then-in-4-4%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

List of Gilmore Girls characters

Confectionery