![]() ![]() min ( z ) ) #- # Generating the initial data test points and triangulation for the demo #- # User parameters for data test points n_test = 200 # Number of test data points, tested from 3 to 5000 for subdiv=3 subdiv = 3 # Number of recursive subdivisions of the initial mesh for smooth # plots. #- # Analytical test function #- def experiment_res ( x, y ) : """ An analytic function representing experiment results """ x = 2. tri import Triangulation, TriAnalyzer, UniformTriRefiner Note that, you can remove the x,y axes by doing:įrom matplotlib. ![]() refine_triangulation ( subdiv = 4 ) #plotting the mesh plt. UniformTriRefiner ( triangle ) trimesh = refiner. Triangulation ( corners, corners ) # creating the grid refiner = tri. triangles, v ) # create the grid corners = np. Triangulation ( x, y ) # plot the contour plt. sqrt ( 3 ) * c / ( a + b + c ) # create a triangulation out of these points T = tri. array (, ,, ,, ] ) # barycentric coords: (a,b,c) a = test_data b = test_data c = test_data # values is stored in the last column v = test_data # translate the data to cartesian corrds x = 0.5 * ( 2. # first load some data: format x1,x2,x3,value test_data = np. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |