discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Surface interpolation and BREP-style design with OpenSCAD

MH
Martin Herdieckerhoff
Tue, Feb 28, 2023 1:10 AM

In the desire to provide a safe, easy and intuitive way to create
aesthetically rounded organic forms in OpenSCAD, I developed a library
called 'Yari'. Some of its features are visually presented here. In the
literature which was accessible to me, I did not find what I was looking
for. Therefore all of the used approaches (except for the VFH) are based
on my own thinking and experiments rather than on published papers.

I would classify the resulting approach as an interpolating, geometric,
bivariate, iterative subdivision scheme for PNs (Points with Normals). A
related recent paper of Yang, Xunnian is "Point-Normal Subdivision
Curves and Surfaces" (preprint, v2 of Dec. 2022, [2210.07974] on
arXiv.org). It describes similar goals and produces partially similar
results but the used approach is totally different from mine. One
difference is that the Yari library handles S-shaped boundary conditions
without any problem (compare the discussion of inflections in the cited
paper). Another difference is that the approach taken with Yari is
iterative rather than recursive. Accordingly, refinement is not
restricted to powers of two. This reminds more to NURBS than to
traditional subdivision schemes.

Yari aggregates patches (e.g. curved triangles and quads) to surfaces
with borders or to closed surfaces. These aggregates are held in a
half-edge data structure called VFH (Vertices, Faces and Half-edges) as
BREP. The VFH keeps also the normals. An OpenSCAD polyhedron can be
turned into a VFH and a VFH can be interpolated into an OpenSCAD polyhedron.

Attached images:

  • xing_test
    Input: Four points with simple and intuitive unit normals.
    *Output: *The quad patch is interpolated and replicated 32 times.
    This gives a system of sprues with perfectly circular cross sections
    and with perfectly sine-shaped longitudinal cuts. The sprues form
    perfectly circular holes.

  • torus_test_3x3
    *Input: *3x3 points with normals, regularly placed on a torus.
    Output: The nine patches interpolate to a perfect torus.

  • pyramid_test
    *Input: *An irregular pyramid made of four triangles and a quad. All
    of its corners are on a sphere and the unit normals are taken
    directly from the points.
    Output: The pyramid interpolates to a perfect sphere.

  • tripod_from_PDRAs
    *Input: *Three points with unit directions, radii and (negative or
    positive) opening angles.
    *Output: *A smooth bordered surface spanned by the given pod ends.
    By the way, symmetric, parallel, diverging pods with other lengs of
    legs work as well.

Originally the purpose of this library was to design some jewelry.
Meanwhile I think that the library might be of worth in its own right.

What do experts here think about the shown features?

What would you suggest me to do with the developed algorithms?

-- Martin

In the desire to provide a safe, easy and intuitive way to create aesthetically rounded organic forms in OpenSCAD, I developed a library called 'Yari'. Some of its features are visually presented here. In the literature which was accessible to me, I did not find what I was looking for. Therefore all of the used approaches (except for the VFH) are based on my own thinking and experiments rather than on published papers. I would classify the resulting approach as an interpolating, geometric, bivariate, iterative subdivision scheme for PNs (Points with Normals). A related recent paper of Yang, Xunnian is "Point-Normal Subdivision Curves and Surfaces" (preprint, v2 of Dec. 2022, [2210.07974] on arXiv.org). It describes similar goals and produces partially similar results but the used approach is totally different from mine. One difference is that the Yari library handles S-shaped boundary conditions without any problem (compare the discussion of inflections in the cited paper). Another difference is that the approach taken with Yari is iterative rather than recursive. Accordingly, refinement is not restricted to powers of two. This reminds more to NURBS than to traditional subdivision schemes. Yari aggregates patches (e.g. curved triangles and quads) to surfaces with borders or to closed surfaces. These aggregates are held in a half-edge data structure called VFH (Vertices, Faces and Half-edges) as BREP. The VFH keeps also the normals. An OpenSCAD polyhedron can be turned into a VFH and a VFH can be interpolated into an OpenSCAD polyhedron. Attached images: * *xing_test* *Input:* Four points with simple and intuitive unit normals. *Output: *The quad patch is interpolated and replicated 32 times. This gives a system of sprues with perfectly circular cross sections and with perfectly sine-shaped longitudinal cuts. The sprues form perfectly circular holes. * *torus_test_3x3* *Input: *3x3 points with normals, regularly placed on a torus. *Output:* The nine patches interpolate to a perfect torus. * *pyramid_test* *Input: *An irregular pyramid made of four triangles and a quad. All of its corners are on a sphere and the unit normals are taken directly from the points. *Output:* The pyramid interpolates to a perfect sphere. * *tripod_from_PDRAs* *Input: *Three points with unit directions, radii and (negative or positive) opening angles. *Output: *A smooth bordered surface spanned by the given pod ends. By the way, symmetric, parallel, diverging pods with other lengs of legs work as well. Originally the purpose of this library was to design some jewelry. Meanwhile I think that the library might be of worth in its own right. What do experts here think about the shown features? What would you suggest me to do with the developed algorithms? -- Martin
AM
Adrian Mariano
Tue, Feb 28, 2023 1:29 AM

Your  method looks very interesting.  I've long had an interest in
implementing curves and have been working in the BOSL2 library to do this.
If you're looking for a home for your algorithms, it might be appropriate
to add them to BOSL2.  I explored using Catmull and Ronaldo explored some
other similar methods, but it wasn't clear that any of our approaches were
sufficiently usable to be practical.  But we took a different approach of
starting with a polyhedron and trying to smooth it.

On Mon, Feb 27, 2023 at 8:11 PM Martin Herdieckerhoff <
Martin.Herdieckerhoff@mnet-mail.de> wrote:

In the desire to provide a safe, easy and intuitive way to create
aesthetically rounded organic forms in OpenSCAD, I developed a library
called 'Yari'. Some of its features are visually presented here. In the
literature which was accessible to me, I did not find what I was looking
for. Therefore all of the used approaches (except for the VFH) are based on
my own thinking and experiments rather than on published papers.

I would classify the resulting approach as an interpolating, geometric,
bivariate, iterative subdivision scheme for PNs (Points with Normals). A
related recent paper of Yang, Xunnian is "Point-Normal Subdivision Curves
and Surfaces" (preprint, v2 of Dec. 2022, [2210.07974] on arXiv.org). It
describes similar goals and produces partially similar results but the used
approach is totally different from mine. One difference is that the Yari
library handles S-shaped boundary conditions without any problem (compare
the discussion of inflections in the cited paper). Another difference is
that the approach taken with Yari is iterative rather than recursive.
Accordingly, refinement is not restricted to powers of two. This reminds
more to NURBS than to traditional subdivision schemes.
Yari aggregates patches (e.g. curved triangles and quads) to surfaces with
borders or to closed surfaces. These aggregates are held in a half-edge
data structure called VFH (Vertices, Faces and Half-edges) as BREP. The VFH
keeps also the normals. An OpenSCAD polyhedron can be turned into a VFH and
a VFH can be interpolated into an OpenSCAD polyhedron.

Attached images:

- *xing_test*
*Input:* Four points with simple and intuitive unit normals.
*Output: *The quad patch is interpolated and replicated 32 times.
This gives a system of sprues with perfectly circular cross sections
and with perfectly sine-shaped longitudinal cuts. The sprues form perfectly
circular holes.

- *torus_test_3x3*
*Input: *3x3 points with normals, regularly placed on a torus.
*Output:* The nine patches interpolate to a perfect torus.



- *pyramid_test*
*Input: *An irregular pyramid made of four triangles and a quad. All
of its corners are on a sphere and the unit normals are taken directly from
the points.
*Output:* The pyramid interpolates to a perfect sphere.



- *tripod_from_PDRAs*
*Input: *Three points with unit directions, radii and (negative or
positive) opening angles.
*Output: *A smooth bordered surface spanned by the given pod ends.
By the way, symmetric, parallel, diverging pods with other lengs of
legs work as well.

Originally the purpose of this library was to design some jewelry.
Meanwhile I think that the library might be of worth in its own right.

What do experts here think about the shown features?

What would you suggest me to do with the developed algorithms?

-- Martin


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Your method looks very interesting. I've long had an interest in implementing curves and have been working in the BOSL2 library to do this. If you're looking for a home for your algorithms, it might be appropriate to add them to BOSL2. I explored using Catmull and Ronaldo explored some other similar methods, but it wasn't clear that any of our approaches were sufficiently usable to be practical. But we took a different approach of starting with a polyhedron and trying to smooth it. On Mon, Feb 27, 2023 at 8:11 PM Martin Herdieckerhoff < Martin.Herdieckerhoff@mnet-mail.de> wrote: > In the desire to provide a safe, easy and intuitive way to create > aesthetically rounded organic forms in OpenSCAD, I developed a library > called 'Yari'. Some of its features are visually presented here. In the > literature which was accessible to me, I did not find what I was looking > for. Therefore all of the used approaches (except for the VFH) are based on > my own thinking and experiments rather than on published papers. > > I would classify the resulting approach as an interpolating, geometric, > bivariate, iterative subdivision scheme for PNs (Points with Normals). A > related recent paper of Yang, Xunnian is "Point-Normal Subdivision Curves > and Surfaces" (preprint, v2 of Dec. 2022, [2210.07974] on arXiv.org). It > describes similar goals and produces partially similar results but the used > approach is totally different from mine. One difference is that the Yari > library handles S-shaped boundary conditions without any problem (compare > the discussion of inflections in the cited paper). Another difference is > that the approach taken with Yari is iterative rather than recursive. > Accordingly, refinement is not restricted to powers of two. This reminds > more to NURBS than to traditional subdivision schemes. > Yari aggregates patches (e.g. curved triangles and quads) to surfaces with > borders or to closed surfaces. These aggregates are held in a half-edge > data structure called VFH (Vertices, Faces and Half-edges) as BREP. The VFH > keeps also the normals. An OpenSCAD polyhedron can be turned into a VFH and > a VFH can be interpolated into an OpenSCAD polyhedron. > > Attached images: > > - *xing_test* > *Input:* Four points with simple and intuitive unit normals. > *Output: *The quad patch is interpolated and replicated 32 times. > This gives a system of sprues with perfectly circular cross sections > and with perfectly sine-shaped longitudinal cuts. The sprues form perfectly > circular holes. > > - *torus_test_3x3* > *Input: *3x3 points with normals, regularly placed on a torus. > *Output:* The nine patches interpolate to a perfect torus. > > > > - *pyramid_test* > *Input: *An irregular pyramid made of four triangles and a quad. All > of its corners are on a sphere and the unit normals are taken directly from > the points. > *Output:* The pyramid interpolates to a perfect sphere. > > > > - *tripod_from_PDRAs* > *Input: *Three points with unit directions, radii and (negative or > positive) opening angles. > *Output: *A smooth bordered surface spanned by the given pod ends. > By the way, symmetric, parallel, diverging pods with other lengs of > legs work as well. > > > Originally the purpose of this library was to design some jewelry. > Meanwhile I think that the library might be of worth in its own right. > > What do experts here think about the shown features? > > What would you suggest me to do with the developed algorithms? > > -- Martin > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >