POV-Ray : Newsgroups : povray.advanced-users : Lathe and sor splines question Server Time
26 Nov 2024 13:30:07 EST (-0500)
  Lathe and sor splines question (Message 1 to 10 of 18)  
Goto Latest 10 Messages Next 8 Messages >>>
From: Nieminen Juha
Subject: Lathe and sor splines question
Date: 12 Mar 2000 08:00:15
Message: <38cb94de@news.povray.org>
The lathe object can use linear, quadratic, cubic and bezier splines. The
SOR object uses some unnamed spline type.
  I have some questions.

  Suppose that I want to draw (just in a plain 2D graphic window) a qudratic,
cubic or bezier spline given the control points.
  Can someone tell me the algorithm used to calculate the curve for each type
of spline? Preferably I would like to get all the points that will form a
contiguous curve in the drawing bitmap (no gaps and no points drawn in the
same place) given the resolution of the drawing window, but also a less
perfect solution is ok.

  Also I would like an algorithm to draw the spline curve used by the SOR
object, given the control points.

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


Post a reply to this message

From: Francois Labreque
Subject: Re: Lathe and sor splines question
Date: 12 Mar 2000 10:09:55
Message: <38CBB247.36287DC@attglobal.net>
These algorithms are rather involved,  you should check your library for
books on the subject.

In the one I have (CAD/CAM theory & practice, MCGraw-Hill 1991), the
mathematical explanation of splines and Bezier curves takes about 20
pages.  A bit too long for this ng.

Nieminen Juha wrote:
> 
>   The lathe object can use linear, quadratic, cubic and bezier splines. The
> SOR object uses some unnamed spline type.
>   I have some questions.
> 
>   Suppose that I want to draw (just in a plain 2D graphic window) a qudratic,
> cubic or bezier spline given the control points.
>   Can someone tell me the algorithm used to calculate the curve for each type
> of spline? Preferably I would like to get all the points that will form a
> contiguous curve in the drawing bitmap (no gaps and no points drawn in the
> same place) given the resolution of the drawing window, but also a less
> perfect solution is ok.
> 
>   Also I would like an algorithm to draw the spline curve used by the SOR
> object, given the control points.
> 
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

-- 
Francois Labreque | The surest sign of the existence of extra-
     flabreq      | terrestrial intelligence is that they never
        @         | bothered to come down here and visit us!
  attglobal.net                                  - Calvin


Post a reply to this message

From: Alberto
Subject: Re: Lathe and sor splines question
Date: 12 Mar 2000 10:38:05
Message: <38CBB8C6.C64D3ECE@usb.ve>
A very good place to read about bezier curves and bezier patches is

http://graphics.cs.ucdavis.edu/GraphicsNotes/Graphics-Notes.html

I hope this may help you.

Alberto.


Post a reply to this message

From: Peter Popov
Subject: Re: Lathe and sor splines question
Date: 12 Mar 2000 11:27:09
Message: <DsXLOCkUqSYk+L=nc482rwHv2jZg@4ax.com>
On 12 Mar 2000 08:00:15 -0500, Nieminen Juha
<war### [at] sarakerttunencstutfi> wrote:

>  Also I would like an algorithm to draw the spline curve used by the SOR
>object, given the control points.

I suppose the SOR object uses a polynomial spline. I will try to find
the algorithms for the Newton / Lagrange interpolation polynoms for
you.


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message

From: Nieminen Juha
Subject: Re: Lathe and sor splines question
Date: 12 Mar 2000 13:56:43
Message: <38cbe86a@news.povray.org>
Alberto <jac### [at] usbve> wrote:
: A very good place to read about bezier curves and bezier patches is

: http://graphics.cs.ucdavis.edu/GraphicsNotes/Graphics-Notes.html

  Thanks. However it only explains the bezier curves (which are actually the
ones I less need, unfortunately). Thanks anyways.

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


Post a reply to this message

From: Nieminen Juha
Subject: Re: Lathe and sor splines question
Date: 13 Mar 2000 06:46:18
Message: <38ccd50a@news.povray.org>
This seems to be one of those things that nobody knows how to do it. I
have tried searching in the www, but nothing.

  Isn't there really ANY info about it?
  Thinking about it, the points don't need to be at equal distances, as long
as there are some points at the curve. I can draw lines between them. If there
are enough points it will be a good enough approximation.

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


Post a reply to this message

From: Chris Huff
Subject: Re: Lathe and sor splines question
Date: 13 Mar 2000 06:55:33
Message: <chrishuff_99-C45575.06572513032000@news.povray.org>
In article <38ccd50a@news.povray.org>, Nieminen Juha 
<war### [at] sarakerttunencstutfi> wrote:

>   This seems to be one of those things that nobody knows how to do it. I
> have tried searching in the www, but nothing.
> 
>   Isn't there really ANY info about it?
>   Thinking about it, the points don't need to be at equal distances, as 
> long as there are some points at the curve. I can draw lines between 
> them. If there are enough points it will be a good enough 
> approximation.

If this is in MegaPOV, you could scan the surface with the trace() 
function...

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: ingo
Subject: Re: Lathe and sor splines question
Date: 13 Mar 2000 10:06:42
Message: <8EF6A1B9Eseed7@204.213.191.228>
Nieminen Juha wrote:

>  Can someone tell me the algorithm used to calculate the curve for each
>  type 
>of spline?

Not sure if this is what you are looking for, do a search at Deja for Steve 
Noskow in c.g.r.r. In the result start with the first post from the top. He 
may be the person who can help you.

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: ingo
Subject: Re: Lathe and sor splines question
Date: 13 Mar 2000 10:09:07
Message: <8EF6A5990seed7@204.213.191.228>
ingo wrote:

>In the result start with the first post from the top

Sorry, I meant third post.

http://www.deja.com/dnquery.xp?ST=QS&DBS=1&groups=comp.graphics.rendering.r
aytracing&QRY=Steve+Noskow&svcclass=dnold

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Nieminen Juha
Subject: Re: Lathe and sor splines question
Date: 13 Mar 2000 12:19:57
Message: <38cd233c@news.povray.org>
Chris Huff <chr### [at] yahoocom> wrote:
: If this is in MegaPOV, you could scan the surface with the trace() 
: function...

  No, I just want to make this in my own (2D) program.

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


Post a reply to this message

Goto Latest 10 Messages Next 8 Messages >>>

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