Surface Fitting

Bergtroll

Bekanntes Mitglied
Hello again, liebes Java-Forum,

habe endlich mal wieder eine Java Aufgabe und auch mal wieder ein knackiges Problem, dass es zu lösen gilt. Ich habe eine Punktemenge im 3D-Raum, welche die Stützpunkte einer Oberfläche sind. Stellt euch einfach ein Drahtgitter vor, jede Gitterzelle ist quadratisch, dass ihr über die Rundung eines Baumstammes legt. Die Gitterpunkte sind meine Messpunkte.

Jetzt kann ich ja jede Gitterzelle recht einfach durch zwei Dreiecke triangulieren. Das Problem ist aber, dass meine daraus resultierende Oberfläche im Vergleich zur echten Oberfläche ziemlich grobkantig ist, weil das Messgitter sehr grobmaschig ist. Ich muss also irgendwie eine stetige Fläche an die Messpunkte fitten, so dass ich zwischenwerte interpolieren kann. Rauschen und Abweichler sind nicht vorhanden.

Unter C / C++ gibts massig Bibliotheken für so Zeugs, aber ich bin nunmal Java Fan :-D. Wisst ihr, ob es da nicht doch irgendeine kluge Bibliothek gibt? Alternativ wäre ich für Stichworte zur Literatur dankbar, "Surface fitting", "Mash smoothing", etc. war bisher nicht sehr erfolgreich, bzw. eher für große, wildverteilte Punktmengen. Das muss doch einfacher gehen?

Viele Grüße vom Berg,

Troll
 

Bergtroll

Bekanntes Mitglied
So, ich bin nun etwas weiter, da ich das Paper Curve and Surface Interpolation and Approximation: Knowledge Unit and Software Tool gefunden habe.

Außerdem vermute ich, dass ich mit Polynom basierten Interpolationen wie der Legendre Interpolation aus zwei Gründen wohl nicht weiterkomme:

1. Je nach Stellung der Punkte bekommt man sehr schnell ein oszillierendes Polynom, was für die anzunähernde Oberfläche keinen Sinn macht.

2. Ändert man die Position eines einzigen Punktes, verändert sich die komplette Interpolationskurve, obwohl es angemessener wäre, wenn dies nur die Umgebung beträfe.

Dem o.g. Paper zur Folge wäre ich vermutlich mit einer lokalen B-Spline Interpolation oder einem Gordon Surface gut bedient. Habt ihr ne Idee, in welcher Java Bibliothek sich so etwas wohlmöglich verstecken könnte?

LG, Bergtroll
 

Bergtroll

Bekanntes Mitglied
Sodalla, meine Aufgabe lies sich mit VisAD lösen. FYI hier die Antwort, die ich in der Mailing Liste erhalten habe, damit gings:

> I am back to a new 3D project and now wonder, how to interpolate a
> surface from which I know the coordinates of about 100 measurment
> points? They are taken from the bulge surface of the upper half circle
> of a tree trunk.
>
> My First question is, which kind of set to use? I think it should be
> Gridded2DSet, because the x and y coordinates would be the domain and z
> the manifold dimension?

In 3-D the domain dimension is 3 but for a surface
the manifold dimension is 2.

Defining a surface for your data will be much simpler
if you know that one coordinate is a single-valued
function of the other 2. For example, in a topography
z is a function of x and y.

For a tree trunk, it may make sense to use cylindrical
coordinates: height, theta (angle) and radius (from the
center line of the tree trunk). If you know that radius
is a single-valued function of height and theta (which
seems naively intuitive), then you can construct a
triangular topology in a Delaunay object by passing the
100 (height, theta) pairs to the Delaunay.factory()
method, then passing this Delaunay object to a
Irregular3DSet constructor, along with the 100
(height, theta, radius) triples. This should construct
an Irregular3DSet with manifold dimension = 2.

> My second question is, how to interpolate a smooth non-oscillating
> surface from this points. It should represents the bulge surface in a
> smooth way, so that CAD shapers can reproduce it.

You can interpolate by passing the Delaunay object
and the 100 (height, theta) pairs to an Irregular2DSet
constructor, constructing a FlatField of this with
radius values in the range, then resmapling this to
a Gridded2DSet. You can pull values out of the resampled
FlatField to construct a Gridded3DSet with manifild
dimension = 2.

I am -->very rusty<-- at all this stuff, so caveat
emptor.

Viele Grüße,
Bergtroll
 

Neue Themen


Oben