pouët.net

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..
added on the 2006-05-23 13:29:04 by Optimus Optimus
you forgot to paste the algo
added on the 2006-05-23 13:52:39 by the_Ye-Ti the_Ye-Ti
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)
added on the 2006-05-23 14:02:12 by Optimus Optimus
Quote:
(So, what ta heck am I doing in here?! ;P)
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.)
added on the 2006-05-23 14:05:24 by nitro2k01 nitro2k01
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.
added on the 2006-05-23 14:06:59 by Optimus Optimus
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! :)
added on the 2006-05-23 14:14:07 by bdk bdk
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.

;)
added on the 2006-05-23 14:16:22 by bdk bdk
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'.
added on the 2006-05-23 21:42:01 by Navis Navis
Navis : he's not studying maths, he's studying comparitive religions
Navis: Hey this *SHIT* only goes in clock wise order :)
added on the 2006-05-23 21:46:05 by p01 p01
not if t is negative
added on the 2006-05-23 22:40:46 by Hatikvah Hatikvah
Quote:
not if t is negative
Incorrect.
Correct: Not if t is decreasing.
added on the 2006-05-23 23:15:04 by nitro2k01 nitro2k01
yeap
added on the 2006-05-23 23:25:16 by Hatikvah Hatikvah
Precis, så är det!

Bara så du vet.
added on the 2006-05-23 23:30:15 by nitro2k01 nitro2k01
jag gick för tio minuter sen. god morgon
added on the 2006-05-23 23:37:40 by Hatikvah Hatikvah
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..
added on the 2006-05-24 00:05:28 by Optimus Optimus
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.

added on the 2006-05-24 09:25:41 by earx earx
earx: the b(ezier)-spline versus the CatmullRom-spline you mean?
added on the 2006-05-24 10:52:16 by the_Ye-Ti the_Ye-Ti
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
added on the 2006-05-24 11:38:21 by earx earx
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.
added on the 2006-05-24 12:07:57 by Optimus Optimus
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.
added on the 2006-05-24 12:09:16 by Optimus Optimus
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.
added on the 2006-05-24 12:14:30 by Optimus Optimus
Oh shit..
added on the 2006-05-24 12:24:17 by Optimus Optimus

login