python - Return surface triangle of 3D scipy.spatial.Delaunay -


I have this problem. I try to triple the point client by simple.partial.delun. I used:

  tri = delaunay (number) # Issue: N.P.Rray () index of 3D digit = tri.simplices corner = points [index]  

But, this code return quadrilateral is how it is possible to triangle the triangle?

Thank you

To make it work as a code, For example, in the case of the ball (R, theta, psi) the radius is fixed (drop down) and the number (theta, PE) is given by 2D.

Sapli delun n-dimensional triangle, so if you give 3d digit, it returns 3D objects. Give it 2D points and it gives 2D objects.

Below is a script I used to create Polyhedra for OpenCAD. U and V are my parametrization (x and y) and these are the coordinates that I give to Deluenay. Note that "delayed triangle properties" now only apply in u, V coordinates (xyz -space, etc. not the maximum in an UV-space).

The example is a modified copy that basically uses the triangle function (maps for Delaunay eventually?)

  as import Import from MPL as NP import Import from matplotlib.pyplot mpl_toolkits.mplot3d as PLT Exps 3D Import from matplotlib.tri SPC as MTRI. Local Import Delaunay # u, v Parameter Variable U = NP Array ([0,0,0,5,1,1]) v = np.array ([0,1,0,5,0,1]) x = uy = Vz = np.array ([0,0] , 1,0,0]) # Triangle parameter to determine the space triangle #tri = mtri.Trangulation (u, v) tri = delaunay (np.array ([u, v]). 'Print' kaleidoscope (faces = ['Tri.triangles in vert for: tri.simplices for ends: print' [% d,% d,% d], '% (vert [0], vert [1], verte [2]), Print '], for the number ([i] in the range (x. [0] size): print' [% f,% f,% f], '% (x [i], y [i], z [Ii]), print ']);' fig = plt.figure () ax = fig.add_subplot (1, 1, 1, projection = '3') # Parameter triangle assessment in space What x, y, z numbers are connected to edge # ax.plot_trisurf (X, y, z, triangle = triangle, semip = plt.cm.Spectral) ax.plot_trisurf (x, y, Z, triangle = tri.simplices, cmap = plt.cm.Spectral) plt.show ()  

The text output is below (slightly more structured):

  Kaleidoscope (faces = [[2,1 , 0], [3,2,0], [4,2,3], [2,4,1], = points [[[0.000000.00.000000,0.000000], [0.000000,1.000000,0.000000], [ 0.500000,0.500000,1.000000], [1.000000,0.000000,0.000000], [1.000000,1.000000,0.000000],]);  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -