I am learning how to use TikZ, and may be running ahead of myself, but I want to create the typical illustration of how a manifold maps to R^d: something showing a bit of curved surface with a neighborhood U around a point p, and the coordinate map from U to R^d showing a Cartesian coordinate grid and the image of U. I hope my explanation makes sense. I can see something like this can be done in TikZ, but the examples I find are more complicated that I would like. Is there a fairly simple and easy way to achieve what I am after?
Asked
Active
Viewed 636 times
2
-
Welcome to TeX.SX! Could you add a minimal working example (MWE), that illustrates your problem. Also an image could help to clearify your question. Do you mean something like this: Drawing manifolds in tikz – Bobyandbob Aug 14 '17 at 16:05
-
To answer your question, this doesn't sound to me like a very good first-encounter project in TikZ, unless you are ok with a version for (1-dimensional...) curves. You may have a look at the linked (by Bobyandbob) question/answer, but I think a better solution would involve pgfplots with actual domains delimited on an actual surface (but, indeed this is a bit more involved). – marsupilam Aug 14 '17 at 16:21
-
Bobyandbob, marsupilam, thanks to both - I have experimented with pgfplots, but still haven't figured out how to project a curve (the outline of the open set U) up to a 2-dim surface plot, and fill it with a projected grid. Bobyandbob: Your link looks illustrates precisely what I am looking for - I will study the example as soon as I have moment; thanks. When I crack it, perhaps I should post it here as an answer, if that is possible. – j4nd3r53n Aug 15 '17 at 17:59
1 Answers
3
I promised to post an answer here, when I found one, so here goes:
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
declare function={
f(\x,\y)=10-(\x^2+\y^2);
},
declare function={
c_x(\t)=cos(\t)+1;
},
declare function={
c_y(\t)=sin(\t)-1;
},
declare function={
c_z(\t)=f(c_x(\t),c_y(\t));
},
]
\addplot3[surf,domain=-2:2,domain y=-2:2,]{f(x,y)};
\addplot3[black,opacity=1.0,variable=t,domain=0:360] ({c_x(t)},{c_y(t)},{c_z(t)});
\end{axis}
\end{tikzpicture}
\end{document}
Perhaps not the most strikingly beautiful colour scheme, but it shows in a simple form what I was trying to get: an illustration of a bit of manifold with an open neighborhood around a point.
It still needs the point, the circle should be less regular and have a dashed line around it, there should be arrows illustrationg coordinate maps etc etc, but this was the hard bit, I think.
marsupilam
- 6,383
j4nd3r53n
- 499
