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.

Newcomers DBPro Corner / Making circles with dot

Author
Message
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 15th Jan 2003 23:05
can any1 explain to me how i can use the dot commands in a for next loop to draw a perfect circle plz. Ty in advance btw
If you forget one little thing i shall have you shaved sterilised and destroyed: Jeffrey Goines
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 16th Jan 2003 00:16
Why not use the circle command?



Centrex#,y#)
Radius: radius#
Add a step value less than one to get more precision when drawing big circles. (for i#=0 to 360 step 0.1) Use hashes when using step values otherwise it screws up.

Add coefficients in there to change the ovalness of the circle, e.g.
dot x#+(2*radius#*cos(i#)),y#+(radius#*sin(i#))
will produce a flatter oval.
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 16th Jan 2003 00:25
that didnt work. It crahed but i dont know y. Can u re-write that CENTRE bit plz. Ty im grateful

If you forget one little thing i shall have you shaved sterilised and destroyed: Jeffrey Goines
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 16th Jan 2003 18:59
Centre didn't come into the code, I was just stating that the centre was at (x#,y#) where y# is measured from the top of the screen. x# and y# are just added to the position of the dot. It may have crashed if you didn't put hashes in, it crashed something rotten when I didn't. I can't see anything in the code snippet which might crash however. Just add a suspend for key, or wait 2000 in or something to the end of that code and it should work.

Login to post a reply

Server time is: 2024-11-23 21:37:15
Your offset time is: 2024-11-23 21:37:15