Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
[Tutorial] whatdotcolor
Author Message
xmen

Posted: Tue Mar 30, 2004 4:15 pm   Post subject: (No subject)

wut if i do whatdotcolour for the 4 corners of the small happy faces?? i think that'll work with much less work too dont u think

Cervantes

Posted: Tue Mar 30, 2004 4:54 pm   Post subject: (No subject)

doing whatdotcolour on the 4 corners of the happyfaces is what's giving you the trouble isn't it?
trust me, for circles, you want Math.Distance.
Walker

Posted: Fri Apr 02, 2004 11:35 pm   Post subject: (No subject)

Wuld is be possible using Math.Distacne + slop to check the pixel color of every pixle on the line between 2 points? Im trying to do something like this for my project.
recneps

Posted: Sat Apr 03, 2004 3:10 pm   Post subject: (No subject)

you could. but that isnt a questio nof can whatdotcolour do it, its how you would get the points on the line
(whatdotcolour ALWAYS WORKS! It works for EVERYTHING! *sucks up to dodge*)
Walker

Posted: Sat Apr 03, 2004 9:32 pm   Post subject: (No subject)

By possible i ment will it lag the prgram up reeeeealy badly
Andy

Posted: Sat Apr 17, 2004 12:54 pm   Post subject: (No subject)

for whatdotcolor circle colission detection, what you do is you add on the value, then u run through all the circumference of ur circle, and check if its a color other than your original if isnt then subtract back the vaule
Paul

Posted: Sat Apr 17, 2004 1:04 pm   Post subject: (No subject)

how would you check thru the circumference of the circle??
waaa no one wants to explain to me.
Andy

Posted: Sat Apr 17, 2004 1:05 pm   Post subject: (No subject)

use the equation of the circle x^2+y^2=r^2

Paul

Posted: Sat Apr 17, 2004 1:06 pm   Post subject: (No subject)

I don't really get that, is that pythagorean or something? can u gimme an example like just something to check all the points on the circumference of the circle.
Raugrist

Posted: Sat Apr 17, 2004 3:32 pm   Post subject: (No subject)

It is pythagorean kinda, if you think about it. Draw a circle on the origin. Now pick a point on the circumference and draw one line to the x-axis and another to the center of the circle. You know have a right triangle.
Andy

Posted: Fri Apr 23, 2004 10:21 am   Post subject: (No subject)

Paul Bian wrote:
I don't really get that, is that pythagorean or something? can u gimme an example like just something to check all the points on the circumference of the circle.

Paul

Posted: Fri Apr 23, 2004 12:38 pm   Post subject: (No subject)

grade 10, I know pythagorean but I dunno how to use it in Turing.
Delta

Posted: Mon Apr 26, 2004 7:55 pm   Post subject: (No subject)

If you know it then you should be able to use it right? Cuz knowing it implies that you can use it right? the equations are pretty much exactly the same inside and outside of turing right?... hence your either lying or... your just not thinking hard enough
Paul

Posted: Mon Apr 26, 2004 8:02 pm   Post subject: (No subject)

Enough with the words just give me a goddamned example code.
we64

Posted: Mon May 10, 2004 7:52 pm   Post subject: (No subject)

dodge_tomahawk wrote:
use the equation of the circle x^2+y^2=r^2

that is not really the pythagorean formula, it is also the equation of the circle. Remember what you did in class? it is actually quite useful, for example, if you know the coordinate of x and it gives you y.

let's say you radius is 5, so when (x = 5, y=0), (x=4 , y=3), (x=3, y=4), (x=2, y = sqrt (21)), (x=1, y= sqrt (24)), (x=0, y=5) it would be the same for the negative x and everything here is plus or minus.

In this case, you want to check for every point of the circle, I don't think that is possible, because whatdotcolour (x,y) must be an integer. It would not be accurate.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 2 of 4  [ 49 Posts ]
Goto page Previous  1, 2, 3, 4  Next
 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: