Splines presentation
category: general [glöplog]
Ugh,. I am preety much anxious, I have to present a uniwork about splines and stuff in Friday and I have 2.5 days to pass fragments from the docs to powerpoint and do the slides and train myself into presenting that. And still to understand few matters, since I did it fast by taking some stuff from a book my professor gave me, and I may have forgot the theory and how things work. Hopefully, things are loose and perhaps no professors come to presentation and I present from docs if I don't have the ppoint stuff.
I am thinking what more to say, I will present a programm too drawing 2d splines I did, I was searching in the net for other spline application (but still in 2d, never done 3d), is there something else than drawing those curves?
And one question, though it doesn't make sense without the code I don't have right now with me. For the spline I coppied an algorithm from a book, I mention it's steps also in theory. Without knowing how it works. In this one, you can draw line parts only from the left to the right, else the spline breaks. What kind of shit is this? Friends from the scene tell me, "no! With splines you can arbitary draw in every direction!!!". But this algorithm says X(i)>X(i-1) for each i. What kind of spline algorithm is this and are there are several of them?
So now I can draw splines from left to right only, but the theory in my book have only these kinds of splines anyways..
Just a little talk about a coding thing, to get some inspiration about the presentation and stuff. I am just a bit anxious and have to work like shit from tomorrow..
I am thinking what more to say, I will present a programm too drawing 2d splines I did, I was searching in the net for other spline application (but still in 2d, never done 3d), is there something else than drawing those curves?
And one question, though it doesn't make sense without the code I don't have right now with me. For the spline I coppied an algorithm from a book, I mention it's steps also in theory. Without knowing how it works. In this one, you can draw line parts only from the left to the right, else the spline breaks. What kind of shit is this? Friends from the scene tell me, "no! With splines you can arbitary draw in every direction!!!". But this algorithm says X(i)>X(i-1) for each i. What kind of spline algorithm is this and are there are several of them?
So now I can draw splines from left to right only, but the theory in my book have only these kinds of splines anyways..
Just a little talk about a coding thing, to get some inspiration about the presentation and stuff. I am just a bit anxious and have to work like shit from tomorrow..
you forgot to paste the algo
Maybe I'll do that after the presentation, when I'll really be having time for Poueting (So, what ta heck am I doing in here?! ;P)
Quote:
Trying to get advice from a scene that doesn't really care about your studies. (Nothing personal, it's just the way the scene is.)(So, what ta heck am I doing in here?! ;P)
Maybe I am just bored and anxious in that presentation and I wanted to mention it here so that I either get advice, some nifty ideas, inspiration or read some BASS about that.
Optimus, maybe here you'll find something good:
ftp://hornet.madtracker.org/mirrors/hornet/code/effects/various/zed3d095.zip (at the splines & Co section)
Then for _cute_ algorithm (B-splines I think) check Allegro's source code at http://www.allegro.cc/files/
Also wikipedia could be fine: link
I remember that the MIDAS library offered spline interpolation for samples (just another application).
In the end the concept of spline interpolation is in finding blending curves to weight "input points" coords, what changes is the function one uses and the set of points you consider.
In example you can define an arbitrary curve merging different pieces wich may have (or not) the same tangent at the meeting point: if they have the same tangent the changing between the different curve segments will be unnoticeable, that's the trick.
Other methods make use of the entire set of points.
You can do spline interpolation in any number of dimensions the trick is that you get blending coefficients for each component through a function wich depends upon an only parameter (thus it's a parametric function :) wich usually varies between 0.0 and 1.0 .
Here is a simple and concrete explaination of the concept:
I guess that the "shitty" algorithm you found is simply the 1D application.
I Hope it helps! :)
ftp://hornet.madtracker.org/mirrors/hornet/code/effects/various/zed3d095.zip (at the splines & Co section)
Then for _cute_ algorithm (B-splines I think) check Allegro's source code at http://www.allegro.cc/files/
Also wikipedia could be fine: link
I remember that the MIDAS library offered spline interpolation for samples (just another application).
In the end the concept of spline interpolation is in finding blending curves to weight "input points" coords, what changes is the function one uses and the set of points you consider.
In example you can define an arbitrary curve merging different pieces wich may have (or not) the same tangent at the meeting point: if they have the same tangent the changing between the different curve segments will be unnoticeable, that's the trick.
Other methods make use of the entire set of points.
You can do spline interpolation in any number of dimensions the trick is that you get blending coefficients for each component through a function wich depends upon an only parameter (thus it's a parametric function :) wich usually varies between 0.0 and 1.0 .
Here is a simple and concrete explaination of the concept:
I guess that the "shitty" algorithm you found is simply the 1D application.
I Hope it helps! :)
Errata corrige:
<<...
Here is a simple and concrete explaination of the concept:
http://astronomy.swin.edu.au/~pbourke/other/interpolation/
...>>
I guess that the "shitty" algorithm you found is simply the 1D application.
;)
<<...
Here is a simple and concrete explaination of the concept:
http://astronomy.swin.edu.au/~pbourke/other/interpolation/
...>>
I guess that the "shitty" algorithm you found is simply the 1D application.
;)

oh right, spline
Sometimes I am wondering what sort of mathematics are you studying. Of course it goes from left to right because it is a 1D spline. It is like saying :
y=sin(x) : Hey this *SHIT* goes from left to right only.
but you wanted :
x=sin(t);y=cos(t);
now this goes 'round and round'.
Navis : he's not studying maths, he's studying comparitive religions
Navis: Hey this *SHIT* only goes in clock wise order :)
not if t is negative
Quote:
Incorrect.not if t is negative
Correct: Not if t is decreasing.
yeap
Precis, så är det!
Bara så du vet.
Bara så du vet.
jag gick för tio minuter sen. god morgon
Ok, maybe I am just using the 1D thing. And now I've checked the algorithm I copied from a book and didn't bothered to check and this is probably the case. Just so I know.
I know this shit lompas, don't get me wrong. It's just that I copied an algorithm that was one page long without having much clue, a bit confusing and so I wasn't aware. And when I asked this question, I had months to check what I wrote in the code back then ;P
Thanks anyways..
I know this shit lompas, don't get me wrong. It's just that I copied an algorithm that was one page long without having much clue, a bit confusing and so I wasn't aware. And when I asked this question, I had months to check what I wrote in the code back then ;P
Thanks anyways..
i only did some did some hermite spline stuffs for camera interpolation.. it worked (kinda). the best way to start is just to try by hand to come up with some formula's for linear interpolation, quadratic and then cubic in 1D. after that you can extend that to multi dimensional stuffs. splines can use tangents like broderick said. which can give some funny effects (stress at the way points, little loops)..
for the rest i totally forgot, i think there are even curves that do not pass through the way points exactly. my memory is rusty.. i don't think this is exactly what you're looking for but who knows, right?
your x(i) > x(i-1) algo sounds pretty odd. i can imagine a spline algo that is optimised with just some add's instead of a load of multiplies+add's, but that's more like t(i) > t(i-1) and doesn't concern the position.
for the rest i totally forgot, i think there are even curves that do not pass through the way points exactly. my memory is rusty.. i don't think this is exactly what you're looking for but who knows, right?
your x(i) > x(i-1) algo sounds pretty odd. i can imagine a spline algo that is optimised with just some add's instead of a load of multiplies+add's, but that's more like t(i) > t(i-1) and doesn't concern the position.
earx: the b(ezier)-spline versus the CatmullRom-spline you mean?
yeti: yeah, i guess bezier doesn't interpolate through the way points judging from this site i googled up:
http://www.ibiblio.org/e-notes/Splines/Bezier.htm
http://www.ibiblio.org/e-notes/Splines/Bezier.htm
Thanks for all the comments, I think I start getting a clue. And even if I don't manage to make the changes to my presentation programm after tomorrow, at least I have now some good hints now for use in future demos.
Thanks for all the comments, I think I start getting a clue. And even if I don't manage to make the changes to my presentation programm after tomorrow, at least I have now some good hints now for use in future demos.
Thanks for all the comments, I think I start getting a clue. And even if I don't manage to make the changes to my presentation programm after tomorrow, at least I have now some good hints now for use in future demos.
Oh shit..