POV-Ray : Newsgroups : povray.binaries.images : challenge: surface connecting cubic_splines Server Time
27 Dec 2024 00:05:29 EST (-0500)
  challenge: surface connecting cubic_splines (Message 1 to 10 of 17)  
Goto Latest 10 Messages Next 7 Messages >>>
From: Le Forgeron
Subject: challenge: surface connecting cubic_splines
Date: 9 Aug 2018 11:22:07
Message: <5b6c5c1f@news.povray.org>
If I got the problem exposed in "Smoothing bicubic_patchs, A pain":
* you have four non-coplanar points, each pair of the external 4 sided
figure connected by cubic splines (each pair is adjacent on its spline,
no intermediate point on the spline)


Challenge: have a nice surface which joins each splines.


For start, an illustration of a possible setting.


Post a reply to this message


Attachments:
Download 'hull.ini.txt' (1 KB) Download 'hull.pov.txt' (2 KB) Download 'hull0.png' (268 KB) Download 'hull1.png' (178 KB) Download 'hull2.png' (89 KB) Download 'hull3.png' (83 KB)

Preview of image 'hull0.png'
hull0.png

Preview of image 'hull1.png'
hull1.png

Preview of image 'hull2.png'
hull2.png

Preview of image 'hull3.png'
hull3.png


 

From: Bald Eagle
Subject: Re: challenge: surface connecting cubic_splines
Date: 9 Aug 2018 12:00:01
Message: <web.5b6c64ede21a6a89c437ac910@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> If I got the problem exposed in "Smoothing bicubic_patchs, A pain":
> * you have four non-coplanar points, each pair of the external 4 sided
> figure connected by cubic splines (each pair is adjacent on its spline,
> no intermediate point on the spline)
>
>
> Challenge: have a nice surface which joins each splines.
>
>
> For start, an illustration of a possible setting.

Yes, and now if you iteratively made that smaller, you'd approach the true
surface.  I think with smooth_triangles it would look fairly decent.

How you subdivide such rectangles is the challenge, because you have to
interpolate along the splines.


Post a reply to this message

From: BGimeno
Subject: Re: challenge: surface connecting cubic_splines
Date: 9 Aug 2018 13:30:55
Message: <5b6c7a4f$1@news.povray.org>

> Le_Forgeron <jgr### [at] freefr> wrote:
>> If I got the problem exposed in "Smoothing bicubic_patchs, A pain":
>> * you have four non-coplanar points, each pair of the external 4 sided
>> figure connected by cubic splines (each pair is adjacent on its spline,
>> no intermediate point on the spline)
>>
>>
>> Challenge: have a nice surface which joins each splines.
>>
>>
>> For start, an illustration of a possible setting.
> 
> Yes, and now if you iteratively made that smaller, you'd approach the true
> surface.  I think with smooth_triangles it would look fairly decent.
> 
> How you subdivide such rectangles is the challenge, because you have to
> interpolate along the splines.
> 

http://hof.povray.org/btfh02.html

This is an image that someone made with the first version of my macro 
years ago. Unfortunately, real life has kept me away from this project 
and I did not continue with it, I have left the project abandoned for 
quite some time. In that image smooth_triangle is used and the mesh is 
made from cylinders and spheres. I'm going to try to subdivide the mesh 
and see how it looks. I'm rewriting from scratch and there's still a 
long way to go to implement tessellations like that. Patience.

Bruno Gimeno


Post a reply to this message

From: Bald Eagle
Subject: Re: challenge: surface connecting cubic_splines
Date: 10 Aug 2018 08:50:00
Message: <web.5b6d8912e21a6a89c437ac910@news.povray.org>
I see the link to the original macro does not work, and I haven't seen a copy of
the original posted here in the forums.
Could you post the original so I could have a look, and learn something?

I'm hoping once it cools off a bit, I'll have some time and attention to do some
more coding, and this seems to fit  in nicely with several projects I'd like to
pursue.

Thanks   :)


Post a reply to this message

From: JimT
Subject: Re: challenge: surface connecting cubic_splines
Date: 10 Aug 2018 09:20:01
Message: <web.5b6d90e5e21a6a8947a7a0720@news.povray.org>
BGimeno <bru### [at] gmailcom> wrote:

