cogellipsetest.html
来自「有限元学习研究用源代码(老外的),供科研人员参考」· HTML 代码 · 共 34 行
HTML
34 行
<TITLE>COG 1.0: Ellipse</TITLE>
<PRE>
#include "<A HREF="cogsimple.cxx">cogsimple.hxx</A>"
</PRE>
<H2>CogeometryEllipsoid</H2>
<P>Here we create an ellipsoid. The implementation is based on the
usage of the class <A HREF="cogfunctiontest.html">
CogeometryByRegions</A>.
<P>The implementation of the ellipse in <A
HREF="cogsimple.hxx">cogsimple.hxx</A> and <A
HREF="cogsimple.cxx">cogsimple.cxx</A> may be used as a pattern how to
create other cogeometries which depend on a fixed number of
parameters.
<P>The class <B>CogeometryEllipsoid</B> defines an ellipsoid (main
axes in coordinate direction) by the center <B>(px,py,pz)</B> and the
radius in each direction <B>(rx,ry,rz)</B>.
<PRE>
cogeometry test_cogeometry()
{
cogFloat rx=0.5,ry=0.7,rz=0.3;
CogeometryEllipsoid *s=new CogeometryEllipsoid(wzRegion(2),wzRegion(1));
s->setCenter(0.4,0.4,0.6);
s->setRadius(rx,ry,rz);
return s;
}
</PRE>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?