POV-Ray : Newsgroups : povray.general : Spline vectors Server Time
1 Nov 2024 13:20:52 EDT (-0400)
  Spline vectors (Message 1 to 9 of 9)  
From: Skip Talbot
Subject: Spline vectors
Date: 14 Oct 2004 18:19:34
Message: <416efb76$1@news.povray.org>
Is there a built in function that I'm overlooking that would allow me to 
compute a normal and tangent vector to a given point on a spline?  I saw 
that Chris Colefax's spline macro can do this but is there something I can 
use with POV's built in splines?  I'm looking at approximating the vectors 
by using adjacent points, but I was hoping there might be something a little 
more accurate.

Skip


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Spline vectors
Date: 14 Oct 2004 19:18:29
Message: <416f0945$1@news.povray.org>
Skip Talbot wrote:
> Is there a built in function that I'm overlooking that would allow me to 
> compute a normal and tangent vector to a given point on a spline?  I saw 
> that Chris Colefax's spline macro can do this but is there something I can 
> use with POV's built in splines?  I'm looking at approximating the vectors 
> by using adjacent points, but I was hoping there might be something a little 
> more accurate.
> 
> Skip 
> 
> 

You could work out the polynomials that controls the
spline and then differentiate those.

Or you could use numerical methods to calculate the
tangent-, normal- and binormal-vectors.

Some keywords for Google:

"Frenet frame"
"TNB frame"

"Tangent vector"
"Normal vector"
"Binormal vector"

"Numerical differentiaton"
"Vector valued function"


While working on the tools for my POVCOMP image I made
macros that will produce a set of frenet frame functions
for my NURBS functions (and other functions).

-- 
Tor Olav
http://subcube.net
http://subcube.com


Post a reply to this message

From: Skip Talbot
Subject: Re: Spline vectors
Date: 14 Oct 2004 20:35:40
Message: <416f1b5c$1@news.povray.org>
You are gonna get mega technical points on your POVCOMP entry... as I 
expected from you.  :)  Thanks for the help.

Skip


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Spline vectors
Date: 14 Oct 2004 21:29:55
Message: <416f2813@news.povray.org>
Skip Talbot wrote:
> You are gonna get mega technical points on your POVCOMP entry... as I 
> expected from you.  :)  Thanks for the help.

I'm sorry. I have not entered. I did not have enough
spare time to make all the tools needed for my image.

Hopefully I will find time to clean up and release
some of the macros I have made during the last weeks.

-- 
Tor Olav
http://subcube.net
http://subcube.com


Post a reply to this message

From: =Bob=
Subject: Re: Spline vectors
Date: 14 Oct 2004 21:58:47
Message: <416f2ed7@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote in message
news:416f2813@news.povray.org...
: Hopefully I will find time to clean up and release
: some of the macros I have made during the last weeks.

I'm curious Tor, what were you working on?
=Bob=


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Spline vectors
Date: 15 Oct 2004 15:41:56
Message: <41702804@news.povray.org>
=Bob= wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote in message
news:416f2813@news.povray.org...
> : Hopefully I will find time to clean up and release
> : some of the macros I have made during the last weeks.
> 
> I'm curious Tor, what were you working on?

I was thinking about modelling something like Escher's
"Moebius Strip II" (woodcut from 1963):

http://images.google.com/images?q=%22Moebius+Strip+II%22
http://www.google.com/search?q=%22Moebius+Strip+II%22

(But the making of the tool macros took too much time,
so I didn't get to the modelling stage.)

-- 
Tor Olav
http://subcube.net
http://subcube.com


Post a reply to this message

From: Shishberg
Subject: Re: Spline vectors
Date: 28 Oct 2004 21:35:00
Message: <web.41819d7641f78dac682088070@news.povray.org>
"Skip Talbot" <ski### [at] aolcom> wrote:
> Is there a built in function that I'm overlooking that would allow me to
> compute a normal and tangent vector to a given point on a spline?  I saw
> that Chris Colefax's spline macro can do this but is there something I can
> use with POV's built in splines?  I'm looking at approximating the vectors
> by using adjacent points, but I was hoping there might be something a little
> more accurate.
>
> Skip

Would official support for this be too difficult? It would definitely extend
the usefulness of built-in splines.


Post a reply to this message

From: Mike Williams
Subject: Re: Spline vectors
Date: 29 Oct 2004 01:23:10
Message: <C6TDhBAyDdgBFwNs@econym.demon.co.uk>
Wasn't it Shishberg who wrote:
>"Skip Talbot" <ski### [at] aolcom> wrote:
>> Is there a built in function that I'm overlooking that would allow me to
>> compute a normal and tangent vector to a given point on a spline?  I saw
>> that Chris Colefax's spline macro can do this but is there something I can
>> use with POV's built in splines?  I'm looking at approximating the vectors
>> by using adjacent points, but I was hoping there might be something a little
>> more accurate.
>>
>> Skip
>
>Would official support for this be too difficult? It would definitely extend
>the usefulness of built-in splines.

I somehow seem to have missed the beginning of this thread, so apologies
if this has been said already.

To find the normal you can do something like

#macro SplineNormal(Spline,C)
  vnormalize(Spline(C+0.00001)-Spline(C-0.00001))
#end

Finding the normals is a bit trickier because there are an infinite
number of normal vectors to a spline at any point.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Mike Williams
Subject: Re: Spline vectors
Date: 29 Oct 2004 02:27:50
Message: <24iBwCA2KegBFwao@econym.demon.co.uk>
Wasn't it Mike Williams who wrote:
>Wasn't it Shishberg who wrote:
>>"Skip Talbot" <ski### [at] aolcom> wrote:
>>> Is there a built in function that I'm overlooking that would allow me to
>>> compute a normal and tangent vector to a given point on a spline?  I saw
>>> that Chris Colefax's spline macro can do this but is there something I can
>>> use with POV's built in splines?  I'm looking at approximating the vectors
>>> by using adjacent points, but I was hoping there might be something a little
>>> more accurate.
>>>
>>> Skip
>>
>>Would official support for this be too difficult? It would definitely extend
>>the usefulness of built-in splines.
>
>I somehow seem to have missed the beginning of this thread, so apologies
>if this has been said already.
>
>To find the normal you can do something like
>
>#macro SplineNormal(Spline,C)
>  vnormalize(Spline(C+0.00001)-Spline(C-0.00001))
>#end
>
>Finding the normals is a bit trickier because there are an infinite
>number of normal vectors to a spline at any point.
>

Oops. Replace the first two occurrences of "normal" in the above by
"tangent".

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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