> > Le_Forgeron <jgr### [at] freefr> wrote:
> >> If I got the problem exposed in "Smoothing bicubic_patchs, A pain":
> >> * you have four non-coplanar points, each pair of the external 4 sided
> >> figure connected by cubic splines (each pair is adjacent on its spline,
> >> no intermediate point on the spline)
> >>
> >>
> >> Challenge: have a nice surface which joins each splines.
> >>
> >>
> >> For start, an illustration of a possible setting.
> >
> > Yes, and now if you iteratively made that smaller, you'd approach the true
> > surface.  I think with smooth_triangles it would look fairly decent.
> >
> > How you subdivide such rectangles is the challenge, because you have to
> > interpolate along the splines.
> >
>
> http://hof.povray.org/btfh02.html
>
> This is an image that someone made with the first version of my macro
> years ago. Unfortunately, real life has kept me away from this project
> and I did not continue with it, I have left the project abandoned for
> quite some time. In that image smooth_triangle is used and the mesh is
> made from cylinders and spheres. I'm going to try to subdivide the mesh
> and see how it looks. I'm rewriting from scratch and there's still a
> long way to go to implement tessellations like that. Patience.
>
> Bruno Gimeno

I think what you are looking for, given a topologically rectangular array of
points, with coordinates that are in some way geometrically rectangular,
cylindrical or toroidal, is to generate a mesh2 of smooth triangles,
interpolating the points of the grid, with a high apparent level of continuity.
I doubt that an intermediate stage involving Bezier quadrilaterals is the way to
go.

I would think about using Hermite cubics to form the gridlines and Coons patches
with Hermite, rather than linear, interpolation for the surface, though for the
cylindrical and toroidal geometry, I think you would need to specify a curvature
at the joins. Most of the big commercial modellers seem to use NURBS for complex
surfaces so I'm not sure how widely such an idea has been implemented. You need
to solve a tridiagonal set of equations to generate the Hermite cubics,  but
that can be done with for loops.

This should produce e.g a generalised approximate torus using as few as 16
co-ordinates, plus another 8 numbers specifying curvature at the joins.

If you think the idea is interesting, I would do some work on it.

JimT


Post a reply to this message

From: Bald Eagle
Subject: Re: challenge: surface connecting cubic_splines
Date: 10 Aug 2018 10:20:00
Message: <web.5b6d9e3ee21a6a89c437ac910@news.povray.org>
"JimT" <nomail@nomail> wrote:

> I think what you are looking for, given a topologically rectangular array of
> points, with coordinates that are in some way geometrically rectangular,
> cylindrical or toroidal, is to generate a mesh2 of smooth triangles,
> interpolating the points of the grid, with a high apparent level of continuity.
> I doubt that an intermediate stage involving Bezier quadrilaterals is the way to
> go.

Perhaps not - I hadn't gotten far enough along with the 3x3 Bezier patch project
to know its exact set of pros and cons.
But the thought was that there would be definite points that the patch passed
through, and those could be used as part of the subdivision.


> I would think about using Hermite cubics to form the gridlines and Coons patches
> with Hermite, rather than linear, interpolation for the surface, though for the
> cylindrical and toroidal geometry, I think you would need to specify a curvature
> at the joins.

Yes, that sounds right.
https://en.wikipedia.org/wiki/Coons_patch

> Most of the big commercial modellers seem to use NURBS for complex
> surfaces so I'm not sure how widely such an idea has been implemented. You need
> to solve a tridiagonal set of equations to generate the Hermite cubics,  but
> that can be done with for loops.

Yes, I had worked out doing de Casteljau's algorithm in SDL, and it seemed to
work.

> This should produce e.g a generalised approximate torus using as few as 16
> co-ordinates, plus another 8 numbers specifying curvature at the joins.
>
> If you think the idea is interesting, I would do some work on it.
>
> JimT

It is - and perhaps you could offer me some insight as to what I got mucked up
in the Bezier patch project, since they seem so similar.

Thanks for your observations and advice   :)


Post a reply to this message

