Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 B?zier Curve
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Raknarg




PostPosted: Sun Feb 19, 2012 3:40 pm   Post subject: B?zier Curve

Smool showed me in class this program he made that takes in a series of points, and smooths them out to make a kind of average curve of all those points using a B?zier Curve. So I looked it up and decided to make one for myself. Also, for fun, I made a screensaver-y thing. Enjoy.

NOTE: For the Curve program, you can change the amount of points by changing the upper bounds of the array at the top (array p). You go forward in the curve with the right key, and backwards with the left key. At the beginning, you click on each place you want to have a point.
For the screensaver, it randomizes everything. Just run it. If it's too fast, increase delay.



B?zier Curve.t
 Description:

Download
 Filename:  B?zier Curve.t
 Filesize:  1.92 KB
 Downloaded:  165 Time(s)


B?zier Curve.t
 Description:

Download
 Filename:  B?zier Curve.t
 Filesize:  1.92 KB
 Downloaded:  101 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Raknarg




PostPosted: Sun Feb 19, 2012 3:41 pm   Post subject: Re: B?zier Curve

Sorry about that. Here's the other one:


B?zier Screensaver.t
 Description:

Download
 Filename:  B?zier Screensaver.t
 Filesize:  2.42 KB
 Downloaded:  156 Time(s)

Colin




PostPosted: Tue Feb 28, 2012 7:33 am   Post subject: Re: B?zier Curve

That's awesome. Having the ability to make bayesian curves could be useful. With it you could make a vector based drawing program, instead of just raster paint. Your screen saver looks very cool. However I'm thinking it would be really cool to mix it with my 3D cube screen saver so that the bayesians moved around in 3d space. I have draw line commands written up that has x,y,and z as input. Would just need to make your screensaver track the position for the 3ed dimension and it could plug right in to the 3d draw line in my screensaver.

Here's my 3D cube screen saver as an executable. Imaging floating in and around a morphing curve instead of a bunch of rigid cubes. Very Happy



3D Cubes_sm.jpg
 Description:
 Filesize:  19.65 KB
 Viewed:  125 Time(s)

3D Cubes_sm.jpg



Line Visual 3D - Flying Cubes.zip
 Description:

Download
 Filename:  Line Visual 3D - Flying Cubes.zip
 Filesize:  335.56 KB
 Downloaded:  121 Time(s)

Raknarg




PostPosted: Tue Feb 28, 2012 1:19 pm   Post subject: RE:B?zier Curve

haha I just recently got into 3D projection, I'm still kindof new Razz but thanks
Raknarg




PostPosted: Tue Feb 28, 2012 1:24 pm   Post subject: RE:B?zier Curve

Could you also send me the source code?
Colin




PostPosted: Wed Feb 29, 2012 6:45 am   Post subject: 3D Curve Screen Saver Complete!!

Wow. I can't believe I just spent an entire day on this thing. I guess I got into it. Anyways its done. I have made a fully completed 3D Curve screen saver. I modified your curve code to support the 3ed Z dimension and made it a little less repetitious by cutting some of the embedded loops. I then successfully gutted my 3D screensaver and stuffed with the modified 3D curve code. After that I just kept enhancing the thing as a whole by adding lots of little features like interface controls. Here is a list of controls as shown in the help menu.

Mouse:
'RightClick' - Rotate
'MiddleClick' - Zoom
'LeftClick' - Move
Keyboard:
'Arrow Keys' - Rotate Orientation
Press 'A' - Show/Hide Center Axis
Press 'B' - Show/Hide Bounding Box
Press 'G' - Show/Hide Ground Plain
'Spacebar' - Toggle Curve Drawing Mode
Press 'M' - Enable Curve Morphing
Press 'P' - Hold Curve Pose (stops it from setting new poses)
Press 'R' - Reset Camera
'Ctrl-R' - Toggle Auto Rotation
Hold 'O' - Orthographic View
Press 'F1' - Help/Controls
Press 'F5' - Special Easter Egg
Press 'Esc' - Close Program

Well Enjoy. I have provided a Zip with the Binary as well as the all source code for the final version.



shot2-ms.jpg
 Description:
 Filesize:  43.68 KB
 Viewed:  111 Time(s)

shot2-ms.jpg



3D_BayesianCurve_ScreenSaver v8.zip
 Description:

Download
 Filename:  3D_BayesianCurve_ScreenSaver v8.zip
 Filesize:  1018.36 KB
 Downloaded:  182 Time(s)

Raknarg




PostPosted: Wed Feb 29, 2012 1:57 pm   Post subject: RE:B?zier Curve

Thank you, that's really well done. I'm going to take a look into this Razz
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: