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

Username:   Password: 
 RegisterRegister   
 Bezier Curve Drawing
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
evildaddy911




PostPosted: Sat Jan 05, 2013 1:03 pm   Post subject: Bezier Curve Drawing

a few days ago, i started looking into what bezier curves were and decided to try to create an algorithm to draw one. just this morning, i had an idea for UNLIMITED points and immediately implemented it into a function giving me this basic program...

- draws each node as a medium-sized black circle
- draws a green line between each node so you can tell which order the nodes are
- draws the bezier curve in blue
the program draws 1000 line segments fitting the curve, so feel free to play around with that number if it lags

CONTROLS
left click + drag . . . move a node
left click the "new" button . . . add a new node in the center of the screen
right click . . . delete a node

hope you enjoy, please leave some feedback

EDIT: i feel as though i should cite where i got my information of Bezier curves so others can look there because my code isn't documented very well...
Caffiene Owl
Wikipedia



bezier program.t
 Description:
go nuts!

Download
 Filename:  bezier program.t
 Filesize:  2.67 KB
 Downloaded:  348 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Raknarg




PostPosted: Sat Jan 05, 2013 5:59 pm   Post subject: Re: Bezier Curve Drawing

Good job! I made this one a year ago for fun using bezier curves:


B?zier Screensaver.t
 Description:

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

Grapefruit




PostPosted: Sat Jan 05, 2013 9:07 pm   Post subject: Re: Bezier Curve Drawing

Can someone explain the basics of Bezier curves/link a tutorial for me?

I can't find the info anywhere!
evildaddy911




PostPosted: Sat Jan 05, 2013 9:12 pm   Post subject: RE:Bezier Curve Drawing

Grapefruit: Check out the links i sourced in the first post, thats pretty much all i read
Raknarg: i think i remember you posting that, i had no idea what it was doing so i kinda forgot about it... Ill take a look at it tomorrow when i can get on a computer Smile
Raknarg




PostPosted: Sat Jan 05, 2013 9:45 pm   Post subject: Re: Bezier Curve Drawing

Even better, evildaddy, is bezier curves in 3d Wink
evildaddy911




PostPosted: Thu Jan 10, 2013 5:10 pm   Post subject: Re: Bezier Curve Drawing

Raknarg: I kinda want to try 3D curves sometime, that would be pretty cool, especially if i have the nodes bouncing off the sides of a cube? I think Ill get on that...

in other news...
Just made a port to Java
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  [ 6 Posts ]
Jump to:   


Style:  
Search: