|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tor Olav Kristensen <tor### [at] TOBEREMOVEDgmailcom> wrote:
>
> I recommend that you read a little about Rational B-Splines.
>
> --
> Tor Olav
> http://subcube.net
> http://subcube.com
Well, actually i'm not a mathematical genius, sorry, i don't deal with
mathematics at all ;). I'm chemist and mathematics was always a riddle for
me. But there should be a way to define a nearly perfect circle using a
cubic B-spline and putting the start and end controllpoint somewhere far
away. but it did not worked. I tried a lot to shift the control points, but
no way :((
Here the spline and the pic.
#declare C_Path4 = spline { natural_spline
-0.25 < -26.666, 0, 0>,
0.00, < 0, 0, 20>,
0.25, < 20, 0, 0>,
0.50, < 0, 0,-20>,
0.75, < -20, 0, 0>,
1.00, < 0, 0, 20>,
1.25, < 26.666, 0, 0>};
Maybe i'm totally wrong and a circle can't be declare by a spline
Post a reply to this message
Attachments:
Download 'spline.jpg' (81 KB)
Preview of image 'spline.jpg'
|
|
| |
| |
|
|
From: Tor Olav Kristensen
Subject: Re: circle or spiral by spline ??
Date: 14 Oct 2004 08:22:49
Message: <416e6f99@news.povray.org>
|
|
|
| |
| |
|
|
Shurakai wrote:
> Tor Olav Kristensen <tor### [at] TOBEREMOVEDgmailcom> wrote:
>
>>I recommend that you read a little about Rational B-Splines.
>>
>>--
>>Tor Olav
>>http://subcube.net
>>http://subcube.com
>
>
> Well, actually i'm not a mathematical genius, sorry, i don't deal with
> mathematics at all ;). I'm chemist and mathematics was always a riddle for
> me. But there should be a way to define a nearly perfect circle using a
> cubic B-spline and putting the start and end controllpoint somewhere far
> away. but it did not worked. I tried a lot to shift the control points, but
> no way :((
> Here the spline and the pic.
> #declare C_Path4 = spline { natural_spline
> -0.25 < -26.666, 0, 0>,
> 0.00, < 0, 0, 20>,
> 0.25, < 20, 0, 0>,
> 0.50, < 0, 0,-20>,
> 0.75, < -20, 0, 0>,
> 1.00, < 0, 0, 20>,
> 1.25, < 26.666, 0, 0>};
>
>
>
> Maybe i'm totally wrong and a circle can't be declare by a spline
You can not make a perfect circle with any of POV-Ray's
inbuilt spline types (AFAIK).
I'm in a hurry now, so I don't have time to explain further.
Maybe later...
Btw.: The Natural Spline is not a B-Spline.
--
Tor Olav
http://subcube.net
http://subcube.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Shurakai wrote:
> Here the spline and the pic.
> #declare C_Path4 = spline { natural_spline
> -0.25 < -26.666, 0, 0>,
> 0.00, < 0, 0, 20>,
> 0.25, < 20, 0, 0>,
> 0.50, < 0, 0,-20>,
> 0.75, < -20, 0, 0>,
> 1.00, < 0, 0, 20>,
> 1.25, < 26.666, 0, 0>};
>
> Maybe i'm totally wrong and a circle can't be declare by a spline
You'll never get a perfect circle as Thorsten points out, but if you use
enough control points, you can get very close. Try this:
#declare C_Path4 = spline {
natural_spline
-0.25, < -26.666, 0, 0>,
#declare Points = 64; // 4 points is like it was before.
#declare C = 0;
#while (C<=Points)
#declare V = C/Points;
V, vrotate(20*z,360*y*V),
#declare C = C+1;
#end
1.25, < 26.666, 0, 0>
};
Rune
--
3D images and anims, include files, tutorials and more:
rune|vision: http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Rune" <run### [at] runevisioncom> wrote:
> You'll never get a perfect circle as Thorsten points out, but if you use
> enough control points, you can get very close. Try this:
>
> #declare C_Path4 = spline {
> natural_spline
> -0.25, < -26.666, 0, 0>,
> #declare Points = 64; // 4 points is like it was before.
> #declare C = 0;
> #while (C<=Points)
> #declare V = C/Points;
> V, vrotate(20*z,360*y*V),
> #declare C = C+1;
> #end
> 1.25, < 26.666, 0, 0>
> };
Tor Olav Kristensen <tor### [at] TOBEREMOVEDgmailcom> wrote:
Dear Tor Olav,
thanks a lot for Your function code. It was exactly what i was looking for.
But i nneden to chnage it a little bit, and now it's working fine with my
Animation-Debug Macro :)))) I can see the path and the camere moving on the
path during animation. A little sample is posted.
Once more thanks a lot for Your help.
Dear Rune,
i'll test Your spline as soon as possible, also big thanks to You.
It's easier to get my macros working with a spline than with a function
related macro.
Bye and have fun, Shu.
Post a reply to this message
Attachments:
Download 'circle_cam.mpg' (115 KB)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
And a small movie from the spiral spline. Once more thanks Tor.
>
> Bye and have fun, Shu.
Post a reply to this message
Attachments:
Download 'spiral_cam.mpg' (99 KB)
|
|
| |
| |
|
|
|
|
| |
|
|