A shape made up of a connected set of points that are all equal distance from a center point.

learn more… | top users | synonyms

1
vote
1answer
83 views

How do I make circles bounce off each other realistically?

I'm trying to create bouncing balls with realistic physics. At the moment, when the balls hit each other, they bounce back in the same direction they came from. How do I make them more realistic? I ...
0
votes
1answer
51 views

LibGDX collision with rectangle and circle

I have 2 objects, A and B, both are classes with only values, so positions and dimensions are only values (float posX,posY). I have a render class which render A and B with shapeRenderer; A is ...
3
votes
5answers
164 views

How to “merge” multiple intersecting circles so that only the outer edges of each show?

In my RTS (In Unity) each unit or building has strategic circles in a similar fashion to SupCom. If you have multiple units or buildings selected it looks like the picture to the left. I want to make ...
0
votes
0answers
31 views

Grab all tiles within a radius?

I'm working on a 2D tile based game. I want NPC's to be able to destroy tiles, and ideally I would have a function, which takes a central x,y and then based upon a circular area from that point ...
1
vote
3answers
301 views

Collision between AABB and Circle

I'm programming collision systems for a 2D game engine. The idea is that different systems can interact with each other. So one of the cases would be check collisions between axis aligned bounding box ...
0
votes
1answer
48 views

How the values of h and the perpendicular had computed

How the values of h and the perpendicular had computed or taken in this answer of a previous question??? please clarify it How can I make a spline out of three points that define circular arc?
3
votes
2answers
157 views

Intersection between moving circle and some squares

I'm developing a 2D game made of squares. What I need to do is check if a circle collides with any of the squares as it moves. I have a raycast function to check the same idea, but using a point. I ...
2
votes
1answer
108 views

How to calculate max region/area of 2d circles?

I have some 2d circles on a plane, each has its own minRadius and maxRadius. When two circles collides, both of them will shrink their radius, so the actual radius of a circle is in range [minRadius, ...
1
vote
3answers
322 views

How do I resolve a collision of a circle with two rectangle corners?

I'm writing a simple non-physical one-circle-to-many-rectangles collision detector/resolver. For collision detection, I'm using a very common algorithm, and it's working pretty well. For collision ...
4
votes
3answers
172 views

How can I merge the corners of fractally-generated borders so they look natural?

I'm using a fractal generator to generate borders around a rectangular area. It works great, but my problem is with corners. A naive implementation when the left border overlaps the top border: ...
1
vote
1answer
289 views

How can I make a spline out of three points that define circular arc?

I was looking at the descriptions of various curve techniques here and noticed the mention of circular arcs. I want to implement something like this, but I'm not quite sure what the correct formula to ...
0
votes
1answer
343 views

How to solve the overlap of two circles that collide

I have two circles , one of the circles is static the other is moving around. I have a method that checks whether the two circles collide. How to make the two circles don't overlap when colliding? ...
0
votes
1answer
54 views

Revert to closest non intersecting position

First, let me start by saying: Please forgive me if this question have already been asked. I've tried to search but didn't find any solution. (It might be due to my lack of terms). I have two ...
1
vote
4answers
807 views

How to set speed of circular motion

Edit 2 - clarification Just to clarify, the issue I have at the moment is how I specify a time (in seconds) for a complete revolution to occur. My delta is fixed and is 1/ticks per second (1/60). ...
5
votes
1answer
458 views

Animation of moving circle by square's outer surface

I want to make this animation in OpenGL, here I attached a simple gif how I want it to looks like: Main problem is that I can not figure out how to move by corner - circle should smoothly move by ...
1
vote
2answers
457 views

Bouncing off a circular Boundary with multiple balls?

I am making a game like this : Yellow Smiley has to escape from red smileys, when yellow smiley hits the boundary game is over, when red smileys hit the boundary they should bounce back with the ...
3
votes
2answers
2k views

OpenGL GL_LINE_STRIP produces arcs with visible line edges

Another member mentioned an issue while drawing arcs with GL_LINE_STRIP. He has GL_LINE_SMOOTH enabled. The question is, how could he avoid the tiny gaps between vertices without increasing their ...
1
vote
1answer
2k views

How to draw a circle with WebGL using GL_POINTS [closed]

I'm trying to draw a circle using simple vertices points and a big gl_PointSize value. I found this example and try to reproduce it on WebGL with no success.
0
votes
1answer
325 views

Revolve FlxSprites Around a Central FlxSprite in Flash Game made with Flixel

I have been working on a Flash game made in Flash Builder using the Flixel library. I have been trying to dynamically create a group of FlxSprites , and revolve them around a player controlled class ...
5
votes
1answer
558 views

HLSL Circle all white

I have been trying to get my shader code (HLSL) to draw a simple circle but after a day and a half I am getting nowhere. It seems people are using the x^2 + y^2 = r^2 and remap texcoords but I only ...
4
votes
2answers
5k views

How to draw a smooth circle in Android using OpenGL?

I am learning about OpenGL API on Android. I just drew a circle. Below is the code I used. public class MyGLBall { private int points=360; private float vertices[]={0.0f,0.0f,0.0f}; private ...
0
votes
2answers
517 views

Why circles are not created if small?

I have changed the scale to my own and now I cant create any object, including circle, if it is of the size which is normal for my scale. I am to create big object first and then modify it to smaller ...
1
vote
3answers
8k views

How do I make a circular hole inside an editable poly without boolean operations?

I have created a rectangle, then converted it into an editable poly. Then I created a circle and converted it to editable poly too. How to make it so that that the circle becomes a hole in the ...
1
vote
2answers
598 views

Circular movement - eliminating speed ups near Y = 0

I have a basic algorithm to rotate an enemy around a 200 unit radius circle with center 0. This is how I'm achieving that: if (position.Y <= 0 && position.X > -200) { position.X -= ...
1
vote
2answers
511 views

Tangent to a circle through a point

I'm trying to figure out how to calculate the following angle: I know center (p1) and radius (r) of a circle. Given a point p3 I want to calculate the angle a such as the tangent (tan) of the circle ...
4
votes
1answer
779 views

How to bounce a 2d point particle off of a circular edge

In a prototype I'm building, a particle can spawn anywhere within a larger, confining circle. Important to note is that the particle will not spawn in the origin of the larger circle, but anywhere ...
2
votes
1answer
304 views

Implementing Circular Sprite Masks

So I've been scouring the interwebs for a couple of days with regards to how to implement sprite masking in XNA 4 and C#. Coming from a pet project I did in Flash, this was pretty easy as masks are ...
9
votes
4answers
1k views

Circle inside circle collision

In one of my projects I have a game area in the shape of a circle. Inside this circle another small circle is moving around. What I want to do is keep the small circle from moving outside the bigger ...
3
votes
2answers
885 views

In Box2D, how can I check for bodies within a circle?

I'm trying to sample random positions to find one that is sufficiently far from other bodies. Hence I'd need to test for bodies within a given circle. So far, I've used b2World::QueryAABB around my ...
1
vote
1answer
486 views

How to handle circle penetration

I've been working on cirlce to circle collision and have gotten the intersection method working correctly, but I'm having problems using the returned values to actually seperate the circles from one ...
4
votes
2answers
6k views

Drawing a circle in OpenGL ES Android, squiggly boundaries

I am new to OpenGL ES and facing a hard time drawing a circle on my GLSurfaceView. Here's what I have so far. The circle class public class MyGLBall { private int points=40; private float ...
7
votes
5answers
958 views

Circular Bullet Spread not Even

I'm creating a bullet shooter much in the style of Touhou. Right now I want to have a very simple circular shot being fired from the enemy. See this picture: As you can see, the spacing is very ...
1
vote
3answers
609 views

How does this circle collision detection math work?

I'm going through the wildbunny blog to learn about collision detection. I'm confused about how the vectors he's talking about come into play. Here's the part that confuses me: p = ||A-B|| – ...
16
votes
2answers
4k views

How do I test if a circle and concave polygon intersect?

I have a polygon (sometimes convex, but often concave), and a bunch of circles with different radii. How can I find out if a circle is intersecting/overlapping with the polygon? I could split my ...
5
votes
4answers
6k views

How do I find the intersections between colliding circles?

I want to find whether 2 circles with radii r1 and r2 intersect, and if so, where they do so. Is there a simple solution?