POV-Ray : Newsgroups : povray.binaries.images : Smoothing bicubic_patchs. A pain. Server Time
27 Apr 2024 05:24:42 EDT (-0400)
  Smoothing bicubic_patchs. A pain. (Message 28 to 37 of 37)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Tor Olav Kristensen
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 22 Aug 2018 17:00:01
Message: <web.5b7dcc5d9b869b6138c8b7240@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
>...
> Given that a Bezier patch can be interpreted as a Bezier spline in one dimension
> whose control points slide along Bezier splines oriented in the other dimension,
> and that this can be expressed as a parametiric equation, then
>
> It ought to be possible to define a parametric {} object in POV-Ray based on a
> set of control points and the basis functions of the Bezier splines.
>
> Then, given a point <m, n> (or <u, v>) on the surface, one could place things ON
> the surface of the patch.
>
> This should also allow the generation of _any_ spline between the ordinate /
> cardinal splines defined by the corners.  In theory one should be able to
> simulate a patch by juxtaposing a series of splines from one side to the other
> in either dimension.

If you calculate the two partial derivatives (d/dU and d/dV) for each of the
bivariate functions for a Bezier patch you can use these to reorient objects to
align with the U-, V- and normal directions of the surface.

This article contains some useful information about that:

https://www.scratchapixel.com/lessons/advanced-rendering/bezier-curve-rendering-utah-teapot/bezier-patch-normal

The attached image shows cubes that are reoriented to align with the directions
I mentioned above. It also shows a lot of splines that creates a grid on the
surface of the patch.


>...

--
Tor Olav
http://subcube.com


Post a reply to this message


Attachments:
Download 'cubes on the surface of a bicubic bezier patch.jpg' (432 KB)

Preview of image 'cubes on the surface of a bicubic bezier patch.jpg'
cubes on the surface of a bicubic bezier patch.jpg


 

From: Tor Olav Kristensen
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 22 Aug 2018 17:15:00
Message: <web.5b7dd1369b869b6138c8b7240@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> >...
>...
> If you calculate the two partial derivatives (d/dU and d/dV) for each of the
> bivariate functions for a Bezier patch you can use these to reorient objects to
> align with the U-, V- and normal directions of the surface.
>
> This article contains some useful information about that:
>
>
https://www.scratchapixel.com/lessons/advanced-rendering/bezier-curve-rendering-utah-teapot/bezier-patch-normal
>
> The attached image shows cubes that are reoriented to align with the directions
> I mentioned above. It also shows a lot of splines that creates a grid on the
> surface of the patch.


Here's another image where the cubes have been scaled in the U/V-directions by
the lengths of the vectors used for reorienting them. (These vectors were
created with the partial derivatives of the bivariate functions for the Bezier
patch.)

--
Tor Olav
http://subcube.com


Post a reply to this message


Attachments:
Download 'scaled_cubes_on_the_surface_of_a_bicubic_bezier_patch.jpg' (426 KB)

Preview of image 'scaled_cubes_on_the_surface_of_a_bicubic_bezier_patch.jpg'
scaled_cubes_on_the_surface_of_a_bicubic_bezier_patch.jpg


 

From: Tor Olav Kristensen
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 22 Aug 2018 17:30:00
Message: <web.5b7dd4f29b869b6138c8b7240@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
>...
> The attached image shows cubes that are reoriented to align with the directions
> I mentioned above. It also shows a lot of splines that creates a grid on the
> surface of the patch.

I don't know why the preview of that image is not shown properly. (Perhaps the
height/width-dimensions are too big ?). Here's a try with smaller dimensions.

--
Tor Olav
http://subcube.com


Post a reply to this message


Attachments:
Download 'cubes_on_the_surface_of_a_bicubic_bezier_patch.jpg' (172 KB)

Preview of image 'cubes_on_the_surface_of_a_bicubic_bezier_patch.jpg'
cubes_on_the_surface_of_a_bicubic_bezier_patch.jpg


 

From: Tor Olav Kristensen
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 22 Aug 2018 17:35:01
Message: <web.5b7dd65c9b869b6138c8b7240@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
>...
> Here's another image where the cubes have been scaled in the U/V-directions by
> the lengths of the vectors used for reorienting them. (These vectors were
> created with the partial derivatives of the bivariate functions for the Bezier
> patch.)

Here's the same image with smaller dimensions.

--
Tor Olav
http://subcube.com


Post a reply to this message


Attachments:
Download 'scaled_cubes_on_the_surface_of_a_bicubic_bezier_patch.jpg' (165 KB)

Preview of image 'scaled_cubes_on_the_surface_of_a_bicubic_bezier_patch.jpg'
scaled_cubes_on_the_surface_of_a_bicubic_bezier_patch.jpg


 

From: Bald Eagle
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 22 Aug 2018 19:00:01
Message: <web.5b7deabb9b869b61458c7afe0@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:

> Yes, that is possible. Just create 3 bivariate functions with the appropriate
> Bernstein polynomials and feed them to the parametric object. But you need
> patience for that...

Pffft.    Then forget it.  None of us Povvers have any patience for that kind of
thing..
We want the instant gratification of hand-coding 1776 lines of SDL that hands us
that first frame of a 3600-frame animation by the very next day!


> > Then, given a point <m, n> (or <u, v>) on the surface, one could place things ON
> > the surface of the patch.
>
> Yes, this image shows some white spheres and cylinders following a path in the
> UV-space on the surface of a NURBS-patch:
>
> http://dataduppedings.no/subcube/POV-Ray_Images/NURBS_Grid.jpg

Right - I've admired that one also.
I haven't yet gotten to coding any NURBS objects - but I'm sure it's an
inevitability   ;)

> See also the attached image where the I've put some sphere sweeps on a Bezier
> patch. (Notice that you can read out the radii for the sphere swept curves
> (0.06, 0.46 and 0.48) in the UV-mapped texture.)

Yes - that's a neat trick.  I can already see the 2 rotating sets of rolling
spheres in a bowl-shaped Bezier patch, oscillating in simple harmonic motion.


Very nice images as always - you surely have some great macros worked out in
order to be able to make all these "custom" renders in short order.


Post a reply to this message

From: Bald Eagle
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 22 Aug 2018 19:05:00
Message: <web.5b7debbd9b869b61458c7afe0@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:

> If you calculate the two partial derivatives (d/dU and d/dV) for each of the
> bivariate functions for a Bezier patch you can use these to reorient objects to
> align with the U-, V- and normal directions of the surface.

One more thing to ponder the full import of.
Just keep raising the bar.   :P

> This article contains some useful information about that:
>
>
https://www.scratchapixel.com/lessons/advanced-rendering/bezier-curve-rendering-utah-teapot/bezier-patch-normal

I do believe I've seen that one, but haven't had the time to fullly dissect and
digest it.

> The attached image shows cubes that are reoriented to align with the directions
> I mentioned above. It also shows a lot of splines that creates a grid on the
> surface of the patch.

Well, assuming the patch is bounded by a unit sphere, then those are ---
subcubes.

:D

I have a vague notion that some of this might be accomplished via matrix
transforms.   But that's only a tenuous supposition at this point.



....
Care to make a MEDIA Bezier patch?  :)


Post a reply to this message

From: Le Forgeron
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 23 Aug 2018 13:15:57
Message: <5b7eebcd$1@news.povray.org>
Le 23/08/2018 à 00:59, Bald Eagle a écrit :
> Right - I've admired that one also.
> I haven't yet gotten to coding any NURBS objects - but I'm sure it's an
> inevitability   ;)

If you can find a modeller from which you can export the two
knot-vectors and the grid of of weighted control points, I would be very
interested.


Post a reply to this message

From: Bald Eagle
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 30 Aug 2020 10:55:00
Message: <web.5f4bbce39b869b611f9dae300@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

> Last night, I dreamed about Klein Bottles. That would be a hellish job
> to model I guess. ;-)

Perhaps, but of course, someone has done it.   :)
http://t-kita.net/gnuplot_povrml/

I remembered this and figured I'd post you a link to the scene code.

http://t-kita.net/gnuplot_povrml/povray-demo/povray-demo3.pov


Post a reply to this message

From: Thomas de Groot
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 31 Aug 2020 02:26:40
Message: <5f4c9820$1@news.povray.org>
Op 30/08/2020 om 16:51 schreef Bald Eagle:
> Thomas de Groot <tho### [at] degrootorg> wrote:
> 
>> Last night, I dreamed about Klein Bottles. That would be a hellish job
>> to model I guess. ;-)
> 
> Perhaps, but of course, someone has done it.   :)
> http://t-kita.net/gnuplot_povrml/
> 
> I remembered this and figured I'd post you a link to the scene code.
> 
> http://t-kita.net/gnuplot_povrml/povray-demo/povray-demo3.pov
> 

/Of course/ somebody did just that! Very nice; thanks for the links.

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Smoothing bicubic_patchs. A pain.
Date: 1 Sep 2020 02:35:33
Message: <5f4debb5@news.povray.org>
Op 31/08/2020 om 08:26 schreef Thomas de Groot:
> Op 30/08/2020 om 16:51 schreef Bald Eagle:
>> Thomas de Groot <tho### [at] degrootorg> wrote:
>>
>>> Last night, I dreamed about Klein Bottles. That would be a hellish job
>>> to model I guess. ;-)
>>

>> http://t-kita.net/gnuplot_povrml/
>>
>> I remembered this and figured I'd post you a link to the scene code.
>>
>> http://t-kita.net/gnuplot_povrml/povray-demo/povray-demo3.pov
>>
> 
> /Of course/ somebody did just that! Very nice; thanks for the links.
> 

Which got me thinking that, while the modelling of the Klein bottle 
might be simple, the orientation of the face normals is not. My best 
guess would be to switch those round at the point where the bottle 
intersects itself. Modelling software (like Silo) don't like that. :-)

-- 
Thomas


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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