File talk:SVP.svg

来自Wikimedia Commons
跳转到导航 跳转到搜索

The code to generate this file is

\documentclass[10pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}[thick] \pgfmathsetlengthmacro{\unit}{1.2cm} \pgfmathtruncatemacro{\xmax}{2} \pgfmathtruncatemacro{\ymax}{1} \node(e1) at (\unit,0.1*\unit){}; \node(e2) at (0.3*\unit,0.7*\unit){}; \foreach \x in {-1,...,\xmax}{ \foreach \y in {-1,...,\ymax}{ \node[fill, circle, minimum size=0.1*\unit] at ($\x*(e1) + \y*(e2)$){}; } } \draw [->, blue, very thick] (0,0) -- node[below right]{$b_1$} ($2*(e1)+(e2)$); \draw [->, blue, very thick] (0,0) --node[near start,above left]{$b_2$} ($(e1)+(e2)$); \draw [->, red, very thick] (0,0) -- ($-1*(e2)$); \end{tikzpicture} \end{document}

Echsecutor (留言) 23:26, 25 October 2015 (UTC)[回复]