Archive

Archive for July 12th, 2010

Spline Update

July 12th, 2010 admin No comments

From the feedback I got it seems people aren’t keen on doing things themselves. So I’ve uploaded a full solution:

url: http://www.daksystems.net/svn/public/Spline/
Login: Guest
password: guest

As always you can access this via an SVN client or by simply using your browser, your choice. I’ve modified things slightly to use a nehe demo that includes arcball rotation for moving your scene around to view the spline. Points are still hardcoded, I’m not going to write you lot an importer. I’ve added a keystroke for switching between Bezier(‘b’) and Catmull-Rom(‘c’) splines. This will give you an idea of how these two curves are different.

It was noted that my implementation doesn’t properly include end points. That is sort of true, to connect to the start and end curve points just double them up. IE, have 2 copies of your start and 2 copies of your end.

As an aside I’d like to thank Makeeva for the wonderful private comment that reads as follows:

“Dont post exampels if you dont have everything there!!! ive spent a hour now and havent gotten it working. you’re program is like you, dumb.”

Allow me to take this moment to apologize for not providing the proper hand holding to go along with my 4:00a.m. post. As proper punishment for my transgression I will hand convert all of my code to assembly before recompiling my next example.

.model small
.stack
.data
message   db "Not bloody likely", "$"
.code
main   proc
   mov   ax,seg message
   mov   ds,ax
 
   mov   ah,09
   lea   dx,message
   int   21h
 
   mov   ax,4c00h
   int   21h
main   endp
end main
Categories: Uncategorized Tags: