zoukankan      html  css  js  c++  java
  • PGF基本图形对象

    documentclass{article}
    usepackage[active ,tightpage ,xetex ]{ preview}
    usepackage{tikz}
    
    egin{document}
    egin{preview}
    egin{tikzpicture}
    ----------------------------------------------------------------------------------------------------------
    %1 直线和矩形
    draw (0,0) --(4,0) --(2,2) --(0,0);
    draw (5,0) --(9,0) --(7,2)--cycle;
    draw [rounded corners] (10 ,0) --(14,0) --(12,2)--cycle;
    draw (15 ,0) rectangle (19 ,2);
    draw [rounded corners] (20 ,0) rectangle (24 ,2);
    ----------------------------------------------------------------------------------------------------------
    %2 圆、椭圆、弧
    draw (1,-3) circle (1);
    draw (5,-3) ellipse (2 and 1);
    draw (10 ,-3) arc (0:270:1);
    draw (15 ,-3) arc (0:270:2 and 1);
    -----------------------------------------------------------------------------------------------------------
    %3 曲线
    draw (0,-6).. controls (2,-4) and (4,-4) ..(4 ,-6);
    filldraw (0,-6) circle (.1)
    (2,-6) circle (.1)
    (4,-4) circle (.1)
    (4,-6) circle (.1);
    draw (5,-5) parabola bend (6,-6) (7.414 ,-4);
    filldraw (5,-5) circle (.1)
    (6,-6) circle (.1)
    (7.414 ,-6) circle (.1);
    draw (8,-6) sin (10 ,-4) cos (12 ,-6);
    filldraw (8,-6) circle (.1)
    (10 ,-4) circle (.1)
    (12 ,-6) circle (.1);
    -----------------------------------------------------------------------------------------------------------
    %4 网格
    draw [step=5pt] (0,-9) grid (3,-7);
    draw [help lines ,step=5pt] (4,-9) grid (7,-7);
    -----------------------------------------------------------------------------------------------------------
    end{tikzpicture}
    end{preview}
    end{document}
    

     

  • 相关阅读:
    Project Chameleon Work In Progress 14
    All about Project Chameleon
    网页中图片连续滚动代码 (转)
    一点感言
    一些常用javascript代码(转)
    asp.net(c#)的一个非常非常奇怪的问题
    用javascript拦截a标签的超链接执行
    asp.net中用TreeView控件实现无限分级的好办法
    windows7 安装ez usb基本驱动
    管道编程
  • 原文地址:https://www.cnblogs.com/wangshixi12/p/4112569.html
Copyright © 2011-2022 走看看