
나는 2차원 브라운 운동, 즉 더 일반적으로는 다음을 그리고 싶습니다.오일러-마루야마2차원 확률미분방정식(SDE)의 이산화된 해내부에원.
내가 올바르게 이해했다면 이는 pgfplots
and 를 사용하여 가능해야 합니다 tikz
. ~ 안에이 게시물, 적어도 브라운 운동이 어떻게 그려질 수 있는지 보여줍니다. 이제 나는 이것을 간단한 SDE 해석기로 "단순히" 일반화해야 합니다. (이 시점에서 pgfplots/tikz 코드는 나에게 매우 모호하고 이것을 읽을 시간이 많지 않기 때문에 이것은 나에게 어렵습니다.)그리고그림을 원 안에 어떻게 배치할 수 있는지 알아보세요. 플롯은 원의 반경에 따라 확장되어야 합니다. 그리고 그것이 중요한 경우 단일 그림 안에 서로 다른 SDE 솔루션이 포함된 여러 원을 배치해야 합니다.
해결책이 쉽기를 바랍니다. 필요한 경우 추가 정보를 제공할 수 있습니다. 내가 묻는 내용이 표시된 가이드를 참조하면 이미 정말 도움이 될 것입니다.
답변1
\documentclass[tikz, border=1cm]{standalone}
\begin{document}
\begin{tikzpicture}
\newcommand{\Emmett}[5]{% points, advance, rand factor, options, end label
\draw[#4] (0,0)
\foreach \x in {1,...,#1}
{ -- ++(#2, rand*#3)
}
node[right] {#5};
}
\foreach \r [count=\i] in {2.2,2.1,...,0.6}{
\begin{scope}[shift={(50*\i:{4*sin(70*\i)})}]
\pgfmathparse{0.9*rnd+0.3}
\definecolor{MyColor}{rgb}{\pgfmathresult,\pgfmathresult,\pgfmathresult}
\filldraw[fill=MyColor] (\r,0) circle[radius=\r];
\clip (\r,0) circle[radius=\r];
\Emmett{int(300*\i)}{0.04}{0.02*\i}{red}{}
\end{scope}
}
\end{tikzpicture}
\end{document}
편집하다:
\documentclass[tikz, border=1cm]{standalone}
\begin{document}
\begin{tikzpicture}[line join=bevel]
\foreach \r [count=\i] in {1,1.4,...,2.2}{
\begin{scope}[shift={(5*\i,0)}]
\filldraw[blue, fill=black!20] (0,0) circle[radius=\r];
\clip (0,0) circle[radius=\r];
\draw[red, scale=\r] (0,0) coordinate(start) \foreach \x in {1,...,1000} { -- ++(0.05*rand, 0.05*rand)} coordinate(end);
\fill (start) circle[radius=2pt] node[above]{$X_0$};
\fill (end) circle[radius=2pt] node[above]{$X_t$};
\end{scope}
}
\end{tikzpicture}
\end{document}
rand
매번 새로운 의사 난수입니다. x가 더 큰 -- ++(dx,dy)
새 좌표에 선을 그리는 것을 의미합니다 .dx
dy
. -마지막으로 추가 라인의 시작으로 이 새로운 좌표를 갖게 됩니다.