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.

PureGDK / Bezier Curves

Author
Message
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 2nd May 2012 20:12 Edited at: 2nd May 2012 21:53
Guido Italy asked me if I could translate an old Bezier curves example from DBPro to PureGDK (PureBasic version). Attached is the adaptation including the compiled binary. Maybe someone will find it useful as well. Requires PureBasic v4.60 + PureGDK 2.0 RC.



ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, PureBasic 4.60 + PureGDK 2.0

Attachments

Login to view attachments
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 2nd May 2012 20:12
Screenie...

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, PureBasic 4.60 + PureGDK 2.0

Attachments

Login to view attachments
Guido Italy
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 3rd May 2012 13:29
Thank and Thank !!!
Guido Italy
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 3rd May 2012 14:32
One problem ....

if i put this line :

dbSetDisplayMode ( 640,480,32,0,0) ; is all OK !


if i change with AA
dbSetDisplayMode ( 640,480,32,0,4) not draw blazier ....

Can help me ?
Guido Italy
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 3rd May 2012 14:51
And another problem :

See the attached picture designed with PaintNet .

Is a line with 4 anchor points (3 points are enough for me)

The anchorage points are located above the line
and not outside as the "Point 1" as in your example.
You can change your code for me?


Sorry for my english ( google translate..)

Attachments

Login to view attachments
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 3rd May 2012 20:31 Edited at: 3rd May 2012 20:34
Quote: "if i change with AA
dbSetDisplayMode ( 640,480,32,0,4) not draw blazier ...."


To be honest I don't know why it does that. I always thought that 2D drawing is not affected by anti-aliasing, I guess it is somehow. You'll need to wait until Mistrel can clarify this.

Quote: "You can change your code for me?"


Unfortunately not, it has nothing to do with Bezier curves. The image you attached depicts Splines which is a different story.

Here read this, you might write your own code: http://www.doc.ic.ac.uk/~dfg/AndysSplineTutorial/Parametrics.html

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, PureBasic 4.60 + PureGDK 2.0
Guido Italy
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 3rd May 2012 21:23
Thank .

Can you write for me the code ?

I can pay .
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 3rd May 2012 22:51
Guido,

Here is what you need written in PureBasic. It will be extremely easy to render it using PureGDK.



I wish I could help you more but am so overwhelmed with my college work and stuff that I don't have enough time.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, PureBasic 4.60 + PureGDK 2.0
Guido Italy
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 4th May 2012 14:28
Thank for your time ... I understand you !!!!


But this is PureBasic ... not PureGdk .

...and if i want "move the ancorage"? ( such as your the previous example?)

remember for me this is work . if you want i can pay.
Guido Italy
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 7th May 2012 14:39
Thank Olby ! I resolved all my problem !!

Login to post a reply

Server time is: 2024-04-19 18:52:41
Your offset time is: 2024-04-19 18:52:41