Sarmate.net Sarmate.net
Accueil Fonctionnalités Offres Documentation Contact
Connexion Inscription
Retour à la galerie
TikZ EN

3D helix

Sarmate sarmate_examples 2026-05-03 0 8

Parametric 3D helix rendered with pgfplots, with annotated 3D axes. Beautiful demo of 3D parametric curves in TikZ. From Sarmate's technical TikZ gallery (sources: MartinThoma/LaTeX-examples MIT, TeXample.net LPPL) — see also our 900+ figures on /tikz-gallery.php.

Ouvrir dans la démo Connectez-vous pour aimer
\documentclass[12pt,border=5pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usetikzlibrary{calc,angles,quotes,positioning,decorations.markings,arrows.meta,patterns,intersections,shapes,trees}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{tikzpicture}
    \begin{axis}[
    colormap name=whitered,
    width=15cm,
    view={335}{50},
    enlargelimits=false,
    grid=major,
    domain=-2:2,
    y domain=-2:2,
    samples=40, %60 : TeX capacity exceeded, sorry [main memory size=3000000].
                % see also http://tex.stackexchange.com/a/7954/5645
    xlabel=$x$,
    ylabel=$y$,
    zlabel={$z$}
    ]
        \addplot3+[domain=0:2*pi,samples y=0]
            ({sin(deg(x))},
             {cos(deg(x))},
             {x});
    \end{axis}
\end{tikzpicture}
\end{document}
Cet exemple est sous licence CC‑BY‑4.0. Vous pouvez le copier, le modifier et le redistribuer en citant l'auteur (Sarmate sarmate_examples).