📄 maincogpolartest.html
字号:
<TITLE>COG 2.0: disc</TITLE>
<H1>Intersection with a disc</H1>
<P>In this variant, instead of the <A HREF="maincogtest.html">3D
cube</A>, the intersection of the
<A HREF="cogtest.html">test cogeometry</A> with a 2D disc (shifted in
z-direction) is computed.
<PRE>
#include "<A HREF="coglib.hxx">cog/coglib.hxx</A>"
cogeometry test_cogeometry();
#include "<A HREF="cogtest.cxx">cogtest.cxx</A>"
int main()
{
cogeometry geom = test_cogeometry();
cogenOctree base = new <A HREF="cogenoctree.html">CogenOctree</A>();
base->setBorder(0.0,1.0, -wzPi,wzPi);
base->refinementGlobal(0.1,0.3);
</PRE>
<P>Now, let's define the coordinates. Let's assume that we want to
compute a non-trivial z-intersection of the circle with the
geometry (z=0.3), and the cogeometry may be a non-trivial 3D
cogeometry:
<PRE>
base->addPlaneZ(0.3);
</PRE>
<P>This requires 3D coordinates! But polar coordinates are only 2D
coordinates, thus, we have to construct a <B>3D continuation</B>:
<PRE>
wzcoordinates polar = new wz3DContinuation(new wzPolarCoordinates);
cogenChart gen = new CogenChart(base->generator(),polar);
wzgrid grid = (*gen)(geom);
grid->write("test.sg");
}
</PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -