Miscellaneous > Programming & Networking
A programming challenge all up in your face.
TheQuirk:
Should be enough.
worker201:
--- Quote from: TheQuirk ---Should be enough.
--- End quote ---
You're sooooooo helpful.
Okay,
(b)
how about:
y = q + sqrt(r^2 - (x-p)^2);
where p,q is the center, and r is the radius
TheQuirk:
Well, what else was I supposed to say? You don't need an array because there are infinitely many possibilities of locations and radii of circles, so you can't just have an array with all the, say, points with integer coordinates and check whether they belong to the circles or not.
Anyway!
--- Quote ---y = q + sqrt(r^2 - (x-p)^2);
--- End quote ---
Almost. That only gives you half a circle. This is what it should be:
--- Quote ---y = q +- sqrt(r^2 - (x-p)^2);
--- End quote ---
worker201:
c) set the two y= equations above equal and solve? But what variable do we solve for? There are 7 unknowns, and that's for only one circle.
TheQuirk:
What are the other six unknowns?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version