Go to the source code of this file.
|
| and colour the % cells with the value of the orientational correlations defined at each % | site (col=1) |
| |
| and colour the % cells with the value of the orientational correlations defined at each % or with the area of the | cell (col=0). % x |
| |
| id | Returns:Testcase: (id variance, [Testcase] -1, 1, 20 linspace) |
| |
| % | voronoi2dCellColour (kron(x', ones(length(y), 1)), kron(ones(length(x), 1), y'), 0.75, zeros(length(x)^ 2, 1), 1, 0) |
| |
| % If at least one of the indices % then it is an open region and we can t patch that | area (jj) |
| |
| | p6cp6 (jj) |
| |
| % use area as color end if | edgeCol (jj)< 0 h.EdgeColor |
| |
| | get (h) |
| |
| | plot (x, y, 'r *') |
| |
| | plot (x, y, 'bo') |
| |
| colorbar | set (gca, 'FontName', 'Latin Modern Roman', 'FontSize', 22) |
| |
| | set (gca, 'TickLabelInterpreter', 'latex') |
| |
| | ylabel (' $y$(m)', 'Interpreter', 'latex') |
| |
| | xlabel (' $x$(m)', 'Interpreter', 'latex') |
| |
|
| | function [p6cp6, area, avg_area, num_edges, var] |
| |
| and colour the % cells with the value of the orientational correlations defined at each % or with the area of the | y =x |
| |
| and colour the % cells with the value of the orientational correlations defined at each % or with the area of the | edgeCol ==0 is black |
| |
| and colour the % cells with the value of the orientational correlations defined at each % or with the area of the edgeCol is white % | dx = 1 |
| |
| % | radius = 0.5 |
| |
| | q = ones(length(x)*length(y),1) |
| |
| | DT = delaunayTriangulation([x y]) |
| |
| if | colScheme |
| |
| end | num_edges =zeros(length(c),1) |
| |
| | avg_area = 0 |
| |
| | area =zeros(length(c),1) |
| |
| | clf |
| |
| | R = DT.Points |
| |
| % Credit to MathWorks support team for neighboringVertices m | vTriAtt = vertexAttachments(DT) |
| |
| for | ii |
| |
| % Find all the unique vertices and remove the current vertex | neighboursOfInternal {ii} = setdiff(unique(verticesOfTI), ii) |
| |
| end % Calculate the Voronoi diagram for | jj |
| |
| % If at least one of the indices | is |
| |
| | h = patch(v(c{jj},1),v(c{jj},2),p6cp6(jj)) |
| |
| h | LineWidth = '2' |
| |
| h | LineStyle = '-' |
| |
| | var = sum((area(area>1) - avg_area).^2) |
| |
| hold | on |
| |
| axis | square |
| |
◆ area()
| % If at least one of the indices % then it is an open region and we can t patch that area |
( |
jj |
| ) |
|
◆ cell()
| and colour the % cells with the value of the orientational correlations defined at each % or with the area of the cell |
( |
col |
= 0 | ) |
|
◆ edgeCol()
◆ get()
◆ p6cp6()
◆ plot() [1/2]
◆ plot() [2/2]
◆ Returns:Testcase:()
| id Returns:Testcase: |
( |
id |
variance, |
|
|
[Testcase] - |
1, |
|
|
1 |
, |
|
|
20 |
linspace |
|
) |
| |
|
virtual |
◆ set() [1/2]
◆ set() [2/2]
◆ site()
| and colour the % cells with the value of the orientational correlations defined at each % site |
( |
col |
= 1 | ) |
|
◆ voronoi2dCellColour()
| % voronoi2dCellColour |
( |
kron(x', ones(length(y), 1)) |
, |
|
|
kron(ones(length(x), 1), y') |
, |
|
|
0. |
75, |
|
|
zeros(length(x)^ 2, 1) |
, |
|
|
1 |
, |
|
|
0 |
|
|
) |
| |
◆ xlabel()
◆ ylabel()
◆ area
◆ avg_area
◆ clf
◆ colScheme
Initial value:==1
__global__ void zeros(double *field, int n)
Creates a field of all zeros ,.
Definition at line 27 of file voronoi2dCellColour.m.
◆ DT
| DT = delaunayTriangulation([x y]) |
◆ dx
◆ edgeCol
| and colour the % cells with the value of the orientational correlations defined at each % or with the area of the edgeCol ==0 is black |
◆ function
Initial value:%vorCellColour Determine the Voronoi diagram of the input
dataand colour the % cells with the value of the orientational correlations defined at each % or with the area of the edgeCol is white % dx
and colour the % cells with the value of the orientational correlations defined at each % or with the area of the y
and colour the % cells with the value of the orientational correlations defined at each % or with the area of the edgeCol
% Indexing needs to % be modified if you wish to use the ordered data sets % Calculate the Voronoi diagram of the resulting data
% voronoi2dCellColour(kron(x', ones(length(y), 1)), kron(ones(length(x), 1), y'), 0.75, zeros(length(x)^ 2, 1), 1, 0)
Definition at line 1 of file voronoi2dCellColour.m.
◆ ii
Initial value: % 2. Use the connectivity list to get the vertex indices of all these
% triangles
% Credit to MathWorks support team for neighboringVertices m vTriAtt
Definition at line 39 of file voronoi2dCellColour.m.
◆ is
| % If at least one of the indices is |
◆ jj
| end % Calculate the Voronoi diagram for jj |
Initial value: %Credit to MathWorks team
for voronoi examples. https:
end % Calculate the Voronoi diagram for jj
and colour the % cells with the value of the orientational correlations defined at each % or with the area of the y
end if sqrt(sum([x(ii), y(ii)].^ 2))< radius %% ignore edges if(length(DT.vertexAttachments
def voronoi(dataName, dataType, value)
Definition at line 48 of file voronoi2dCellColour.m.
◆ LineStyle
◆ LineWidth
◆ neighboursOfInternal
| % Find all the unique vertices and remove the current vertex neighboursOfInternal {ii} = setdiff(unique(verticesOfTI), ii) |
◆ num_edges
◆ on
◆ radius
◆ square
◆ var
◆ vTriAtt
| % Credit to MathWorks support team for neighboringVertices m vTriAtt = vertexAttachments(DT) |