POV-Ray : Newsgroups : povray.binaries.images : Basket-weaving (fun with spline objects) Server Time
13 Jul 2025 08:27:47 EDT (-0400)
  Basket-weaving (fun with spline objects) (Message 31 to 36 of 36)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: John M  Dlugosz
Subject: Re: Basket-weaving (fun with spline objects)
Date: 16 Jan 2001 22:58:33
Message: <3a651869@news.povray.org>
Chris, you sure make it look easy!

> Each torii segment starts with the tangent that the previous segment ended
> with, so the results certainly should be smooth.  This continuation of
> tangents, however, can cause some rippling, like a sine wave along the
> spline.

I still don't understand what causes this.  Look at this low-count version
(attached).  I jumped to the conclusion that the ripples are caused by
having too few torus segments, and each ripple is one such segment.  But,
they are regularly spaced, not bunched in the curved part.  So that's not
it, is it?

When reading your tutorial, I had also assumed that the purpose of using the
torii was as a curve-fit for one segment, but now I don't understand how
that can be, since a torus only has one curve everywhere (making it
ellipitical, as I had been thinking, would distort the cross-section of the
pipe, too).

--John


Post a reply to this message


Attachments:
Download 'test3.jpg' (25 KB)

Preview of image 'test3.jpg'
test3.jpg


 

From: David Fontaine
Subject: Re: Basket-weaving (fun with spline objects)
Date: 17 Jan 2001 00:08:51
Message: <3A6527A9.E755B450@faricy.net>
Chris Colefax wrote:

> Each torii segment starts with the tangent that the previous segment ended
> with, so the results certainly should be smooth.

Just to nitpick: though not the same effect as the ripples we saw, this would
have the same problem as the "roundbox" and related shapes where it looks like
there is an irregularity in the surface. Essentially there is, because there's a
discontinuity in the curvature of the surface, it's most noticeable when a
highlight falls on the discontinuous area. But to make a truly smooth surface
would be needlessly complicated and probably slow to render.

--
David Fontaine  <dav### [at] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

From: Chris Colefax
Subject: Re: Basket-weaving (fun with spline objects)
Date: 17 Jan 2001 18:40:13
Message: <3a662d5d@news.povray.org>
John M. Dlugosz <joh### [at] dlugoszcom> wrote:
> Chris, you sure make it look easy!
>
> I still don't understand what causes this.  Look at this low-count version
> (attached).  I jumped to the conclusion that the ripples are caused by
> having too few torus segments, and each ripple is one such segment.  But,
> they are regularly spaced, not bunched in the curved part.  So that's not
> it, is it?
>
> When reading your tutorial, I had also assumed that the purpose of using
the
> torii was as a curve-fit for one segment, but now I don't understand how
> that can be, since a torus only has one curve everywhere (making it
> ellipitical, as I had been thinking, would distort the cross-section of
the
> pipe, too).

No, the torus pipe macro does not attempt to do any curve fitting.  Instead,
it simply joins each pair of adjacent spline points with a circular arc,
maintaining the continuity of curvature from one arc to the next (regardless
of the spline's curvature).  For the very first arc, we need a tangent, a
starting direction.  By default, the initial tangent of the spline is used,
and with a suitable spline steps value this can create reasonably accurate,
fast rendering, completely smooth splines (example #1 in the attached
image).

The next two examples use the same number of spline steps, but with
different initial torus tangent options.  Depending on how this is specified
and the number of spline steps, rippling can occur as in the middle example.
This rippling is precisely the effect I used in the previous renderings in
this thread, and this is why I wrote the torus pipe spline macro to behave
as it does.

If you want to use the torus pipe spline macro to smoothly follow a spline,
I'd suggest starting with a spline steps value equal to the number of spline
segments, and increasing it from there in multiples of the number of
segments.  Otherwise, I'd again suggest blob splines (see the squid recently
posted under "More fun with spline objects") as an alternative.


Post a reply to this message


Attachments:
Download 'torus_spline_examples.jpg' (16 KB)

Preview of image 'torus_spline_examples.jpg'
torus_spline_examples.jpg


 

From: David Fontaine
Subject: Re: Basket-weaving (fun with spline objects)
Date: 17 Jan 2001 19:00:44
Message: <3A6630EF.2B594A83@faricy.net>
"John M. Dlugosz" wrote:

> When reading your tutorial, I had also assumed that the purpose of using the
> torii was as a curve-fit for one segment, but now I don't understand how
> that can be, since a torus only has one curve everywhere (making it
> ellipitical, as I had been thinking, would distort the cross-section of the
> pipe, too).

Precisely, two points and a tangent on one of them defines a circle, and the one
tangent comes from the previous segment. So curve-fitting would be impossible
with torical arcs.

--
David Fontaine  <dav### [at] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

From: John M  Dlugosz
Subject: Re: Basket-weaving (fun with spline objects)
Date: 17 Jan 2001 22:38:26
Message: <3a666532$1@news.povray.org>
And a realistic texture will add as much imperfection, anyway.

"David Fontaine" <dav### [at] faricynet> wrote in message
news:3A6527A9.E755B450@faricy.net...
> Chris Colefax wrote:
>
> > Each torii segment starts with the tangent that the previous segment
ended
> > with, so the results certainly should be smooth.
>
> Just to nitpick: though not the same effect as the ripples we saw, this
would
> have the same problem as the "roundbox" and related shapes where it looks
like
> there is an irregularity in the surface. Essentially there is, because
there's a
> discontinuity in the curvature of the surface, it's most noticeable when a
> highlight falls on the discontinuous area. But to make a truly smooth
surface
> would be needlessly complicated and probably slow to render.
>
> --
> David Fontaine  <dav### [at] faricynet>  ICQ 55354965
> My raytracing gallery:  http://davidf.faricy.net/
>
>


Post a reply to this message

From: John M  Dlugosz
Subject: Re: Basket-weaving (fun with spline objects)
Date: 18 Jan 2001 00:56:23
Message: <3a668587$1@news.povray.org>
I see the algorithm now.  A torus is not really a good curve-fit for a
straight-ish curve, but cylinders would not work since they don't bend at
all.  If you want undilations, like when you specify the starting tangent,
the effect is intentional and beautiful, and the spline just specifies the
positions of the links, not the overall shape.

I suppose a shape that is to a parabola as a torus is to a circle would be
good for curve fitting, making a smooth curve with very few segments.

"Chris Colefax" <chr### [at] tagpovrayorg> wrote in message
news:3a662d5d@news.povray.org...
> John M. Dlugosz <joh### [at] dlugoszcom> wrote:
> > Chris, you sure make it look easy!
> >
> > I still don't understand what causes this.  Look at this low-count
version
> > (attached).  I jumped to the conclusion that the ripples are caused by
> > having too few torus segments, and each ripple is one such segment.
But,
> > they are regularly spaced, not bunched in the curved part.  So that's
not
> > it, is it?
> >
> > When reading your tutorial, I had also assumed that the purpose of using
> the
> > torii was as a curve-fit for one segment, but now I don't understand how
> > that can be, since a torus only has one curve everywhere (making it
> > ellipitical, as I had been thinking, would distort the cross-section of
> the
> > pipe, too).
>
> No, the torus pipe macro does not attempt to do any curve fitting.
Instead,
> it simply joins each pair of adjacent spline points with a circular arc,
> maintaining the continuity of curvature from one arc to the next
(regardless
> of the spline's curvature).  For the very first arc, we need a tangent, a
> starting direction.  By default, the initial tangent of the spline is
used,
> and with a suitable spline steps value this can create reasonably
accurate,
> fast rendering, completely smooth splines (example #1 in the attached
> image).
>
> The next two examples use the same number of spline steps, but with
> different initial torus tangent options.  Depending on how this is
specified
> and the number of spline steps, rippling can occur as in the middle
example.
> This rippling is precisely the effect I used in the previous renderings in
> this thread, and this is why I wrote the torus pipe spline macro to behave
> as it does.
>
> If you want to use the torus pipe spline macro to smoothly follow a
spline,
> I'd suggest starting with a spline steps value equal to the number of
spline
> segments, and increasing it from there in multiples of the number of
> segments.  Otherwise, I'd again suggest blob splines (see the squid
recently
> posted under "More fun with spline objects") as an alternative.
>
>
>


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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