cogtorustest.html

来自「有限元学习研究用源代码(老外的),供科研人员参考」· HTML 代码 · 共 26 行

HTML
26
字号
<TITLE>COG 1.0: torus</TITLE>
<H2>CogeometryTorus</H2>

<PRE>
#include "cogsimple.hxx"
</PRE>

 <P>Here we test some elementary cogeometries.  The implementation is
based on the usage of the class <A HREF="cogfunctiontest.html">
CogeometryByRegions</A>.

 <P>This example defines a torus in the xy-plane by the center
<B>(px,py,pz)</B>, the big and the small radius <B>rbig, rsmall</B>.

<PRE>
cogeometry test_cogeometry()
{
  cogFloat rbig=0.9,rsmall=0.3;
  CogeometryTorus *t = new CogeometryTorus(wzRegion(3),wzRegion(1));
  t-&gt;setCenter(0,0.8,0.7);
  t-&gt;setScale(rbig,rsmall); 
  return t;
}
</PRE>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?