Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
circle
- Page 1
Circle help please
Programming
Software Development
14 Years Ago
by gangster88
…;) def drawCircle(win, centre, radius, colour, color):
circle
=
Circle
(centre, radius)
circle
.setFill(colour)
circle
.setOutline(color)
circle
.draw(win) def drawWindow(win, center, radius…
Re: Circle help please
Programming
Software Development
14 Years Ago
by gangster88
…;) def drawCircle(win, centre, radius, colour, color):
circle
=
Circle
(centre, radius)
circle
.setFill(colour)
circle
.setOutline(color)
circle
.draw(win) def drawWindow(win, center, radius…
Re: Circle help please
Programming
Software Development
14 Years Ago
by gangster88
…, radius) theColour = raw_input("Enter the colour: ")
circle
.setFill(colour)
circle
.setOutline(color)
circle
.draw(win) def draw(rows, columns): colour=theColour…
Re: Circle help please
Programming
Software Development
14 Years Ago
by gangster88
… def drawCircle(win, centre, theColour, radius, colour, color):
circle
=
Circle
(centre, radius) return theColour theColour = raw_input("Enter the …colour: ")
circle
.setFill(colour)
circle
.setOutline(color)
circle
.draw(win) def draw(rows, columns): colour…
Circle inside circle
Programming
Software Development
13 Years Ago
by xcrypted1
… extends JComponent { private
Circle
circle
; private
Circle
smallCircle; public CircleComponent(Point2D.Double point) {
circle
= new
Circle
(200, 200, 100,… [/code] [code] public CircleComponent(Point2D.Double point) {
circle
= new
Circle
(200, 200, 100, Color.BLACK); final double SMALL_RADIUS …
Re: Circle inside circle
Programming
Software Development
13 Years Ago
by ejosiah
… between the `Point2D.Double p` and the center of the
circle
; if this distance is less than the radius then its… inside the
circle
else its outside it. solution: Let c represent the center… of the
circle
and p represent the point in question and r represent…
Re: Circle inside circle
Programming
Software Development
13 Years Ago
by ejosiah
[CODE='java']if(
Circle
.isInside() == true)[/CODE] is redundant use this instead [CODE='java']if(
Circle
.isInside())[/CODE] and you don't need to implement the code that calcuates distance the Point2D object already has several distance calculating methods; use them instead.
Re: Circle inside circle
Programming
Software Development
13 Years Ago
by xcrypted1
[CODE='java']if(
Circle
.isInside() == true)[/CODE] [quote]is redundant use this instead [/quote][CODE='java']if(
Circle
.isInside())[/CODE] I get a compile error about not be able to pass static methods or argument differs in length when I try putting what you and I did in this if statement. I keep trying different combinations with no luck.
Re: Circle inside circle
Programming
Software Development
13 Years Ago
by zeroliken
in your previous code [CODE] public CircleComponent(Point2D.Double point) {
circle
= new
Circle
(200, 200, 100, Color.BLACK); final double SMALL_RADIUS = 3…; Color color; if(
Circle
.isInside() == true) color = Color.GREEN; else color = Color.RED…
Re: Circle inside circle
Programming
Software Development
13 Years Ago
by ejosiah
use lower case c as in
circle
not
Circle
Re: Circle inside circle
Programming
Software Development
13 Years Ago
by xcrypted1
… the math part in the boolean isInside method of the
Circle
class. Here is what I have but it doesn't….Double p) { boolean inside = false; //Need calculation for center of
circle
here double D = Math.Sqrt(Math.Pow(xCenter - p.x…
Bersenham Circle Algorithm demonstrated using Win32 SetPixel
Programming
Software Development
14 Years Ago
by NicAx64
…tagCircle { int x; int y; int radius; }
Circle
; /* set the window handle */ void SetWindowHandle(HWND); /*…int iCmdShow) { static TCHAR szAppName[] =TEXT("
circle
"); WNDCLASS wndclass; wndclass.style = CS_HREDRAW|CS_VREDRAW ;…main.cpp -g g++ -c -o
circle
.o
circle
.cpp -g REM linking........ g++ -o …
Circle 2D class in java:
Programming
Software Development
14 Years Ago
by xterradaniel
… x and y that specify the center of the
circle
with get methods. A data field radius with … method. A no-arg constructor that creates a default
circle
with (0, 0) for (x, y) and 1 …for radius. A constructor that creates a
circle
with the specified x, y, and radius. A method…
Re: Circle Rectangle Side collision.
Programming
Software Development
7 Years Ago
by AssertNull
…void MoveCircle(double dx, double dy) {
circle
.x += dx;
circle
.y += dy; } public void ChangeCircleSize(… as dw) { double dh = dw;
circle
.width += dw;
circle
.height += dh; } @Override public void …
Circle game using Pygame
Programming
Software Development
15 Years Ago
by hondros
… playerx, playery): self.
circle
=
circle
= pygame.draw.
circle
(window, color, (xpos, ypos), ray_circle) # If the
circle
is in the same position…[2], x[3], player[0], player[1]) #
circle
= pygame.draw.
circle
(window, x[2], (x[0], x[1]), …[2], x[3], player[0], player[1]) #
circle
= pygame.draw.
circle
(window, x[2], (x[0], x[1]), …
Re: Circle algorithm
Programming
Software Development
16 Years Ago
by papuccino1
…: Found something in google: [b]
Circle
Interface (
Circle
.h)[/b] [code=c++]class
Circle
: public Shape { public:
Circle
(int newx, int newy, int newradius…(int newradius); void draw(); private: int radius; };[/code] [b]
Circle
Implementation (
Circle
.cpp)[/b] [code=c++]#include "Shape.h" #include…
Circle class
Programming
Software Development
13 Years Ago
by programing
… one double data radius . write motheds ::: public
Circle
(),public
Circle
(double),public
Circle
(
Circle
c) public double getRadius() public setRadius (double) public …17 */ public class Circlee { private double raduis; public
Circle
(){ raduis=1; } public
Circle
(double rad){ raduis=rad; } public String toString(){ return…
Re: Circle class
Programming
Software Development
13 Years Ago
by programing
… [CODE] public class
Circle
{ private double raduis; public
Circle
(){ raduis =0.0; } public
Circle
(double rad){ raduis=rad; } public
Circle
(
Circle
c){ raduis=c.getRaduis…
circle methods homework help
Programming
Software Development
15 Years Ago
by hockey87
…c = getContentPane(); pCenter = new JPanel(); } public
Circle
() { //add GUI components pCenter.setLayout(new GridLayout(9…bCompute.addActionListener(buttonHandler); //render the window setTitle("
Circle
Info"); setSize(500, 300); setLocation(100…
Re: Circle Rectangle Side collision.
Programming
Software Development
7 Years Ago
by AssertNull
…first two are easy. Calculate the distances between the
circle
's center and each of the two line segment endpoints…. If that distance is less than the
circle
's radius, they intersect. If it's exactly equal… versus intersecting. If both distances are GREATER than the
circle
's radius, you have one more distance to check.…
Circle class
Programming
Software Development
21 Years Ago
by anuhnm
Define a class to represent
Circle
with 3 private data member which are Radius, XP & YP. To include a complete set of the foll. funnctions ie. accessor, constructor & member to input a
circle
, to get the location & radius of
circle
, to move a
circle
and resize a
circle
. Thanks in anticipation.
Circle Panel GUI
Programming
Software Development
17 Years Ago
by Arman Majumder
… and forth horizontally, when clicked (with a mouse) the
circle
halts motion and the background colour changes randomly, if clicked… again the
circle
resumes it's motion and changes the background colour randomly…. *Two separate programs[FONT="][/FONT], CirclePanel and
Circle
(
Circle
Class)*
Re: Circle Panel GUI
Programming
Software Development
17 Years Ago
by cUtEAkew
… g) { Color oldColor = g.getColor(); g.setColor(color); // Translates
circle
's center to rectangle's origin for drawing. if (filled…void turn(int degrees) { direction = (direction + degrees) % 360; } // Moves the
circle
in the current direction using its // current velocity public void…
Circle Pattern Help
Programming
Software Development
14 Years Ago
by Python_Doofus
… def drawCircle(win, centre, radius, colour):
circle
= graphics.
Circle
(centre, radius)
circle
.setFill(colour)
circle
.setWidth(2)
circle
.draw(win) def drawCircles(win,x,y…
Re: Circle Pattern Help
Programming
Software Development
14 Years Ago
by woooee
…, colour): centre = graphics.Point(x,y)
circle
= graphics.
Circle
(centre, radius)
circle
.setFill(colour)
circle
.setWidth(2)
circle
.draw(win) width = 100 height = 100 win…
Re: Circle Rectangle Side collision.
Programming
Software Development
7 Years Ago
by JamesCherrill
… from the rect (where r is the radius of the
circle
). That shape has 4 straight segments and 4 ninety degree… lines segment joining the position of the center of the
circle
at the previous time step with its position now. If… is less than the radius then the segment intersects the
circle
. Voila! The Java API has al the geometric methods we…
Re: Circle Rectangle Side collision.
Programming
Software Development
7 Years Ago
by AssertNull
…= new Rectangle2D.Double(rectangleUpperLeftx, rectangleUpperLefty, rectangleWidth, rectangleHeight); Ellipse2D.Double
circle
= new Ellipse2D.Double(circleUpperLeftx, circleUpperLefty, circleDiameter, circleDiameter); Now, … The one above is for drawing an ellipse/oval/
circle
. Yes, they are integers because everything is in pixels…
Circle Rectangle Side collision.
Programming
Software Development
7 Years Ago
by scheppy
…to implement an algorythm to figure out what side a
circle
has collided with a rectangle? After check to make …sure a
circle
has collided with the rectangle im trying to figure out…hit. The problem is the rectangle is smaller than the
circle
somtimes.... everything ive tried so far will only work …
Re: Circle Rectangle Side collision.
Programming
Software Development
7 Years Ago
by AssertNull
….Double(rectangleUpperLeftx, rectangleUpperLefty, rectangleWidth, rectangleHeight); Ellipse2D.Double
circle
= new Ellipse2D.Double(circleUpperLeftx, circleUpperLefty, circleDiameter, circleDiameter…and hollow if they do... if(
circle
.intersects(rectangle)) { g2.draw(
circle
); g2.draw(rectangle); } else…
Re: Circle Rectangle Side collision.
Programming
Software Development
7 Years Ago
by JamesCherrill
… seems to consider the velocity of the
circle
. Eg At time t the
circle
overlaps the top left corner of the…by considering the velocity and also the position of the
circle
centre relative to the rectangle. The results look OK to…that moment there is no ambiguity and just testing for
circle
touches point or line is enough. We know position at…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC