File:Moment of inertia solid cylinder.svg

页面内容不支持其他语言。
這個文件來自維基共享資源
维基百科,自由的百科全书

原始文件(SVG文件,尺寸为200 × 223像素,文件大小:16 KB)


摘要

描述
English: Illustration of the moment of inertia of a solid cylinder.
日期
来源 SVG rendering of the program used to generate the bitmap image Image:Moment_of_inertia_solid_cylinder.png
作者
  • Original MetaPost program by en:User:Grendelkhan
  • Program tweaked to avoid negative coordinates in PostScript output and rendered as SVG by Qef
  • Swap x and y axis to give right handed coordinate system by billingd on 2017-05-20
其他版本 Bitmap rendering of almost identical program: Image:Moment_of_inertia_solid_cylinder.png
SVG开发
InfoField
 
SVG的源代码为有效代码
 
矢量图使用MetaPost创作。
源代码
InfoField

PostScript code

metapost-source
prologues := 3;

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

def cylinder =
  begingroup;
  save pmax,dmax,persp,persp_nt,arr;
  save harrtop,harrbot,rarrlft,rarrrt;
  save p,d;
  save axisprotrusion;
  save xax,yax,zax;
  pmax = 3; dmax = 0;
  persp_nt = 0.3;
  persp = persp_nt*u;
  arr = 0.2u; % how far to offset the arrows from the diagram
  axisprotrusion = 1u;  % how far do the axes protrude?
  pair harrtop,harrbot,rarrlft,rarrrt; % endpoints for arrows
  path p[],d[]; % original, dotted
  pair xax[],yax[],zax[]; % x,y,z are taken; these are for the axes
  % solid paths
  p0 = (-1u,-1u)--(-1u,1u);
  p1 = (1u,-1u)--(1u,1u);
  p2 = fullcircle scaled u xscaled 2 yscaled (2*persp_nt) shifted (0,1u);
  p3 = halfcircle scaled u xscaled 2 yscaled (2*persp_nt) rotated 180 shifted (0,-1u);
  % dashed paths
  d0 = halfcircle scaled u xscaled 2 yscaled (2*persp_nt) shifted (0,-1u);
  % endpoints of dimension arrows
  harrtop = (-1u-arr,1u);
  harrbot = (-1u-arr,-1u);
  rarrlft = (0,1u);
  rarrrt = (1u,1u);

  % actually draw
  pickup pencircle scaled 1pt;
  for i=0 upto pmax:
    draw p[i];
  endfor;
  for i=0 upto dmax:
    draw d[i] dashed evenly;
  endfor;
  drawdblarrow (harrtop..harrbot);
  drawdblarrow (rarrlft..rarrrt);
  label.lft(btex $h$ etex scaled textscale,.5[harrtop,harrbot]);
  label.top(btex $r$ etex scaled textscale,.5[rarrlft,rarrrt]);
  % x axis
  xax0 = (0,0);
  xax1 = point 1.5 of p3 shifted (0,1u);
  xax2 = (1.+axisprotrusion/u)[xax0,xax1];
  drawarrow (xax1..xax2);
  draw xax0..xax1 dashed evenly;
  label.rt(btex $y$ etex scaled textscale,xax2);
  % y axis
  yax0 = (0,0);
  yax1 = (1u,0);
  yax2 = (1u+axisprotrusion*0.5,0);
  drawarrow (yax1..yax2);
  draw yax0..yax1 dashed evenly;
  label.top(btex $x$ etex scaled textscale,yax2);
  % z axis
  zax0 = (0,0);
  zax1 = (0,1u);
  zax2 = (0,1u+axisprotrusion);
  drawarrow (zax1..zax2);
  draw zax0..zax1 dashed evenly;
  label.top(btex $z$ etex scaled textscale,zax2);
  endgroup;
enddef;

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

Data

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
pdf2svg fig.pdf 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许可协议更新的组成部分被添加至本文件。

说明

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

此文件中描述的项目

描繪內容

文件历史

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

日期/时间缩⁠略⁠图大小用户备注
当前2017年5月19日 (五) 14:452017年5月19日 (五) 14:45版本的缩略图200 × 223(16 KB)BillingdUpdate metapost code to swap x and y axes to give a right handed coordinate system. Regenerate svg.
2008年7月9日 (三) 22:362008年7月9日 (三) 22:36版本的缩略图320 × 357(13 KB)Qef{{Information |Description={{en|1=Illustration of the moment of inertia of a solid cynlinder.}} |Source=SVG rendering of the program used to generate the bitmap image Image:Moment_of_inertia_solid_cylinder.png |Author=* Original MetaPost program by [

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件:

元数据