Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
Weird Effect with Drawfillpolygon
Author Message
Paul

Posted: Tue Jun 01, 2004 9:10 pm   Post subject: Weird Effect with Drawfillpolygon

Hm... believe it or not, I just learned the command drawfillpolygon today! I messed with it, and here's what I got, try entering 100 to see the effect I mean. Smaller numbers aren't that outstanding
Note: try using numbers like 50, 100 or 200 or 300, but 500 will probably end up crashing ur environment.
recommended over 25 though lol
I think it gives it an almost 3D look, but more like glassy transparent.
 code: setscreen ("graphics: max;max;offscreenonly") var number: int put "How many sides?" get number colorback (black) cls var x : array 1 .. number of int var y : array 1 .. number of int var incx: array 1..number of int var incy: array 1..number of int for a: 1..number randint (x(a), 100, maxx-100) randint (y(a), 100, maxy-100) incx(a):=3 incy(a):=3 end for loop for a: 1..number x(a)+=incx(a) y(a)+=incy(a) end for drawfillpolygon (x, y, number, 12) View.Update cls for a: 1..number if y(a)>=maxy or y(a) <= 0 then incy(a):=-incy(a) end if if x(a)<=0 or x(a)>=maxx then incx(a):=-incx(a) end if end for end loop

rhomer

Posted: Wed Jun 02, 2004 9:57 am   Post subject: (No subject)

That's pretty sweet, especially when you put a number in the low hundreds...
Tony

Posted: Wed Jun 02, 2004 12:15 pm   Post subject: (No subject)

it looks even sweeter when you use
 code: incx(a):=Rand.Int(-5,5) incy(a):=Rand.Int(-5,5)

Tony's programming blog. DWITE - a programming contest.
Paul

Posted: Wed Jun 02, 2004 1:06 pm   Post subject: (No subject)

for those of you who don't know:
 code: setscreen ("graphics: max;max;offscreenonly") var number: int put "How many sides?" get number colorback (black) cls var x : array 1 .. number of int var y : array 1 .. number of int var incx: array 1..number of int var incy: array 1..number of int for a: 1..number randint (x(a), 100, maxx-100) randint (y(a), 100, maxy-100) incx(a):=Rand.Int(-5,5) incy(a):=Rand.Int(-5,5)  end for loop for a: 1..number x(a)+=incx(a) y(a)+=incy(a) end for drawfillpolygon (x, y, number, 12) View.Update cls for a: 1..number if y(a)>=maxy or y(a) <= 0 then incy(a):=-incy(a) end if if x(a)<=0 or x(a)>=maxx then incx(a):=-incx(a) end if end for end loop
we64

Posted: Wed Jun 02, 2004 7:44 pm   Post subject: (No subject)

I don't see any difference.... it is pretty cool for either one... looks 3D...
SuperGenius

Posted: Thu Jun 03, 2004 4:03 pm   Post subject: (No subject)

very interesting... I wish that our class had learned drawfill polygon.... anyways i was able to get 499 without crashing. I almost had a seizure though.
Paul

Posted: Thu Jun 03, 2004 4:22 pm   Post subject: (No subject)

well shantz skipped it during graphics because we didn't know arrays... then I just remebered it existed when someone asked for a triangle.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 7 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: