2

I try to interpolate these curves and what I get is not very nice: enter image description here

What I tried :

\documentclass[french,25pt,a4paper,landscape]{article}
\usepackage{etex}

\usepackage{tikz}
\usepackage[T1]{fontenc}
\usepackage{xcolor}



\begin{document}
    \begin{center}
        \definecolor{qqwuqq}{rgb}{0,0.39215686274509803,0}
            \definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}
            \definecolor{qqqqff}{rgb}{0,0,1}
            \begin{tikzpicture}[line cap=round,line join=round,>=stealth,x=1cm,y=1cm]
            \coordinate[label=below:$O$] (A) at (0,0);
            \coordinate[label=below left:] (B) at (0,4);
            \coordinate[label=below left:$t$] (C) at (4,0);
            
            \coordinate[label=above right:] (D) at (0.54,1.04);
            \coordinate[label=above right:] (E) at (1.38,1.58);
            \coordinate[label=above right:] (F) at (1.9,1.667);
            \coordinate[label=above right:] (G) at (2.76,1.767);
            \coordinate[label=above right:] (H) at (4.36,1.8);

            \coordinate[label=above right:] (I) at (0.3,3.82);
            \coordinate[label=above right:] (J) at (0.5,3.5);
            \coordinate[label=above right:] (K) at (0.7,2.94);
            \coordinate[label=above right:] (L) at (0.84,2.44);
            \coordinate[label=above right:] (M) at (1,2);
            \coordinate[label=above right:] (N) at (1.24,1.36);
            \coordinate[label=above right:] (O) at (1.86,0.86);
            \coordinate[label=above right:] (P) at (2.44,0.54);
            \coordinate[label=above right:] (Q) at (2.86,0.22);
            \coordinate[label=above right:] (R) at (3.42,0.18);

            \coordinate[label=above right:] (S) at (0.84,0.38);
            \coordinate[label=above right:] (T) at (1.61,1.04);
            \coordinate[label=above right:] (U) at (1.92,1.68);
            \coordinate[label=above right:] (V) at (2.52,3.04);
            \coordinate[label=above right:] (W) at (2.84,4.32);
            

            
            \draw [->,line width=0.8pt] (A) -- (B) node[midway, below left] {};
            \draw [->,line width=0.8pt] (A) -- (C) node[midway, above] {};

            \draw [red] plot [smooth, tension=0.6] coordinates { (A) (D) (E) (F) (G) (H)};
            \draw [blue, dashed] plot [smooth, tension=0.6] coordinates { (I) (J) (K) (L) (M) (N) (O) (P) (Q) (R)};

            \draw [green] plot [smooth, tension=0.6] coordinates { (A) (S) (T) (U) (V) (W)};
            
            \fill (A) circle (2pt);
            \fill (B) circle (0pt);
            \fill (C) circle (0pt);
            \end{tikzpicture}
    \end{center}
\end{document}

The result :

enter image description here

How do I smooth out these curves so they look more real? And I would also like to add the circled numbers

1 Answer 1

5

Here's a way to do it. Keys:

  • removing unecessary code from your example
  • replacing -- by to[out=,in=]
  • putting an intermediate point for the blue curve
  • putting labels at the end of each curve with a few variants to shift it

You could also use controls, an other approach via Bezier curves. I find effects of to easier to visualize.

I suggest drawing your graphics in separate files using class standalone AND including said pdf's via package graphicx. See here for one example, while I suggested doing so several times (find more).

result

%\documentclass[french,25pt,a4paper,landscape]{article}
%\usepackage{etex}
%
%\usepackage{tikz}
%\usepackage[T1]{fontenc}
%\usepackage{xcolor}

\documentclass[10pt,border=3mm,tikz]{standalone}

\begin{document}
%    \begin{center}

% ~~~ you don't use them here ... ~~~~~~~~~~~~~~~~~~~~~
%        \definecolor{qqwuqq}{rgb}{0,0.39215686274509803,0}
%        \definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}
%        \definecolor{qqqqff}{rgb}{0,0,1}
        
        
 \begin{tikzpicture}[
    line cap=round,
    line join=round,
    >=stealth,
    lbl/.style={draw,circle},
%   x=1cm,y=1cm
    ]
            \coordinate[label=below:$O$] (A) at (0,0);
            \coordinate[label=below left:] (B) at (0,4);
            \coordinate[label=below left:$t$] (C) at (4,0);
%            
%            \coordinate[label=above right:] (D) at (0.54,1.04);
%            \coordinate[label=above right:] (E) at (1.38,1.58);
%            \coordinate[label=above right:] (F) at (1.9,1.667);
%            \coordinate[label=above right:] (G) at (2.76,1.767);
            \coordinate[label=above right:] (H) at (4.36,1.8);
%
            \coordinate[label=above right:] (I) at (0.3,3.82);
%            \coordinate[label=above right:] (J) at (0.5,3.5);
%            \coordinate[label=above right:] (K) at (0.7,2.94);
%            \coordinate[label=above right:] (L) at (0.84,2.44);
%            \coordinate[label=above right:] (M) at (1,2);
%            \coordinate[label=above right:] (N) at (1.24,1.36);
%            \coordinate[label=above right:] (O) at (1.86,0.86);
%            \coordinate[label=above right:] (P) at (2.44,0.54);
%            \coordinate[label=above right:] (Q) at (2.86,0.22);
            \coordinate[label=above right:] (R) at (3.42,0.18);
%
%            \coordinate[label=above right:] (S) at (0.84,0.38);
%            \coordinate[label=above right:] (T) at (1.61,1.04);
%            \coordinate[label=above right:] (U) at (1.92,1.68);
%            \coordinate[label=above right:] (V) at (2.52,3.04);
            \coordinate[label=above right:] (W) at (2.84,4.32);
            

    % ~~~ y- and x-axis ~~~~~~~~~~~~~~~~~~~~~~~~~
    \draw [->,line width=0.8pt] (A) -- (B) node[midway, below left] {?};
    \draw [->,line width=0.8pt] (A) -- (C) node[midway, above] {??};

    % ~~~ curves ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    %\draw[red] (A) -- (H); % start like this
    \draw[red]      (A) to[out=60,in=182] (H) node[lbl,yshift=4mm] {3}; % refined
    \draw[teal!80]  (A) to[out=20,in=250] (W) node[lbl,shift=(200:7mm)] {1};
    \draw[blue,dashed]
                    (I) to[out=-35,in=110] +(.7,-1.6) 
                        to[out=290,in=180] (R) node[lbl,shift=(120:7mm)] {2};
    
    %\draw [red] plot [smooth, tension=0.6] coordinates { (A) (D) (E) (F) (G) (H)};
    %\draw [blue, dashed] plot [smooth, tension=0.6] coordinates { (I) (J) (K) (L) (M) (N) (O) (P) (Q) (R)};

    %\draw [green] plot [smooth, tension=0.6] coordinates { (A) (S) (T) (U) (V) (W)};
            
    \fill (A) circle (2pt);
    \fill (B) circle (0pt);
    \fill (C) circle (0pt);
 \end{tikzpicture}
%    \end{center}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .