Computer Science Canada B?zier Curve |
Author: | Raknarg [ 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. |
Author: | Raknarg [ Sun Feb 19, 2012 3:41 pm ] |
Post subject: | Re: B?zier Curve |
Sorry about that. Here's the other one: |
Author: | Colin [ 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. |
Author: | Raknarg [ 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 but thanks |
Author: | Raknarg [ Tue Feb 28, 2012 1:24 pm ] |
Post subject: | RE:B?zier Curve |
Could you also send me the source code? |
Author: | Colin [ 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. |
Author: | Raknarg [ 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 |