Beispiel #1
0
 def test_generate_ellipsoid(self):
     nstep = 50
     randomSampling = True
     a = 2
     b = 1
     ellips = sps.generate_ellipsiod(a, b, nstep, randomSampling)
     assert len(ellips.vertices) == nstep**2
Beispiel #2
0
visb_sc = splt.visbrain_plot(mesh=quadric,
                             tex=quadric_mean_curv,
                             caption='quadric',
                             cblabel='mean curvature')

visb_sc.preview()

###############################################################################
# Generating an ellipsiods

nstep = 50
randomSampling = True
a = 2
b = 1
ellips = sgps.generate_ellipsiod(a, b, nstep, randomSampling)

visb_sc = splt.visbrain_plot(mesh=ellips, caption='ellipsoid', visb_sc=visb_sc)

visb_sc.preview()

###############################################################################
# Generating a sphere
sphere_regular = sgps.generate_sphere_icosahedron(subdivisions=3, radius=4)

visb_sc = splt.visbrain_plot(mesh=sphere_regular,
                             caption='sphere_regular',
                             visb_sc=visb_sc)

visb_sc.preview()