From: B  Gimeno
Subject: Re: challenge: surface connecting cubic_splines
Date: 11 Aug 2018 12:15:01
Message: <web.5b6f0a5fe21a6a898e45b0fa0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "JimT" <nomail@nomail> wrote:
>
> > I think what you are looking for, given a topologically rectangular array of
> > points, with coordinates that are in some way geometrically rectangular,
> > cylindrical or toroidal, is to generate a mesh2 of smooth triangles,
> > interpolating the points of the grid, with a high apparent level of continuity.
> > I doubt that an intermediate stage involving Bezier quadrilaterals is the way to
> > go.
>
> Perhaps not - I hadn't gotten far enough along with the 3x3 Bezier patch project
> to know its exact set of pros and cons.
> But the thought was that there would be definite points that the patch passed
> through, and those could be used as part of the subdivision.
>
>
> > I would think about using Hermite cubics to form the gridlines and Coons patches
> > with Hermite, rather than linear, interpolation for the surface, though for the
> > cylindrical and toroidal geometry, I think you would need to specify a curvature
> > at the joins.
>
> Yes, that sounds right.
> https://en.wikipedia.org/wiki/Coons_patch
>
> > Most of the big commercial modellers seem to use NURBS for complex
> > surfaces so I'm not sure how widely such an idea has been implemented. You need
> > to solve a tridiagonal set of equations to generate the Hermite cubics,  but
> > that can be done with for loops.
>
> Yes, I had worked out doing de Casteljau's algorithm in SDL, and it seemed to
> work.
>
> > This should produce e.g a generalised approximate torus using as few as 16
> > co-ordinates, plus another 8 numbers specifying curvature at the joins.
> >
> > If you think the idea is interesting, I would do some work on it.
> >
> > JimT
>
> It is - and perhaps you could offer me some insight as to what I got mucked up
> in the Bezier patch project, since they seem so similar.
>
> Thanks for your observations and advice   :)


Thank you both for the notes. You have shown me an unknown path for me. The
negative part is that a part of my macro will not be limited to the generation
of rectangular meshes. Tesellations of hexagonal, triangular symmetry and many
other motifs can be chosen, which with cylinders, spheres and triangles is
relatively easy to implement. An old version of my macro is right now in
p.b.text-files. It does not include sphere_sweep mode, but instead there are too
many parameters and many improvements to make in the textures section. I'll be
publishing updates periodically now that I've put myself into it. Thanks for the
comments and the help, at the moment I will leave this approach aside until
someone knows how to implement non-rectangular patches.


Bruno Gimeno


Post a reply to this message

From: Bald Eagle
Subject: Re: challenge: surface connecting cubic_splines
Date: 11 Aug 2018 13:20:05
Message: <web.5b6f19dae21a6a89458c7afe0@news.povray.org>
"B. Gimeno" <nomail@nomail> wrote:

> Thank you both for the notes. You have shown me an unknown path for me.

>The negative part is that a part of my macro will not be limited to the generation
> of rectangular meshes.

No worries - see below:

> Tesellations of hexagonal, triangular symmetry and many
> other motifs can be chosen, which with cylinders, spheres and triangles is
> relatively easy to implement.

I just took a bicubic_patch scene I had and  "squished" it into a triangle by
multiplying each row of 4 control points by 1, then 2/3, then 1/3, then 0.
That gives me a triangle-shaped bicubic patch.
That ought to work fine - but I'm thinking that the other control points might
need to be "weighted" to offset the squeezing effect of 4 coincident control
points in the first row, and the narrowing of the patch in rows 2 and 3.
But that's a smoothing issue - build it first, then smooth it.   :)


> An old version of my macro is right now in p.b.text-files.

Yes, I finally found that - thank you!  :)
It will be interesting to look through what you've done and learn a thing or two
myself.



.... now I'm thinking about making a circular bicubic patch....   :D


Post a reply to this message

From: Stephen
Subject: Re: challenge: surface connecting cubic_splines
Date: 11 Aug 2018 13:42:31
Message: <5b6f2007$1@news.povray.org>
On 11/08/2018 18:16, Bald Eagle wrote:
> .... now I'm thinking about making a circular bicubic patch....   :D


IIRC Moray could make circular (cylindrical) bicubic patches.
It might be worth downloading and having a look at.

-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: challenge: surface connecting cubic_splines
Date: 11 Aug 2018 15:45:00
Message: <web.5b6f3c14e21a6a89458c7afe0@news.povray.org>
Stephen <mca### [at] aolcom> wrote:
> On 11/08/2018 18:16, Bald Eagle wrote:
> > .... now I'm thinking about making a circular bicubic patch....   :D

> IIRC Moray could make circular (cylindrical) bicubic patches.
> It might be worth downloading and having a look at.

I was speaking of circular, as in disc / disk - shaped.

I think I have Moray on my other laptop - I used it to start modeling The Secret
Passage scene.  :)

But this is what I came up with - not a perfect circle, which is why I wanted to
pursue the 3x3 patch to have more exactly-specified corner points.  Trying to
reverse-interpolate where a point will be based on the control points....
bleh.


Post a reply to this message


Attachments:
Download 'bicubicdisc.png' (224 KB)

Preview of image 'bicubicdisc.png'
bicubicdisc.png


 

Goto Latest 10 Messages Next 7 Messages >>>

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