File:Moment of inertia cone.svg

原始文件(SVG文件,尺寸为208 × 214像素,文件大小:14 KB)


摘要

描述
English: Illustration of the moment of inertia of a cone.
日期
来源 SVG rendering of the program used to generate the bitmap image Image:Moment_of_inertia_cone.png
作者
  • Original MetaPost program by en:User:Grendelkhan
  • Program tweaked to avoid negative coordinates in PostScript output and rendered as SVG by Qef
  • Manually edited in inkscape to fixing intersection by Wiso
其他版本 Bitmap rendering of almost identical program: Image:Moment_of_inertia_cone.png
SVG开发
InfoField
 
SVG的源代码为有效代码
 
矢量图使用MetaPost创作。
源代码
InfoField

PostScript code

metapost-source
prologues := 3;

u=18mm;
textscale=u/12mm;

def cone =
  begingroup;
  save pmax,dmax,persp,persp_nt,tens,arr;
  save harr,rarr;
  save p,d;
  save axisprotrusion;
  save xax,yax,zax;
  save height,width,heightu,widthu;
  pmax = 2; dmax = 0;
  persp_nt = 0.5;
  tens = 2-persp_nt;
  persp = persp_nt*u;
  arr = 0.3u; % how far to offset the arrows from the diagram
  axisprotrusion = 0.4u;  % how far do the axes protrude?
  pair harr[],rarr[]; % endpoints for arrows
  path p[],d[]; % just plain paths for now
  pair xax[],yax[],zax[]; % x,y,z are taken; these are for the axes
  % parameters for the actual cone
  height = 1;
  width = 1.5;
  heightu = height*u;
  widthu = width*u;
  % solid paths
  p0 = (0,0)--(widthu/2,heightu);
  p1 = (0,0)--(-widthu/2,heightu);
  p2 = fullcircle scaled u xscaled width yscaled persp_nt shifted (0,heightu);
  % dotted paths
  % don't draw this; it's reference for the y-axis
  d99 = halfcircle scaled u xscaled 2 yscaled (2*persp_nt) rotated 180;
  % endpoints of dimension arrows
  harr0 = (widthu/2,0);
  harr1 = (widthu/2,heightu);
  rarr0 = (0,heightu);
  rarr1 = (widthu/2,heightu);

  % actually draw
  pickup pencircle scaled 1pt;
  for i=0 upto pmax:
    draw p[i];
  endfor;
  drawdblarrow (harr0..harr1);
  label.rt(btex $h$ etex scaled textscale,.5[harr0,harr1]);
  drawdblarrow (rarr0..rarr1);
  label.top(btex $r$ etex scaled textscale,.3[rarr0,rarr1]);
  % x axis
  xax0 = (0,0);
  xax1 = (widthu/2+arr,0);
  drawarrow (xax0..xax1);
  label.rt(btex $x$ etex scaled textscale,xax1);
  % y axis
  yax0 = (0,0);
  yax1 = point 1 of d99;
  yax2 = (width*persp_nt)[yax0,yax1];
  drawarrow (yax0..yax2);
  label.bot(btex $y$ etex scaled textscale,yax2);
  % z axis
  zax0 = (0,0);
  zax1 = (0,heightu);
  zax2 = (0,heightu+axisprotrusion);
  drawarrow (zax1..zax2);
  draw zax0..zax1 dashed evenly;
  label.top(btex $z$ etex scaled textscale,zax2);
  endgroup;
enddef;

beginfig(1)
  cone;
  currentpicture := currentpicture shifted (100,100); % avoid unwanted clipping
endfig;
end

Commands code

mpost fig.mp
ps2pdf -dEPSCrop fig.1 fig.pdf
pstoedit -page 1 -dt -xscale 2 -yscale 2 -f sk fig.pdf fig.sk
inkscape -z --vacuum-defs -f fig.sk -l fig.svg

许可协议

Grendelkhan at the English Wikipedia,本作品著作权人,特此采用以下许可协议发表本作品:
GNU head 已授权您依据自由软件基金会发行的无固定段落及封面封底文字(Invariant Sections, Front-Cover Texts, and Back-Cover Texts)的GNU自由文件许可协议1.2版或任意后续版本的条款,复制、传播和/或修改本文件。该协议的副本请见“GNU Free Documentation License”。
w:zh:知识共享
署名 相同方式共享
本文件采用知识共享署名-相同方式共享 3.0 未本地化版本许可协议授权。
署名: Grendelkhan at the English Wikipedia
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
  • 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。
本许可协议标签作为GFDL许可协议更新的组成部分被添加至本文件。

说明

添加一行文字以描述该文件所表现的内容
engls

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2008年9月23日 (二) 11:122008年9月23日 (二) 11:12版本的缩略图208 × 214(14 KB)Wiso{{Information |Description= |Source= |Date= |Author= |Permission= |other_versions= }}
2008年7月9日 (三) 22:362008年7月9日 (三) 22:36版本的缩略图208 × 214(12 KB)Qef{{Information |Description={{en|1=Illustration of the moment of inertia of a cone.}} |Source=SVG rendering of the program used to generate the bitmap image Image:Moment_of_inertia_cone.png |Author=* Original MetaPost program by [[en:User:Grendelkhan]

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件: