POV-Ray : Newsgroups : povray.binaries.images : Smoothing bicubic_patchs. A pain. Server Time
6 Nov 2024 16:32:09 EST (-0500)
  Smoothing bicubic_patchs. A pain. (Message 1 to 10 of 37)  
Goto Latest 10 Messages Next 10 Messages >>>
From: BGimeno
Subject: Smoothing bicubic_patchs. A pain.
Date: 8 Aug 2018 12: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.
http://news.povray.org/povray.tools.general/thread/%3Cweb.54e9d43835fbd8f37a3e03fe0%40news.povray.org%3E/

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 
in advance.

Bruno Gimeno


Post a reply to this message


Attachments:
Download 'tbtsfh2.png' (165 KB)

Preview of image 'tbtsfh2.png'
tbtsfh2.png


 

From: Bald Eagle
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 8 Aug 2018 15:15:00
Message: <web.5b6b41289b869b61c437ac910@news.povray.org>
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.
>
http://news.povray.org/povray.tools.general/thread/%3Cweb.54e9d43835fbd8f37a3e03fe0%40news.povray.org%3E/
>
> 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
> in advance.
>
> 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.

http://news.povray.org/povray.binaries.animations/thread/%3Cweb.56d9fbdd155fef445e7df57c0%40news.povray.org%3E/?mtop=40
6768&moff=22

http://news.povray.org/povray.binaries.animations/thread/%3Cweb.56ded7545a67670a5e7df57c0%40news.povray.org%3E/

http://news.povray.org/povray.binaries.images/thread/%3Cweb.56d9fcdc4ecdf5285e7df57c0%40news.povray.org%3E/





Maybe we look at it with fresh eyes and get a good 3x3 patch that works.


Post a reply to this message

From: Le Forgeron
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 8 Aug 2018 16: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.
>
http://news.povray.org/povray.tools.general/thread/%3Cweb.54e9d43835fbd8f37a3e03fe0%40news.povray.org%3E/
> 
> 
> 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
> in advance.
> 
> 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
triangles of your mesh.


Post a reply to this message

From: Bald Eagle
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 8 Aug 2018 18:15:01
Message: <web.5b6b6b4e9b869b61458c7afe0@news.povray.org>
BGimeno <bru### [at] gmailcom> wrote:

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

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.


Post a reply to this message

From: Bald Eagle
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 9 Aug 2018 12:30:00
Message: <web.5b6c6bb39b869b61c437ac910@news.povray.org>
Here's the thread I was trying to find and link to:

http://news.povray.org/povray.binaries.scene-files/thread/%3Cweb.56e1ce6a2f1b67735e7df57c0%40news.povray.org%3E/


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 14 Aug 2018 22:55:01
Message: <web.5b7391dd9b869b61264be49d0@news.povray.org>
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
> in advance.

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

In the two 'Bezier_Patches_Stitched' images here:

http://dataduppedings.no/subcube/POV-Ray_Images/

- 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


Post a reply to this message


Attachments:
Download 'bicubicbezierpatches.png' (397 KB)

Preview of image 'bicubicbezierpatches.png'
bicubicbezierpatches.png


 

From: Tor Olav Kristensen
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 14 Aug 2018 23:00:00
Message: <web.5b7396ff9b869b61264be49d0@news.povray.org>
"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


Post a reply to this message


Attachments:
Download 'bicubicbezierpatches_manualgrid.png' (512 KB)

Preview of image 'bicubicbezierpatches_manualgrid.png'
bicubicbezierpatches_manualgrid.png


 

From: Tor Olav Kristensen
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 14 Aug 2018 23:05:01
Message: <web.5b7397b39b869b61264be49d0@news.povray.org>
"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


Post a reply to this message


Attachments:
Download 'bicubicbezierpatches_controlgrids.png' (730 KB)

Preview of image 'bicubicbezierpatches_controlgrids.png'
bicubicbezierpatches_controlgrids.png


 

From: Tor Olav Kristensen
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 14 Aug 2018 23:10:00
Message: <web.5b7398619b869b61264be49d0@news.povray.org>
"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


Post a reply to this message


Attachments:
Download 'bicubicbezierpatches_spheresweeps.png' (480 KB)

Preview of image 'bicubicbezierpatches_spheresweeps.png'
bicubicbezierpatches_spheresweeps.png


 

From: Tor Olav Kristensen
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 14 Aug 2018 23:10:02
Message: <web.5b7398e09b869b61264be49d0@news.povray.org>
"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


Post a reply to this message


Attachments:
Download 'bicubicbezierpatches_controlgridsandspheresweeps.png' (757 KB)

Preview of image 'bicubicbezierpatches_controlgridsandspheresweeps.png'
bicubicbezierpatches_controlgridsandspheresweeps.png


 

Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.