discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Rounded Polygon

A
adrianv
Tue, May 28, 2019 3:17 AM

That is very interesting.  Here is a comparison of a cube made from a hull of
triangular patches and a cube made from a hull of (degenerate) rectangular
patches.  http://forum.openscad.org/file/t2477/cubes.png

It sort of looks like there's something funny going on at the boundary of
the tripatch, but I suppose it must be just a rendering artifact.  I am
printing some test cubes to see if I can tell the difference.

--
Sent from: http://forum.openscad.org/

That is very interesting. Here is a comparison of a cube made from a hull of triangular patches and a cube made from a hull of (degenerate) rectangular patches. <http://forum.openscad.org/file/t2477/cubes.png> It sort of looks like there's something funny going on at the boundary of the tripatch, but I suppose it must be just a rendering artifact. I am printing some test cubes to see if I can tell the difference. -- Sent from: http://forum.openscad.org/
A
adrianv
Tue, May 28, 2019 10:42 PM

Does the boundary of your tripatch have an order 4 bezier representation?  It
sounds like you constructed the match to match up with such a curve?  What
are the order 4 control points for the patch you posted?

My FDM printed models are inconclusive because the shape of the roundovers
is not similar enough.  The case I did with spheres does seem worse, despite
the limited resolution of my layer thickness---I printed with 0.15mm layers.
I might try another test with 0.05 layers after a better effort to match the
shape of the roundovers.  But ultimately there's a problem that the limited
z resolution makes this less important.  I suppose someone with SLS or some
other higher resolution output device would notice the difference more
clearly.

--
Sent from: http://forum.openscad.org/

Does the boundary of your tripatch have an order 4 bezier representation? It sounds like you constructed the match to match up with such a curve? What are the order 4 control points for the patch you posted? My FDM printed models are inconclusive because the shape of the roundovers is not similar enough. The case I did with spheres does seem worse, despite the limited resolution of my layer thickness---I printed with 0.15mm layers. I might try another test with 0.05 layers after a better effort to match the shape of the roundovers. But ultimately there's a problem that the limited z resolution makes this less important. I suppose someone with SLS or some other higher resolution output device would notice the difference more clearly. -- Sent from: http://forum.openscad.org/
A
adrianv
Tue, May 28, 2019 11:33 PM

I was studying my 3d printed models some more and noticed that the highlights
on the roundover from the right direction appear to have a corner, which
raises questions about the curvature continuity.  Another observation is
that the behavior of those highlights is visually odd, as compared to the
highlights from the degenerate rectangular patch, where the highlights don't
do anything strange.

--
Sent from: http://forum.openscad.org/

I was studying my 3d printed models some more and noticed that the highlights on the roundover from the right direction appear to have a corner, which raises questions about the curvature continuity. Another observation is that the behavior of those highlights is visually odd, as compared to the highlights from the degenerate rectangular patch, where the highlights don't do anything strange. -- Sent from: http://forum.openscad.org/
RP
Ronaldo Persiano
Wed, May 29, 2019 1:04 AM

Thank you for your interest in the solution I proposed.

adrianv avm4@cornell.edu wrote:

Does the boundary of your tripatch have an order 4 bezier representation?
It
sounds like you constructed the match to match up with such a curve?  What
are the order 4 control points for the patch you posted?

Yes, the border of the standard 5th degree tripatch is indeed 4th degree
Bezier curve like the ones we considered for 2D cases with curvature
continuity. Its degree was elevated to 5 in order to have more freedom in
the internal control points of the patch. The control points of the 3
border curves of the standard 5th degree tripatch are:

[[1, 1, 0], [1, 0.6, 0], [1, 0, 0], [1, 0, 0.6], [1, 0, 1]]

[[0, 1, 1], [0, 1, 0.6], [0, 1, 0], [0.6, 1, 0], [1, 1, 0]]

[[1, 0, 1], [0.6, 0, 1], [0, 0, 1], [0, 0.6, 1], [0, 1, 1]]

They correspond to 4th degree curves with a form factor of r0=0.4.
Another possible form factor appeared in the development of the tripatch.
Its effect is restricted to the interior of the patch and do not affect its
border. That form factor were arbitrated to be 1 in the standard 5th degree
tripatch I proposed before.

