TikZ作图:九种二次曲面(附代码)

您所在的位置:网站首页 怎么区分单叶双曲面和双叶双曲面 TikZ作图:九种二次曲面(附代码)

TikZ作图:九种二次曲面(附代码)

2024-07-15 00:37:43| 来源: 网络整理| 查看: 265

如何用TikZ/pgfplots宏包绘制《解析几何》中的二次曲面图像? 本文将逐一给出示例代码。

导言区设置如下:

\documentclass[border={1.2cm 0.1cm 1.2cm 0.1cm}]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{patchplots} \usepgfplotslibrary{colormaps} \usepgfplotslibrary{colorbrewer} \pgfplotsset{compat=1.18} \usepackage{ctex} \begin{document} \begin{tikzpicture} …… \end{tikzpicture} \end{document} 一、椭球面

在这里插入图片描述

%椭球面 \begin{tikzpicture} \begin{axis}[ %title=椭球面, tick label style={font=\tiny}, view={110}{20}, axis lines =center, mark=none, axis on top, xlabel={$x$},ylabel={$y$},zlabel={$z$}, xmax=3, ymax=9, zmax=1.5, ] \addplot3 [ colormap/spring, surf, z buffer=sort, samples=40, domain=0:2*pi, y domain=0:2*pi, ]( {2*sin(deg(x))* cos(deg(y))}, {8*sin(deg(x))* sin(deg(y))}, {1*cos(deg(x))} ); \end{axis} \end{tikzpicture} 二、单叶双曲面

在这里插入图片描述

%单叶双曲面 \begin{tikzpicture} \begin{axis}[tick label style={font=\tiny}, view={120}{15}, axis lines =center, mark=none, axis on top, xlabel={$x$},ylabel={$y$},zlabel={$z$}, xmax=5, ymax=3, xmin=-5, ymin=-3, zmax=1.5, zmin=-1.5] \addplot3 [colormap/spring, surf, z buffer=sort, samples=40, domain=-0.4*pi:0.4*pi, y domain=0:2*pi] ({0.6*sec(deg(x))* cos(deg(y))}, {0.6*sec(deg(x))* sin(deg(y))}, {0.4*tan(deg(x))}); \end{axis} \end{tikzpicture} 三、双叶双曲面

在这里插入图片描述

%双叶双曲面 \begin{tikzpicture} \begin{axis}[tick label style={font=\tiny}, view={110}{20}, axis lines =center, mark=none, axis on top, xlabel={$x$},ylabel={$y$},zlabel={$z$}, xmax=20, ymax=10, xmin=-10, ymin=-10, zmax=30, zmin=-30, width=30cm, height=30cm] \addplot3 [colormap/spring, surf, z buffer=sort, samples=50, domain=0.55*pi:1.4*pi, y domain=0:2*pi] ({1.5*tan(deg(x))* cos(deg(y))}, {1.5*tan(deg(x))* sin(deg(y))}, {3*sec(deg(x))}); \addplot3 [colormap/spring, surf, z buffer=sort, samples=50, domain=0.55*pi:1.4*pi, y domain=0:2*pi] ({1.5*tan(deg(x))* cos(deg(y))}, {1.5*tan(deg(x))* sin(deg(y))}, {-3*sec(deg(x))}); \end{axis} \end{tikzpicture} 四、圆锥面

在这里插入图片描述

%圆锥面 \begin{tikzpicture} \begin{axis}[tick label style={font=\tiny}, view={110}{20}, axis lines =center, mark=none, axis on top, xlabel={$x$},ylabel={$y$},zlabel={$z$}, xmax=3, ymax=3, zmax=5, width=12cm, height=12cm] \addplot3 [colormap/spring, surf, z buffer=sort, samples=50, domain=0:3, y domain=0:2*pi] ({x*cos(deg(y))}, {x* sin(deg(y))}, {1.5*x}); \addplot3 [colormap/spring, surf, z buffer=sort, samples=50, domain=0:3, y domain=0:2*pi] ({x*cos(deg(y))}, {x* sin(deg(y))}, {-1.5*x}); \end{axis} \end{tikzpicture} 五、椭圆抛物面

在这里插入图片描述

%椭圆抛物面 \begin{tikzpicture} \begin{axis}[title=$x^2+y^2$:正定,tick label style={font=\tiny},view={130}{25}, axis lines =center, mark=none, axis on top, xmax=1.5, ymax=1.5, zmax=0.8, width=6cm, height=5cm] \addplot3 [colormap/spring, surf, z buffer=sort, samples=30,domain=0:1, y domain=0:2*pi,] ({x* cos(deg(y))},{x* sin(deg(y))},0.5*x^2); \end{axis} \end{tikzpicture} 六、双曲抛物面(鞍面)

在这里插入图片描述

%双曲抛物面 \begin{tikzpicture} \begin{axis}[tick label style={font=\tiny},view={120}{25},axis lines =center, mark=none, axis on top,xlabel={$x$},ylabel={$y$},zlabel={$z$},xmin=-3,xmax=3, ymin=-3,ymax=3,zmax=3,width=12cm,height=8cm,] \addplot3 [colormap/PiYG, surf, z buffer=sort, samples=20,domain=-2:2,0] ({x},{y},0.5*x^2-0.5*y^2); \end{axis} \end{tikzpicture} 七、椭圆柱面

在这里插入图片描述

%椭圆柱面 \begin{tikzpicture} \begin{axis}[tick label style={font=\tiny},view={150}{9},axis lines =center, mark=none, axis on top, xlabel={$x$},ylabel={$y$},zlabel={$z$}, xmax=3, ymax=3, zmax=3, zmin=- 3,width=12cm,height=12cm] \addplot3 [colormap/spring, surf, z buffer=sort, samples=50, domain=0:2*pi, y domain=-0.4*pi:0.4*pi] ({2*cos(deg(x))},{4*sin(deg(x))},{y}); \end{axis} \end{tikzpicture} 八、双曲柱面

在这里插入图片描述

%双曲柱面 \begin{tikzpicture} \begin{axis}[ tick label style={font=\tiny},view={170}{9},axis lines =center, mark=none, axis on top, xlabel={$x$},ylabel={$y$},zlabel={$z$},xmax=3,xmin=-3,ymax=3, zmax=3,zmin=-3, width=12cm,height=12cm] \addplot3 [colormap/spring, surf, z buffer=sort, samples=50, domain=-2:2,y domain=-1.2:1.2,] ({1*cosh(x)},{2*sinh(x)},{y}); \addplot3 [colormap/spring, surf, z buffer=sort, samples=50, domain=-2:2,y domain=-1.2:1.2,] ({-1*cosh(x)},{2*sinh(x)},{y}); \end{axis} \end{tikzpicture} 九、抛物柱面

在这里插入图片描述

%抛物柱面 \begin{tikzpicture} \begin{axis}[tick label style={font=\tiny},view={160}{10},axis lines =center, mark=none, axis on top, xlabel={$x$}, ylabel={$y$}, zlabel={$z$}, xmax=3, ymax=2, zmax=3, zmin=-3,width=12cm,height=12cm] \addplot3 [colormap/spring, surf, z buffer=sort, samples=50,domain=-2:2,y domain = -2:2] ({0.6*x^2},{x},{y}); \end{axis} \end{tikzpicture}

如果你觉得本文不错的话,欢迎转发、分享,让更多的朋友看到!赠人玫瑰,手留余香!

如果本文对您有帮助,欢迎点击“在看”,转发分享!您的支持是作者写作的动力!

【LaTeX微信交流加群:】

如果你希望交流LaTeX使用或者TikZ作图或者Beamer制作幻灯片方面的问题,请先添加作者微信:niltxz,然后加入作者的LaTeX+TikZ+Beamer 交流微信群。

在这里插入图片描述



【本文地址】

公司简介

联系我们

今日新闻


点击排行

实验室常用的仪器、试剂和
说到实验室常用到的东西,主要就分为仪器、试剂和耗
不用再找了,全球10大实验
01、赛默飞世尔科技(热电)Thermo Fisher Scientif
三代水柜的量产巅峰T-72坦
作者:寞寒最近,西边闹腾挺大,本来小寞以为忙完这
通风柜跟实验室通风系统有
说到通风柜跟实验室通风,不少人都纠结二者到底是不
集消毒杀菌、烘干收纳为一
厨房是家里细菌较多的地方,潮湿的环境、没有完全密
实验室设备之全钢实验台如
全钢实验台是实验室家具中较为重要的家具之一,很多

推荐新闻


图片新闻

实验室药品柜的特性有哪些
实验室药品柜是实验室家具的重要组成部分之一,主要
小学科学实验中有哪些教学
计算机 计算器 一般 打孔器 打气筒 仪器车 显微镜
实验室各种仪器原理动图讲
1.紫外分光光谱UV分析原理:吸收紫外光能量,引起分
高中化学常见仪器及实验装
1、可加热仪器:2、计量仪器:(1)仪器A的名称:量
微生物操作主要设备和器具
今天盘点一下微生物操作主要设备和器具,别嫌我啰嗦
浅谈通风柜使用基本常识
 众所周知,通风柜功能中最主要的就是排气功能。在

专题文章

    CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