LaTeX tikz 画地球示意图

这篇博客展示了如何利用LaTeX的tikz包绘制详细的地球示意图,包括代码示例和编译后的效果展示。
摘要由CSDN通过智能技术生成

画图代码如下:

%Author: Marco Miani
%LuaLaTeX / pdfLaTeX
\documentclass[12pt]{article}
\usepackage{tikz}
\usepackage{verbatim}
%\usepackage[active,tightpage]{preview} 
%\PreviewEnvironment{tikzpicture}
%\setlength\PreviewBorder{5pt}
\usepackage{amsmath}
\usetikzlibrary{arrows}
\pagestyle{empty}
\usepackage{pgfplots}
\usetikzlibrary{calc,fadings,decorations.pathreplacing}

\usetikzlibrary{positioning}

\begin{comment}
:Title: Spherical and cartesian grids

Representation of spherical (red) and cartesian (black) computational grids used
by SWAN_. Latter gives an example of unstructured grids. Conversion from former
to latter involves a deformation factor which is acceptable within a given spatial limit.

The drawing is based on Tomas M. Trzeciak's
`Stereographic and cylindrical map projections example`__.

.. __: http://www.texample.net/tikz/examples/map-projections/
.. _SWAN: http://www.texample.net/tikz/examples/swan-wave-model/
\end{comment}

\newcommand\pgfmathsinandcos[3]{
  \pgfmathsetmacro#1{sin(#3)}
  \pgfmathsetmacro#2{cos(#3)}
}

\newcommand\LongitudePlane[3][current plane]{
  \pgfmathsinandcos\sinEl\cosEl{#2} 
  \pgfmathsinandcos\sint\cost{#3} 
  \tikzset{#1/.style={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}
}

\newcommand\LatitudePlane[3][current plane]{
  \pgfmathsinandcos\sinEl\cosEl{#2} 
  \pgfmathsinandcos\sint\cost{#3} 
  \pgfmathsetmacro\yshift{\cosEl*\sint}
  \tikzset{#1/.style={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} 
}

\newcommand\DrawLongitudeCircle[2][1]{
  \LongitudePlane{\angEl}{#2}
  \tikz
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值