My FDM printed models are inconclusive because the shape of the roundovers
is not similar enough.  The case I did with spheres does seem worse,
despite
the limited resolution of my layer thickness---I printed with 0.15mm
layers.
I might try another test with 0.05 layers after a better effort to match
the
shape of the roundovers.  But ultimately there's a problem that the limited
z resolution makes this less important.  I suppose someone with SLS or some
other higher resolution output device would notice the difference more
clearly.

It seems to me that to compare the standard tripatch with the degenerated
rectangular one, this last one should be generated with the same form
factor 0.4. Otherwise, the corner border curves (and the edge roundover)
may be very different.

Thank you for your interest in the solution I proposed. adrianv <avm4@cornell.edu> wrote: > Does the boundary of your tripatch have an order 4 bezier representation? > It > sounds like you constructed the match to match up with such a curve? What > are the order 4 control points for the patch you posted? > Yes, the border of the standard 5th degree tripatch is indeed 4th degree Bezier curve like the ones we considered for 2D cases with curvature continuity. Its degree was elevated to 5 in order to have more freedom in the internal control points of the patch. The control points of the 3 border curves of the standard 5th degree tripatch are: [[1, 1, 0], [1, 0.6, 0], [1, 0, 0], [1, 0, 0.6], [1, 0, 1]] [[0, 1, 1], [0, 1, 0.6], [0, 1, 0], [0.6, 1, 0], [1, 1, 0]] [[1, 0, 1], [0.6, 0, 1], [0, 0, 1], [0, 0.6, 1], [0, 1, 1]] They correspond to 4th degree curves with a form factor of r0=0.4. Another possible form factor appeared in the development of the tripatch. Its effect is restricted to the interior of the patch and do not affect its border. That form factor were arbitrated to be 1 in the standard 5th degree tripatch I proposed before. > My FDM printed models are inconclusive because the shape of the roundovers > is not similar enough. The case I did with spheres does seem worse, > despite > the limited resolution of my layer thickness---I printed with 0.15mm > layers. > I might try another test with 0.05 layers after a better effort to match > the > shape of the roundovers. But ultimately there's a problem that the limited > z resolution makes this less important. I suppose someone with SLS or some > other higher resolution output device would notice the difference more > clearly. > It seems to me that to compare the standard tripatch with the degenerated rectangular one, this last one should be generated with the same form factor 0.4. Otherwise, the corner border curves (and the edge roundover) may be very different.
RP
Ronaldo Persiano
Wed, May 29, 2019 1:29 AM

adrianv avm4@cornell.edu wrote:

I was studying my 3d printed models some more and noticed that the
highlights
on the roundover from the right direction appear to have a corner, which
raises questions about the curvature continuity.

What do you mean here by "right direction"?

Another observation is
that the behavior of those highlights is visually odd, as compared to the
highlights from the degenerate rectangular patch, where the highlights
don't
do anything strange.

If you give me the form factor value you are using in your degenerate
rectangular roundover , I could generate a standard 5th degree tripatch
that meets the same form factor. Besides the form factor itself, it would
be nice to have the patch border control points to check against mine patch.

adrianv <avm4@cornell.edu> wrote: > I was studying my 3d printed models some more and noticed that the > highlights > on the roundover from the right direction appear to have a corner, which > raises questions about the curvature continuity. What do you mean here by "right direction"? > Another observation is > that the behavior of those highlights is visually odd, as compared to the > highlights from the degenerate rectangular patch, where the highlights > don't > do anything strange. > If you give me the form factor value you are using in your degenerate rectangular roundover , I could generate a standard 5th degree tripatch that meets the same form factor. Besides the form factor itself, it would be nice to have the patch border control points to check against mine patch.
A
adrianv
Wed, May 29, 2019 1:34 AM

Ronaldo wrote

It seems to me that to compare the standard tripatch with the degenerated
rectangular one, this last one should be generated with the same form
factor 0.4. Otherwise, the corner border curves (and the edge roundover)
may be very different.

I agree, hence the inconclusive nature of the test.

However, I am definitely bothered by the funky highlights.  In the pictures
the tripatch is on the left, degenerate rectangle in the middle, and
circular roundover on the right.  The highlights look odd, which in an of
itself is a negative characteristic of the printed model.  It's probably the
most noticeable characteristic of the curves.  It seems like the tripatch
has some sort of bulge compared to the other ones.

http://forum.openscad.org/file/t2477/hilights.jpg
http://forum.openscad.org/file/t2477/highlights2.jpg

--
Sent from: http://forum.openscad.org/

Ronaldo wrote > It seems to me that to compare the standard tripatch with the degenerated > rectangular one, this last one should be generated with the same form > factor 0.4. Otherwise, the corner border curves (and the edge roundover) > may be very different. I agree, hence the inconclusive nature of the test. However, I am definitely bothered by the funky highlights. In the pictures the tripatch is on the left, degenerate rectangle in the middle, and circular roundover on the right. The highlights look odd, which in an of itself is a negative characteristic of the printed model. It's probably the most noticeable characteristic of the curves. It seems like the tripatch has some sort of bulge compared to the other ones. <http://forum.openscad.org/file/t2477/hilights.jpg> <http://forum.openscad.org/file/t2477/highlights2.jpg> -- Sent from: http://forum.openscad.org/
A
adrianv
Wed, May 29, 2019 1:46 AM

Ronaldo wrote

adrianv <

avm4@

> wrote:

I was studying my 3d printed models some more and noticed that the
highlights
on the roundover from the right direction appear to have a corner, which
raises questions about the curvature continuity.

What do you mean here by "right direction"?

To use more precise language:  There exists a direction from which the
highlight line on the model appears to have a corner (highlight has a
discontinuity in its derivative).  This is visible in the photo I posted in
my other message.

If you give me the form factor value you are using in your degenerate
rectangular roundover , I could generate a standard 5th degree tripatch
that meets the same form factor. Besides the form factor itself, it would
be nice to have the patch border control points to check against mine
patch.

I generated my patch like this:

Q = cornerPatchCP([0,0,0],1.5, 0.3);

using the cornerPatchCP that you previously posted.  I was comparing this
patch to the patch you originally posted, so the length of d disagrees, I
think.  I can change the patch, but for print test a larger curve is better.

--
Sent from: http://forum.openscad.org/

Ronaldo wrote > adrianv &lt; > avm4@ > &gt; wrote: > >> I was studying my 3d printed models some more and noticed that the >> highlights >> on the roundover from the right direction appear to have a corner, which >> raises questions about the curvature continuity. > > > What do you mean here by "right direction"? To use more precise language: There exists a direction from which the highlight line on the model appears to have a corner (highlight has a discontinuity in its derivative). This is visible in the photo I posted in my other message. > If you give me the form factor value you are using in your degenerate > rectangular roundover , I could generate a standard 5th degree tripatch > that meets the same form factor. Besides the form factor itself, it would > be nice to have the patch border control points to check against mine > patch. I generated my patch like this: Q = cornerPatchCP([0,0,0],1.5, 0.3); using the cornerPatchCP that you previously posted. I was comparing this patch to the patch you originally posted, so the length of d disagrees, I think. I can change the patch, but for print test a larger curve is better. -- Sent from: http://forum.openscad.org/
RP
Ronaldo Persiano
Wed, May 29, 2019 2:45 AM

adrianv avm4@cornell.edu wrote:

To use more precise language:  There exists a direction from which the
highlight line on the model appears to have a corner (highlight has a
discontinuity in its derivative).  This is visible in the photo I posted
in
my other message.

I understand it now. In fact, the images suggest something odd in the
border of the tripatch. See bellow.

I generated my patch like this:

Q = cornerPatchCP([0,0,0],1.5, 0.3);

using the cornerPatchCP that you previously posted.  I was comparing this
patch to the patch you originally posted, so the length of d disagrees, I
think.  I can change the patch, but for print test a larger curve is
better.

The standard patch has a unitary "radius". To get a bigger roundover to
print, just scale it up.
The value 1.5 of the second argument in cornerPatchCP correspond to scale
up the standard patch by 1.5.
To match the form factor of the border curves of  cornerPatchCP([0,0,0],1,
0.3) you may use the following standard patch CPs:

[[0, 1, 1]]

[[0, 1, 0.76], [0, 0.76, 1]]

[[0, 1, 0.28], [0, 0.7, 0.7], [0, 0.28, 1]]

[[0.28, 1, 0], [0, 0.55, 0], [0, 0, 0.55], [0.28, 0, 1]]

[[0.76, 1, 0], [0.7, 0.7, 0], [0.55, 0, 0], [0.7, 0, 0.7], [0.76, 0, 1]]

[[1, 1, 0], [1, 0.76, 0], [1, 0.28, 0], [1, 0, 0.28], [1, 0, 0.76], [1, 0,
1]]

That patch may be somewhat bulged when compared with a sphere, for
instance.

The best approximation I got of a sphere surface with a G2 tripatch has the
following CPs:

[[0, 1, 0.904], [0, 0.904, 1]]

[[0, 1, 0.352], [0, 0.88, 0.88], [0, 0.352, 1]]

[[0.352, 1, 0], [0, 0.52, 0], [0, 0, 0.52], [0.352, 0, 1]]

[[0.904, 1, 0], [0.88, 0.88, 0], [0.52, 0, 0], [0.88, 0, 0.88], [0.904, 0,
1]]

[[1, 1, 0], [1, 0.904, 0], [1, 0.352, 0], [1, 0, 0.352], [1, 0, 0.904], [1,
0, 1]]

whose border curves should match the border curves of cornerPatchCP([0,0,0],1,
0.12).

The second form factor I mentioned before does not affect the patch border
but controls the bulge of the patch. When we decrease its value, but
keeping the border curves fixed, the patch curvature varies very fast,
although continuously, near the patch border which may appear as a
discontinuity. Which means that the 3rd derivative near the border is
higher. Perhaps, that is the cause of the highlight behavior we observe in
your images. The last patch above seems to be a reasonable compromise.

adrianv <avm4@cornell.edu> wrote: > To use more precise language: There exists a direction from which the > highlight line on the model appears to have a corner (highlight has a > discontinuity in its derivative). This is visible in the photo I posted > in > my other message. I understand it now. In fact, the images suggest something odd in the border of the tripatch. See bellow. I generated my patch like this: > > Q = cornerPatchCP([0,0,0],1.5, 0.3); > > using the cornerPatchCP that you previously posted. I was comparing this > patch to the patch you originally posted, so the length of d disagrees, I > think. I can change the patch, but for print test a larger curve is > better. > The standard patch has a unitary "radius". To get a bigger roundover to print, just scale it up. The value 1.5 of the second argument in cornerPatchCP correspond to scale up the standard patch by 1.5. To match the form factor of the border curves of cornerPatchCP([0,0,0],1, 0.3) you may use the following standard patch CPs: [[0, 1, 1]] [[0, 1, 0.76], [0, 0.76, 1]] [[0, 1, 0.28], [0, 0.7, 0.7], [0, 0.28, 1]] [[0.28, 1, 0], [0, 0.55, 0], [0, 0, 0.55], [0.28, 0, 1]] [[0.76, 1, 0], [0.7, 0.7, 0], [0.55, 0, 0], [0.7, 0, 0.7], [0.76, 0, 1]] [[1, 1, 0], [1, 0.76, 0], [1, 0.28, 0], [1, 0, 0.28], [1, 0, 0.76], [1, 0, 1]] That patch may be somewhat bulged when compared with a sphere, for instance. The best approximation I got of a sphere surface with a G2 tripatch has the following CPs: [[0, 1, 0.904], [0, 0.904, 1]] [[0, 1, 0.352], [0, 0.88, 0.88], [0, 0.352, 1]] [[0.352, 1, 0], [0, 0.52, 0], [0, 0, 0.52], [0.352, 0, 1]] [[0.904, 1, 0], [0.88, 0.88, 0], [0.52, 0, 0], [0.88, 0, 0.88], [0.904, 0, 1]] [[1, 1, 0], [1, 0.904, 0], [1, 0.352, 0], [1, 0, 0.352], [1, 0, 0.904], [1, 0, 1]] whose border curves should match the border curves of cornerPatchCP([0,0,0],1, 0.12). The second form factor I mentioned before does not affect the patch border but controls the bulge of the patch. When we decrease its value, but keeping the border curves fixed, the patch curvature varies very fast, although continuously, near the patch border which may appear as a discontinuity. Which means that the 3rd derivative near the border is higher. Perhaps, that is the cause of the highlight behavior we observe in your images. The last patch above seems to be a reasonable compromise.
RP
Ronaldo Persiano
Wed, May 29, 2019 6:48 PM

I have bad news. The patches I have stated as G2 are just G1. I have found
a bug in my checkG2 function. I am sorry.

I have bad news. The patches I have stated as G2 are just G1. I have found a bug in my checkG2 function. I am sorry.
A
adrianv
Wed, May 29, 2019 9:08 PM

Does this mean you think a G2 patch does not exist?  Or just that it requires
different constraints?

--
Sent from: http://forum.openscad.org/

Does this mean you think a G2 patch does not exist? Or just that it requires different constraints? -- Sent from: http://forum.openscad.org/