POV-Ray : Newsgroups : povray.binaries.images : Smoothing bicubic_patchs. A pain. Server Time: 17 Feb 2019 22:30:38 GMT
 Smoothing bicubic_patchs. A pain. (Message 1 to 10 of 34)
 From: BGimeno Subject: Smoothing bicubic_patchs. A pain. Date: 8 Aug 2018 16:48:11 Message: <5b6b1ecb@news.povray.org>
```Can someone think of a better way for cover the gaps left by these
sphere_sweep (cubic_spline) curves with bicubic_patch?. I've been
looking at before posting this message and I am stuck at the point at
which, for the example given in the documentation I arrived to a
self-referential loop. (in short: being a circular shape you need to
know previously the point B to know point A and point A to calculate the
point B).
doc: http://www.povray.org/documentation/view/3.6.1/64/

Another point is commented by clipka a 2015 post on this issue.

If it is mathematically impossible to make a perfect circle based on
patches, I suppose that the task of adjusting them smoothly to this form
can not be carried out either.

Any help or idea to the respective one is welcome, thank you very much

Bruno Gimeno
```

Attachments:

Preview of image 'tbtsfh2.png'

 From: Bald Eagle Subject: Re: Smoothing bicubic_patchs. A pain. Date: 8 Aug 2018 19:15:00 Message:
```BGimeno <bru### [at] gmailcom> wrote:
> Can someone think of a better way for cover the gaps left by these
> sphere_sweep (cubic_spline) curves with bicubic_patch?. I've been
> looking at before posting this message and I am stuck at the point at
> which, for the example given in the documentation I arrived to a
> self-referential loop. (in short: being a circular shape you need to
> know previously the point B to know point A and point A to calculate the
> point B).
> doc: http://www.povray.org/documentation/view/3.6.1/64/
>
> Another point is commented by clipka a 2015 post on this issue.
>
>
> If it is mathematically impossible to make a perfect circle based on
> patches, I suppose that the task of adjusting them smoothly to this form
> can not be carried out either.
>
> Any help or idea to the respective one is welcome, thank you very much
>
> Bruno Gimeno

Hi Bruno - IIRC, you can't use a bezier spline to make a circle.
https://stackoverflow.com/questions/1734745/how-to-create-circle-with-b%C3%A9zier-curves
But you may be able to sufficiently approximate it with several end-to-end.

When it comes to the patch, if you want to specify the points that the patch
will intersect, you need a matrix of 3x3 patches.  Otherwise, with only one
patch, you're left specifying the control points of the bezier splines, which
aren't on the surface of the patch.

I started working to address exactly this  a while back, and got to the point
where I was just ripping my hair out.

6768&moff=22

Maybe we look at it with fresh eyes and get a good 3x3 patch that works.
```
 From: Le Forgeron Subject: Re: Smoothing bicubic_patchs. A pain. Date: 8 Aug 2018 20:37:03 Message: <5b6b546f\$1@news.povray.org>
```Le 08/08/2018 Ã  18:48, BGimeno a Ã©critÂ :
> Can someone think of a better way for cover the gaps left by these
> sphere_sweep (cubic_spline) curves with bicubic_patch?. I've been
> looking at before posting this message and I am stuck at the point at
> which, for the example given in the documentation I arrived to a
> self-referential loop. (in short: being a circular shape you need to
> know previously the point B to know point A and point A to calculate the
> point B).
> doc: http://www.povray.org/documentation/view/3.6.1/64/
>
> Another point is commented by clipka a 2015 post on this issue.
>
>
>
> If it is mathematically impossible to make a perfect circle based on
> patches, I suppose that the task of adjusting them smoothly to this form
> can not be carried out either.
>
> Any help or idea to the respective one is welcome, thank you very much
>
> Bruno Gimeno

I presume you can transfer each sphere_sweep into its own spline
(cubic_spline too), so you can generate as many points as you need along
each curve

Then you are at the problem of generating a surface from a non-plane
canvas of four sides.
And there is a lot of different results.

If you can compute a point as the center of the face, or if you can
compute parallel lines between two opposite sides, you can generate
meshes to fill the canvas.

With a central point, each triangle is connected to the central point
and the other side is along one spline of the side. Make as many
triangles as needed to cover the side, repeat for each side.

Probably more to your desire, we could distinguish the side as being
rather circular (the sphere_sweep make a small circle around the torus)
or rather straignt (the sphere_sweep follow the major circle of the torus).

Which mean you can draw straight line between the circular opposite
segments. And if you have straight lines, you can compute by
interpolation some intermediate circular segments on which to fix the
```
 From: Bald Eagle Subject: Re: Smoothing bicubic_patchs. A pain. Date: 8 Aug 2018 22:15:01 Message:
```BGimeno <bru### [at] gmailcom> wrote:

> Any help or idea to the respective one is welcome, thank you very much

The other thing to consider, is if you have a grid that follows the surface of
the "torus", then you can determine the intersections and fill every "rectangle"
with two smooth_triangles.
```
 From: Bald Eagle Subject: Re: Smoothing bicubic_patchs. A pain. Date: 9 Aug 2018 16:30:00 Message:
```Here's the thread I was trying to find and link to:

```
 From: Tor Olav Kristensen Subject: Re: Smoothing bicubic_patchs. A pain. Date: 15 Aug 2018 02:55:01 Message:
```BGimeno <bru### [at] gmailcom> wrote:
> Can someone think of a better way for cover the gaps left by these
> sphere_sweep (cubic_spline) curves with bicubic_patch?.
> ...
> ...
> If it is mathematically impossible to make a perfect circle based on
> patches, I suppose that the task of adjusting them smoothly to this form
> can not be carried out either.
>
> Any help or idea to the respective one is welcome, thank you very much

If you add more patches, your cross sections can get very close to circles.

In the two 'Bezier_Patches_Stitched' images here:

- I have tried to show how one can construct the control grid so that the
patches are joined smoothly. All the 8 control points surrounding each corner of
the patches are placed in the same plane.

The 'Bezier_Patches_Torus' image shows a torus that is made with individually
colored bicubic Bezier patches. I made some macros that stitches together the
patches automatically. (The macro takes an array with the positions of the white
spheres as an argument.)

I finally found the source code for these images (that I made back in 2003), so
I've now made some more images where I've tried to illustrate this better.

I'll post them here.

--
Tor Olav
http://subcube.com
```

Attachments:

Preview of image 'bicubicbezierpatches.png'

 From: Tor Olav Kristensen Subject: Re: Smoothing bicubic_patchs. A pain. Date: 15 Aug 2018 03:00:00 Message:
```"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> BGimeno <bru### [at] gmailcom> wrote:
> > Can someone think of a better way for cover the gaps left by these
> > sphere_sweep (cubic_spline) curves with bicubic_patch?.
> > ...
> > ...
> I've now made some more images where I've tried to illustrate this better.
>
> I'll post them here.

--
Tor Olav
http://subcube.com
```

Attachments:

Preview of image 'bicubicbezierpatches_manualgrid.png'

 From: Tor Olav Kristensen Subject: Re: Smoothing bicubic_patchs. A pain. Date: 15 Aug 2018 03:05:01 Message:
```"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> > BGimeno <bru### [at] gmailcom> wrote:
> > > Can someone think of a better way for cover the gaps left by these
> > > sphere_sweep (cubic_spline) curves with bicubic_patch?.
> > > ...
> > > ...
> > I've now made some more images where I've tried to illustrate this better.
> >
> > I'll post them here.

--
Tor Olav
http://subcube.com
```

Attachments:

Preview of image 'bicubicbezierpatches_controlgrids.png'

 From: Tor Olav Kristensen Subject: Re: Smoothing bicubic_patchs. A pain. Date: 15 Aug 2018 03:10:00 Message:
```"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> > BGimeno <bru### [at] gmailcom> wrote:
> > > Can someone think of a better way for cover the gaps left by these
> > > sphere_sweep (cubic_spline) curves with bicubic_patch?.
> > > ...
> > > ...
> > I've now made some more images where I've tried to illustrate this better.
> >
> > I'll post them here.

The points in the blue sphere sweeps in this image follows cubic Bezier splines
made with the control points that lies along the edges of the bicubic Bezier
patches.

--
Tor Olav
http://subcube.com
```

Attachments:

Preview of image 'bicubicbezierpatches_spheresweeps.png'

 From: Tor Olav Kristensen Subject: Re: Smoothing bicubic_patchs. A pain. Date: 15 Aug 2018 03:10:02 Message:
```"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> > BGimeno <bru### [at] gmailcom> wrote:
> > > Can someone think of a better way for cover the gaps left by these
> > > sphere_sweep (cubic_spline) curves with bicubic_patch?.
> > > ...
> > > ...
> > I've now made some more images where I've tried to illustrate this better.
> >
> > I'll post them here.

--
Tor Olav
http://subcube.com
```

Attachments: