Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Bezier line optimized, DBPro and DBc

Author
Message
netmon
18
Years of Service
User Offline
Joined: 14th Aug 2006
Location:
Posted: 18th Feb 2007 17:16
Here is a function to draw a bezier line. The twist is, it will only draw as many points as needed to make the line solid. The closer the points are the fewer the iterations the line will loop through. Long lines are not pretty but, you can do alot with this.

You can make this a heck of a lot faster if you lock the buffers and draw the points that way. DB dots are extremely slow.

Hope that makes sence.

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 19th Feb 2007 04:45
using a 1x1 box instead is also a lot faster than using dot.

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 16th Mar 2007 23:51
Can you post an example?

Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 19th Mar 2007 02:02
I'm not sure if I did this right, but-



Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 19th Mar 2007 02:06 Edited at: 19th Mar 2007 02:07
Thanks, Daemon.

@Netmon: Cool function. I changed the code to use lines instead of dots. The lines look better and more solid now (at least from what I've tested)




In Daemon's example:



Login to post a reply

Server time is: 2024-11-22 19:04:18
Your offset time is: 2024-11-22 19:04:18