POV-Ray : Newsgroups : povray.general : Spline question Server Time
8 Aug 2024 16:14:29 EDT (-0400)
  Spline question (Message 1 to 9 of 9)  
From: Rune
Subject: Spline question
Date: 3 Dec 2000 11:36:10
Message: <3a2a767a@news.povray.org>
I use a cubic spline, and I want a curve something like this:
(ASCII art, use monospace font)

                        o
                      _-
                   __-
o-------o-------o--

But instead I get something like this:

                        o
                      _-
                  __--
o-------o----___o-

The curve goes a bit down before it goes up, and I don't want that.
I know *why* this happens, but I don't know how to avoid it.
Using a different spline type is not an option.

Maybe a can insert an extra control point or two, but where is it most
effective to put it?
Any "tricks"?

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated October 9)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Warp
Subject: Re: Spline question
Date: 3 Dec 2000 12:03:21
Message: <3a2a7cd9@news.povray.org>
Rune <run### [at] inamecom> wrote:
:                         o
:                       _-
:                   __--
: o-------o----___o-

: The curve goes a bit down before it goes up, and I don't want that.
: I know *why* this happens, but I don't know how to avoid it.

  Raise the third point a bit.

  It's just a property of the spline. It's not working "wrong" or anything,
it just works like that.
  As said, raising the third point a bit should help.
  Now, it's an interesting question, how much should it be raise to get a
perfect solution.
  (Btw, you'll probably need to raise the second point a bit as well if
you don't want the curve to go down anywhere.)

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Christoph Hormann
Subject: Re: Spline question
Date: 3 Dec 2000 12:05:48
Message: <3A2A7D6A.D2C02B28@gmx.de>
Rune wrote:
> 
> 
>                         o
>                       _-
>                   __--
> o-------o----___o-  <=======
> 

I'm not very experienced with splines, but putting one or several extra
points where the arrow points could help.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Jan Walzer
Subject: Re: Spline question
Date: 3 Dec 2000 14:19:20
Message: <3a2a9cb8@news.povray.org>
Christoph Hormann <chr### [at] gmxde> schrieb in im
Newsbeitrag: 3A2A7D6A.D2C02B28@gmx.de...
>
>
> Rune wrote:
> >
> >
> >                         o
> >                       _-
> >                   __--
> > o-------o----___o-  <=======
> >
>
> I'm not very experienced with splines, but putting one or
several extra
> points where the arrow points could help.
>


I think this would make it even more difficult ...
it would go with the same amount down, but it would be thinner in
the horizontal direction...
For me it is a rule, that the closer the controlpoints of a
spline are, the harder it is to control...

it would help a bit, to raise the third point (as Warp already
said) and maybe the second a bit ...

If it is a cubic spline, than you would need AFAIK three
controlpoints to come from a round part of the spline to a
straight line ...

If you want it faster, that you should try to use beziers ...


--

 ,',    Jan Walzer      \V/  http://wa.lzer.net     ,',
',','   student of      >|<  mailto:jan### [at] lzernet ',','
  '   ComputerScience   /A\  +49-177-7403863         '


Post a reply to this message

From: Rune
Subject: Re: Spline question
Date: 3 Dec 2000 15:05:19
Message: <3a2aa77f@news.povray.org>
"Warp" wrote:
>   It's just a property of the spline. It's not working "wrong"
> or anything, it just works like that.

Yes, I know.

>   As said, raising the third point a bit should help.

Thanks, I'll try it out.

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated October 9)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Matt Giwer
Subject: Re: Spline question
Date: 4 Dec 2000 16:39:49
Message: <3A2C0F24.ACB368E2@ij.net>
Rune wrote:
> 
> I use a cubic spline, and I want a curve something like this:
> (ASCII art, use monospace font)
> 
>                         o
>                       _-
>                    __-
> o-------o-------o--
> 
> But instead I get something like this:
> 
>                         o
>                       _-
>                   __--
> o-------o----___o-
> 
> The curve goes a bit down before it goes up, and I don't want that.
> I know *why* this happens, but I don't know how to avoid it.
> Using a different spline type is not an option.
> 
> Maybe a can insert an extra control point or two, but where is it most
> effective to put it?
> Any "tricks"?

	That is the way it is supposed to work. It has to go down to smooth 2,
3 and 4. You should see the line between 1 and 2 going up a little. 

	Move your third point from the left control point further along the
curve.

-- 
Any law passed for political reasons is the creation
of a political crime.
	-- The Iron Webmaster, 21


Post a reply to this message

From: Paul Jones
Subject: Re: Spline question
Date: 5 Dec 2000 08:26:00
Message: <3A2CEBDD.95AD77AA@psu.edu>
Rune,  I find that using one of the nifty spline editors listed on the
POV links page is a good way to generate splines and export the points
to pov for further tweaking....


I like this one:

http://www.flashnet.it/users/fn027571/spil/main.html

-paul

Rune wrote:
> 
> I use a cubic spline, and I want a curve something like this:
> (ASCII art, use monospace font)
> 
>                         o
>                       _-
>                    __-
> o-------o-------o--
> 
> But instead I get something like this:
> 
>                         o
>                       _-
>                   __--
> o-------o----___o-
> 
> The curve goes a bit down before it goes up, and I don't want that.
> I know *why* this happens, but I don't know how to avoid it.
> Using a different spline type is not an option.
> 
> Maybe a can insert an extra control point or two, but where is it most
> effective to put it?
> Any "tricks"?
> 
> Rune
> --
> \ Include files, tutorials, 3D images, raytracing jokes,
> / The POV Desktop Theme, and The POV-Ray Logo Contest can
> \ all be found at http://rsj.mobilixnet.dk (updated October 9)
> / Also visit http://www.povrayusers.org

-- 



--------------------------------------------------}
Paul Daniel Jones
The Pennslyvania State University

pdj### [at] psuedu
http://research.chem.psu.edu/glassgrp/paul

       C            The way is near, but men
     // \           seek it afar. It is in the
    N    N          easy things, but men seek it
    |    ||         in the difficult things.
    C    C          -Menicius
     \\  /
       C
--------------------------------------------------}


Post a reply to this message

From: Rune
Subject: Re: Spline question
Date: 7 Dec 2000 13:36:57
Message: <3a2fd8c9@news.povray.org>
"Matt Giwer" wrote:
> That is the way it is supposed to work.

Yes, I know :)

> Move your third point from the left control point further
> along the curve.

Thanks, I'll try it out.

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated October 9)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Rune
Subject: Re: Spline question
Date: 7 Dec 2000 13:36:58
Message: <3a2fd8ca@news.povray.org>
"Paul Jones" wrote:
> Rune,  I find that using one of the nifty spline editors
> listed on the POV links page is a good way to generate
> splines and export the points to pov for further tweaking....
>
> I like this one:
>
> http://www.flashnet.it/users/fn027571/spil/main.html

Thanks for the link, it looks like a very handy program, though not for this
particular problem.

My spline is a 3D spline plus time as the 4th dimension, so the program
won't be able to handle it.

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated October 9)
/ Also visit http://www.povrayusers.org


Post a reply to this message

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