Commit eb68edec authored by Benedikt Zoennchen's avatar Benedikt Zoennchen
Browse files

Merge branch 'exp/IFIM' into 'master'

Exp/ifim

See merge request !150
parents 50832dd6 53ccc811
Pipeline #429655 passed with stages
in 124 minutes and 28 seconds
......@@ -60,8 +60,15 @@ public class ActionGenerateMesh extends AbstractAction {
ex.printStackTrace();
return null;
});
/*CompletableFuture.supplyAsync(
() -> constructor.pslgToUniformOptimalPMesh(pslg, hmin,true)).thenAccept(mesh -> saveFloorFieldMesh(mesh,""))
.exceptionally( ex -> {
ex.printStackTrace();
return null;
});*/
CompletableFuture.supplyAsync(
() -> constructor.pslgToCoarsePMesh(pslg, true)).thenAccept(mesh -> saveFloorFieldMesh(mesh,IOUtils.BACKGROUND_MESH_ENDING))
() -> constructor.pslgToCoarsePMesh(pslg, p -> Double.POSITIVE_INFINITY,true)).thenAccept(mesh -> saveFloorFieldMesh(mesh,IOUtils.BACKGROUND_MESH_ENDING))
.exceptionally( ex -> {
ex.printStackTrace();
return null;
......@@ -70,7 +77,7 @@ public class ActionGenerateMesh extends AbstractAction {
}
private void saveFloorFieldMesh(@NotNull final IMesh<PVertex, PHalfEdge, PFace> mesh, final String ending) {
logger.info("generate mesh");
logger.info("generate mesh (" + mesh.getMinEdgeLen() + ", " + mesh.getMaxEdgeLen() + ")");
File meshDir = new File(model.getCurrentProjectPath().concat("/" + IOUtils.SCENARIO_DIR + "/" + IOUtils.MESH_DIR));
File outputFile = new File(meshDir.getAbsoluteFile() + "/" + model.getCurrentScenario().getName() + ending + ".poly");
......
......@@ -143,11 +143,13 @@ public class OnlineVisualization implements PassiveCallback {
selectedAgent = (Agent)model.getSelectedElement();
}
if(model.config.isShowPotentialField() && selectedAgent != null && potentialField != null) {
/*if(model.config.isShowPotentialField() && selectedAgent != null && potentialField != null) {
pedPotentialField = IPotentialField.copyAgentField(potentialField, selectedAgent, new VRectangle(model.getTopographyBound()), 0.1);
}
}*/
//ObservationAreaSnapshotData data = new ObservationAreaSnapshotData(simTimeInSec, domain.clone(), pft, pedPotentialField, selectedAgent, discretizations);
ObservationAreaSnapshotData data = new ObservationAreaSnapshotData(simTimeInSec, domain, pft, pedPotentialField, selectedAgent, discretizations);
ObservationAreaSnapshotData data = new ObservationAreaSnapshotData(simTimeInSec, domain.clone(), pft, pedPotentialField, selectedAgent, discretizations);
model.pushObservationAreaSnapshot(data);
}
}
......
package org.vadere.gui.onlinevisualization.view;
import java.awt.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.Random;
import java.util.stream.Stream;
import org.jetbrains.annotations.NotNull;
......@@ -14,6 +16,7 @@ import org.vadere.gui.renderer.agent.AgentRender;
import org.vadere.state.scenario.Agent;
import org.vadere.state.scenario.Pedestrian;
import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.visualization.ColorHelper;
public class OnlinevisualizationRenderer extends SimulationRenderer {
......@@ -22,6 +25,7 @@ public class OnlinevisualizationRenderer extends SimulationRenderer {
private final Map<Integer, VPoint> lastPedestrianPositions;
private final Map<Integer, VPoint> pedestrianDirections;
private final Map<Integer, LinkedList<VPoint>> pedestrianPositions;
private final ArrayList<Color> randomColors = new ArrayList<>();
public OnlinevisualizationRenderer(final OnlineVisualizationModel model) {
super(model);
......@@ -54,10 +58,35 @@ public class OnlinevisualizationRenderer extends SimulationRenderer {
}
}
private Color getNextRandomColor() {
Random random = new Random(1);
Color color = new Color(random.nextInt(150), random.nextInt(150), random.nextInt(150));
while (randomColors.contains(color)) {
color = new Color(random.nextInt(150), random.nextInt(150), random.nextInt(150));
}
randomColors.add(color);
return color;
}
private Color getRandomColor(final int index) {
if(randomColors.size() <= index) {
while (randomColors.size() <= index) {
randomColors.add(getNextRandomColor());
}
}
return randomColors.get(index);
}
private void renderPedestrians(final Graphics2D g) {
AgentRender agentRender = getAgentRender();
for (Pedestrian ped : model.getPedestrians()) {
Color agentColor = getPedestrianColor(ped);
if(ped.updateCount != -1) {
agentColor = getRandomColor(ped.updateCount);
}
g.setColor(agentColor);
VPoint position = ped.getPosition();
agentRender.render(ped, agentColor, g);
......
......@@ -4,7 +4,7 @@ import org.jetbrains.annotations.NotNull;
import org.vadere.meshing.mesh.gen.PMesh;
import org.vadere.meshing.mesh.impl.PSLG;
import org.vadere.meshing.mesh.triangulation.DistanceFunctionApproxBF;
import org.vadere.meshing.mesh.triangulation.EdgeLengthFunctionApprox;
import org.vadere.meshing.mesh.triangulation.edgeLengthFunctions.EdgeLengthFunctionApprox;
import org.vadere.meshing.utils.io.poly.PSLGGenerator;
import org.vadere.meshing.utils.io.tex.TexGraphGenerator;
import org.vadere.util.math.IDistanceFunction;
......
......@@ -3,7 +3,7 @@ package org.vadere.meshing.examples;
import org.vadere.meshing.mesh.gen.PMeshSuppliert;
import org.vadere.meshing.mesh.impl.PMeshPanel;
import org.vadere.meshing.mesh.inter.IPointConstructor;
import org.vadere.meshing.mesh.triangulation.IEdgeLengthFunction;
import org.vadere.meshing.mesh.triangulation.edgeLengthFunctions.IEdgeLengthFunction;
import org.vadere.meshing.mesh.triangulation.improver.eikmesh.gen.GenEikMesh;
import org.vadere.meshing.mesh.triangulation.improver.eikmesh.impl.PEikMesh;
import org.vadere.meshing.mesh.triangulation.triangulator.impl.PDelaunayTriangulator;
......@@ -416,7 +416,7 @@ public class EikMeshExamples {
// display the mesh
//meshPanel.display("Geometry defined by a distance function (ring)");
var recorder = new MovRecorder<>(meshImprover, meshPanel.getMeshRenderer(), 1024, 800, meshImprover.getMesh().getBound());
var recorder = new MovRecorder<>(meshImprover, meshPanel.getMeshRenderer(), 1024, 800);
recorder.record();
recorder.finish();
......@@ -488,7 +488,7 @@ public class EikMeshExamples {
// display the mesh
meshPanel.display("Edge length function");*/
var recorder = new MovRecorder<>(meshImprover, meshPanel.getMeshRenderer(), 1024, 800, meshImprover.getMesh().getBound());
var recorder = new MovRecorder<>(meshImprover, meshPanel.getMeshRenderer(), 1024, 800);
recorder.record();
recorder.finish();
}
......
......@@ -9,16 +9,14 @@ import org.vadere.meshing.mesh.impl.PMeshPanel;
import org.vadere.meshing.mesh.impl.PSLG;
import org.vadere.meshing.mesh.inter.IMesh;
import org.vadere.meshing.mesh.inter.IPointConstructor;
import org.vadere.meshing.mesh.triangulation.EdgeLengthFunctionApprox;
import org.vadere.meshing.mesh.triangulation.IEdgeLengthFunction;
import org.vadere.meshing.mesh.triangulation.edgeLengthFunctions.EdgeLengthFunctionApprox;
import org.vadere.meshing.mesh.triangulation.edgeLengthFunctions.IEdgeLengthFunction;
import org.vadere.meshing.mesh.triangulation.improver.distmesh.Distmesh;
import org.vadere.meshing.mesh.triangulation.improver.eikmesh.EikMeshPoint;
import org.vadere.meshing.mesh.triangulation.improver.eikmesh.gen.GenEikMesh;
import org.vadere.meshing.mesh.triangulation.improver.eikmesh.impl.PEikMesh;
import org.vadere.meshing.mesh.triangulation.triangulator.impl.PDelaunayTriangulator;
import org.vadere.meshing.mesh.triangulation.triangulator.impl.PRuppertsTriangulator;
import org.vadere.meshing.utils.color.Colors;
import org.vadere.meshing.utils.io.IOUtils;
import org.vadere.meshing.utils.io.poly.PSLGGenerator;
import org.vadere.meshing.utils.io.tex.TexGraphGenerator;
import org.vadere.util.geometry.GeometryUtils;
......@@ -27,11 +25,9 @@ import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.VPolygon;
import org.vadere.util.geometry.shapes.VRectangle;
import org.vadere.util.geometry.shapes.VTriangle;
import org.vadere.util.math.DistanceFunction;
import org.vadere.util.math.IDistanceFunction;
import java.awt.*;
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
......
......@@ -9,7 +9,7 @@ import org.vadere.meshing.mesh.gen.PVertex;
import org.vadere.meshing.mesh.impl.PMeshPanel;
import org.vadere.meshing.mesh.impl.PSLG;
import org.vadere.meshing.mesh.triangulation.DistanceFunctionApproxBF;
import org.vadere.meshing.mesh.triangulation.EdgeLengthFunctionApprox;
import org.vadere.meshing.mesh.triangulation.edgeLengthFunctions.EdgeLengthFunctionApprox;
import org.vadere.meshing.mesh.triangulation.improver.eikmesh.impl.PEikMesh;
import org.vadere.meshing.mesh.triangulation.triangulator.impl.PRuppertsTriangulator;
import org.vadere.meshing.utils.color.Colors;
......@@ -18,16 +18,11 @@ import org.vadere.meshing.utils.io.poly.MeshPolyWriter;
import org.vadere.meshing.utils.io.poly.PSLGGenerator;
import org.vadere.meshing.utils.io.tex.TexGraphGenerator;
import org.vadere.util.geometry.shapes.VPolygon;
import org.vadere.util.geometry.shapes.VRectangle;
import org.vadere.util.geometry.shapes.VShape;
import org.vadere.util.math.DistanceFunctionTarget;
import org.vadere.util.math.IDistanceFunction;
import java.awt.*;
import java.io.*;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;
import java.util.function.Predicate;
......
......@@ -4,7 +4,7 @@ import org.vadere.meshing.mesh.gen.MeshRenderer;
import org.vadere.meshing.mesh.gen.PFace;
import org.vadere.meshing.mesh.impl.PMeshPanel;
import org.vadere.meshing.mesh.impl.PSLG;
import org.vadere.meshing.mesh.triangulation.EdgeLengthFunctionApprox;
import org.vadere.meshing.mesh.triangulation.edgeLengthFunctions.EdgeLengthFunctionApprox;
import org.vadere.meshing.mesh.triangulation.improver.eikmesh.impl.PEikMesh;
import org.vadere.meshing.utils.color.Colors;
import org.vadere.meshing.utils.io.poly.PSLGGenerator;
......
......@@ -10,7 +10,7 @@ import org.vadere.meshing.mesh.impl.PMeshPanel;
import org.vadere.meshing.mesh.impl.PSLG;
import org.vadere.meshing.mesh.inter.IMeshDistanceFunction;
import org.vadere.meshing.mesh.inter.IPointConstructor;
import org.vadere.meshing.mesh.triangulation.IEdgeLengthFunction;
import org.vadere.meshing.mesh.triangulation.edgeLengthFunctions.IEdgeLengthFunction;
import org.vadere.meshing.mesh.triangulation.improver.eikmesh.EikMeshPoint;
import org.vadere.meshing.mesh.triangulation.improver.eikmesh.impl.PEikMesh;
import org.vadere.meshing.mesh.triangulation.triangulator.impl.ADelaunayTriangulator;
......@@ -645,7 +645,7 @@ public class MeshExamples {
panel.repaint();*/
//System.out.println(TexGraphGenerator.toTikz(meshImprover.getMesh()));
var recorder = new MovRecorder<>(meshImprover, panel.getMeshRenderer(), 1024, 800, meshImprover.getMesh().getBound());
var recorder = new MovRecorder<>(meshImprover, panel.getMeshRenderer(), 1024, 800);
recorder.record();
recorder.finish();
......@@ -784,7 +784,7 @@ public class MeshExamples {
logger.info(TexGraphGenerator.toTikz(meshImprover.getMesh()));*/
var recorder = new MovRecorder<>(meshImprover, panel.getMeshRenderer(), 1024, 800, meshImprover.getMesh().getBound());
var recorder = new MovRecorder<>(meshImprover, panel.getMeshRenderer(), 1024, 800);
recorder.record();
recorder.finish();
}
......
......@@ -15,8 +15,8 @@ import org.vadere.meshing.mesh.impl.PSLG;
import org.vadere.meshing.mesh.inter.IMesh;
import org.vadere.meshing.mesh.inter.IPointConstructor;
import org.vadere.meshing.mesh.triangulation.DistanceFunctionApproxBF;
import org.vadere.meshing.mesh.triangulation.EdgeLengthFunctionApprox;
import org.vadere.meshing.mesh.triangulation.IEdgeLengthFunction;
import org.vadere.meshing.mesh.triangulation.edgeLengthFunctions.EdgeLengthFunctionApprox;
import org.vadere.meshing.mesh.triangulation.edgeLengthFunctions.IEdgeLengthFunction;
import org.vadere.meshing.mesh.triangulation.improver.distmesh.Distmesh;
import org.vadere.meshing.mesh.triangulation.improver.eikmesh.EikMeshPoint;
import org.vadere.meshing.mesh.triangulation.improver.eikmesh.gen.GenEikMesh;
......@@ -31,7 +31,6 @@ import org.vadere.meshing.utils.io.poly.PSLGGenerator;
import org.vadere.meshing.utils.io.tex.TexGraphGenerator;
import org.vadere.util.geometry.GeometryUtils;
import org.vadere.util.geometry.shapes.IPoint;
import org.vadere.util.geometry.shapes.VCircle;
import org.vadere.util.geometry.shapes.VDisc;
import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.VPolygon;
......@@ -43,15 +42,12 @@ import org.vadere.util.math.IDistanceFunction;
import java.awt.Color;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
......
......@@ -68,19 +68,22 @@ public class RegularRefinement {
GenRegularRefinement<PVertex, PHalfEdge, PFace> refinement = new GenRegularRefinement<>(
triangulation,
e -> triangulation.getMesh().toLine(e).length() > 0.5 && triangulation.getMesh().toTriangle(triangulation.getMesh().getFace(e)).midPoint().distance(p) <= radius,
1);
//e -> triangulation.getMesh().toLine(e).length() > 0.5 && triangulation.getMesh().toTriangle(triangulation.getMesh().getFace(e)).midPoint().distance(p) <= radius,
3);
Predicate<PHalfEdge> edgeSplitPredicate = e ->
!triangulation.getMesh().isBoundary(e) &&
triangulation.getMesh().toTriangle(triangulation.getMesh().getFace(e)).midPoint().distance(p) < 3.0 &&
(!refinement.isGreen(e) || triangulation.getMesh().toLine(e).length() > 0.5);
refinement.setEdgeRefinementPredicate(edgeSplitPredicate);
refinement.refine();
//refinement.setEdgeRefinementPredicate(edgeSplitPredicate);
synchronized (triangulation.getMesh()) {
refinement.refine();
}
meshPanel.repaint();
Thread.sleep(2000);
/*Thread.sleep(2000);
VPoint q = new VPoint(3,3);
Predicate<PVertex> coarsePredicate = v -> q.distance(v) > 3.0;
refinement.setCoarsePredicate(coarsePredicate);
......@@ -94,7 +97,7 @@ public class RegularRefinement {
triangulation.getMesh().toTriangle(triangulation.getMesh().getFace(e)).midPoint().distance(q) < 3.0 &&
(!refinement.isGreen(e) || triangulation.getMesh().toLine(e).length() > 0.5);
refinement.setEdgeRefinementPredicate(edgeSplitPredicate);
refinement.refine();
refinement.refine();*/
}
}
package org.vadere.meshing.examples;
import org.vadere.meshing.mesh.gen.AFace;
import org.vadere.meshing.mesh.gen.AHalfEdge;
import org.vadere.meshing.mesh.gen.AVertex;
import org.vadere.meshing.mesh.gen.MeshPanel;
import org.vadere.meshing.mesh.gen.MeshRenderer;
import org.vadere.meshing.mesh.gen.PFace;
import org.vadere.meshing.mesh.gen.PHalfEdge;
import org.vadere.meshing.mesh.gen.PVertex;
import org.vadere.meshing.mesh.triangulation.IEdgeLengthFunction;
import org.vadere.meshing.mesh.triangulation.improver.eikmesh.impl.AEikMesh;
import org.vadere.meshing.mesh.triangulation.improver.eikmesh.impl.PEikMesh;
import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.VRectangle;
import org.vadere.util.geometry.shapes.VShape;
import org.vadere.util.math.IDistanceFunction;
import org.vadere.util.visualization.ColorHelper;
import java.awt.*;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;
import javax.swing.text.ParagraphView;
public class SierpinskiSorting {
public static void main(String... args) throws InterruptedException, IOException {
......
......@@ -200,7 +200,7 @@ public class MeshRenderer<V extends IVertex, E extends IHalfEdge, F extends IFac
}
}
List<E> edgest = mesh.streamEdges().filter(e -> !mesh.isBoundary(e)).filter(e -> isNonAcute(e, mesh)).collect(Collectors.toList());
/*List<E> edgest = mesh.streamEdges().filter(e -> !mesh.isBoundary(e)).filter(e -> isNonAcute(e, mesh)).collect(Collectors.toList());
Random random = new Random(0);
for (E edge : edgest) {
V v = mesh.getVertex(edge);
......@@ -217,9 +217,9 @@ public class MeshRenderer<V extends IVertex, E extends IHalfEdge, F extends IFac
graphics.setColor(new Color(random.nextFloat(), random.nextFloat(), random.nextFloat()));
graphics.fill(tri);
}*/
}
/* }
}
}*/
for(E edge : edges) {
Color ec = Color.DARK_GRAY;
......
......@@ -511,6 +511,9 @@ public class PMesh implements IMesh<PVertex, PHalfEdge, PFace> {
faceMap.put(f, cF);
cF.setEdge(edgeMap.get(f.getEdge()));
clone.faces.add(cF);
if(isHole(f)) {
clone.holes.add(cF);
}
}
for(PVertex cV : clone.vertices) {
......
......@@ -7,7 +7,7 @@ import org.vadere.meshing.mesh.inter.ITriangulationSupplier;
import org.vadere.meshing.mesh.triangulation.triangulator.gen.GenUniformRefinementTriangulator;
import org.vadere.util.geometry.shapes.VRectangle;
import org.vadere.util.geometry.shapes.VShape;
import org.vadere.meshing.mesh.triangulation.IEdgeLengthFunction;
import org.vadere.meshing.mesh.triangulation.edgeLengthFunctions.IEdgeLengthFunction;
import java.util.Collection;
......
......@@ -23,6 +23,7 @@ import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.VRectangle;
import org.vadere.meshing.mesh.gen.IncrementalTriangulation;
import org.vadere.meshing.mesh.triangulation.triangulator.gen.GenUniformTriangulator;
import org.vadere.util.math.InterpolationUtil;
import java.util.Collection;
import java.util.HashSet;
......@@ -111,6 +112,17 @@ public interface IIncrementalTriangulation<V extends IVertex, E extends IHalfEdg
.filter(getMesh()::isAlive).map(getMesh()::toLine).collect(Collectors.toSet());
}
default double getInterpolatedValue(final double px, final double py, final String valueName) {
double x[] = new double[3];
double y[] = new double[3];
double z[] = new double[3];
var face = locateFace(px, py).get();
getTriPoints(face, x, y, z, valueName);
double totalArea = GeometryUtils.areaOfPolygon(x, y);
double value = InterpolationUtil.barycentricInterpolation(x, y, z, totalArea, px, py);
return value;
}
// factory methods
......
......@@ -2045,6 +2045,14 @@ public interface IMesh<V extends IVertex, E extends IHalfEdge, F extends IFace>
return result;
}
default double getMinEdgeLen() {
return streamEdges().map(e -> toLine(e)).mapToDouble(l -> l.length()).min().orElse(0.0);
}
default double getMaxEdgeLen() {
return streamEdges().map(e -> toLine(e)).mapToDouble(l -> l.length()).max().orElse(0.0);
}
/**
* Returns the half-edge which ends in v1 and starts in v2 if there is any, otherwise empty.
*
......
......@@ -15,6 +15,7 @@ import org.vadere.util.geometry.shapes.VPoint;
import org.vadere.util.geometry.shapes.VTriangle;
import org.vadere.util.logging.Logger;
import org.vadere.util.math.IDistanceFunction;
import org.vadere.util.math.InterpolationUtil;
import java.util.ArrayList;
import java.util.HashSet;
......
package org.vadere.meshing.mesh.triangulation;
package org.vadere.meshing.mesh.triangulation.edgeLengthFunctions;
import org.jetbrains.annotations.NotNull;
import org.vadere.meshing.mesh.gen.PFace;
......@@ -22,9 +22,6 @@ public class EdgeLengthFunctionApprox implements IEdgeLengthFunction {
private IIncrementalTriangulation<PVertex, PHalfEdge, PFace> triangulation;
private static final String propName = "edgeLength";
public EdgeLengthFunctionApprox(
@NotNull final PSLG pslg,
@NotNull final Function<IPoint, Double> circumRadiusFunc) {
......@@ -43,7 +40,7 @@ public class EdgeLengthFunctionApprox implements IEdgeLengthFunction {
VRectangle bound = GeometryUtils.boundRelativeSquared(pslg.getSegmentBound().getPoints(), 0.3);
PSLG boundedPSLG = pslg.conclose(bound);
var ruppertsTriangulator = new PRuppertsTriangulator(boundedPSLG, circumRadiusFunc, 10, false);
var ruppertsTriangulator = new PRuppertsTriangulator(boundedPSLG, pslg, circumRadiusFunc, 10, false, false);
triangulation = ruppertsTriangulator.generate();
triangulation.enableCache();
......@@ -59,7 +56,7 @@ public class EdgeLengthFunctionApprox implements IEdgeLengthFunction {
if(!mesh.getBooleanData(mesh.getFace(e), "boundary")
|| !mesh.getBooleanData(mesh.getTwinFace(e), "boundary")) {
var u = triangulation.getMesh().getTwinVertex(e);
double len = v.distance(u) * (1.0 / Math.sqrt(2));
double len = v.distance(u) * (1.0 / (Math.sqrt(2) * 1.2/*4.0*/));
if(len < minEdgeLen) {
minEdgeLen = len;
}
......@@ -81,28 +78,7 @@ public class EdgeLengthFunctionApprox implements IEdgeLengthFunction {
public void smooth(double g) {
assert g > 0;
// smooth the function based such that it is g-Lipschitz
var mesh = triangulation.getMesh();
PriorityQueue<PVertex> heap = new PriorityQueue<>(
Comparator.comparingDouble(v1 -> mesh.getDoubleData(v1, propName))
);
heap.addAll(mesh.getVertices());
while (!heap.isEmpty()) {
var v = heap.poll();
double hv = mesh.getDoubleData(v, propName);
for (var u : mesh.getAdjacentVertexIt(v)) {
double hu = mesh.getDoubleData(u, propName);
double min = Math.min(hu, hv + g * v.distance(u));
// update heap
if (min < hu) {
heap.remove(u);
mesh.setDoubleData(u, propName, min);
heap.add(u);
}
}
}
smooth(g, triangulation);
}
@Override
......
package org.vadere.meshing.mesh.triangulation;
package org.vadere.meshing.mesh.triangulation.edgeLengthFunctions;
import org.jetbrains.annotations.NotNull;
import org.vadere.util.geometry.shapes.IPoint;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment