Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
drawoval_o
Author Message
octopi

Posted: Wed Jun 09, 2004 7:12 pm   Post subject: drawoval_o

Hey, I made a custom drawoval command.

It works with float values for the radii.
Allows you to make thick ovals. (float values for thickness, althought they generally get rounded away.)

If someone can find better values to use as a limit for 't' (this is a parametric approach to the circle.) (I'm using approx the perimeter of the circle times the thickness+5)

the_short1

Posted: Wed Jun 09, 2004 8:58 pm   Post subject: (No subject)

cant u just go:

to make 4 thickness

for a : 50..54
drawoval (100,100,a,a,black)
end for

??

that and urs had a few dots missing * not solid color...

but good stuf...
octopi

Posted: Wed Jun 09, 2004 9:01 pm   Post subject: (No subject)

try

for a: 20..25
drawoval (100,100,a,a,black)
end for

notice the problem, the number of dots can be increase with my method to provide complete coverage.....and I think I have a solution for my dot problem, (working on it right now)
octopi

Posted: Wed Jun 09, 2004 9:24 pm   Post subject: (No subject)

 code: procedure drawoval_o (x:int,y:int,xrad:real,yrad:real,thick:real,col:int)   var halfthick:real:=0.5*thick   var xn,yn:real   var perm:real   perm:=2*Math.PI* sqrt( (xrad**2 + yrad**2)/2)   for z: -round(halfthick) .. round(halfthick)   for t:1..round(perm)*((thick div 10)+1)     xn:=(xrad+z)* cos (t)+x     yn:=(yrad+z)* sin (t)+y        drawdot(round(xn),round(yn),col)   end for   end for end drawoval_o drawoval_o(200,200,40.5,40.5,20,black)

meh this isn't perfect either....
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 4 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: