I've decided to tackle Project Euler problem 233 next but I'm having some major problems! I've done some analysis and have made some quite nice progress but I've become stuck now. Here's my working:
Lemma 1:
Since the circle goes through the 4 corner points there are at least 4 solutions for any n. But for each point on the circumferenc...
I imagine that this is a simple question, but I'm getting some strange results with my current code and I don't have the math background to fully understand why. My goal is simple, as stated in the title: I just want to find the point at some distance and angle from a center point.
My current code:
Point centerPoint = new Point ( 0, 0...
I'm trying to write a method that will calculate if two circles are overlapping. I've come up with the following and I'm just curious to know if there is anyway it could be optimised further.
private static boolean isCollision(Point2D p1, float r1, Point2D p2, float r2)
{
float a,dx, dy;
a = (r1+r2) * (r1+r2);
dx = (float) (p1.getX()...
How do I generate circular image thumbnails using PIL?
The space outside the circle should be transparent.
Snippets would be highly appreciated, thank you in advance.
...
Like you already know, websites have certain special chars for passwords, like stars and circles.
Could this be possible in a batch file, on the following one:?
If this is not possible, if you type it in, could you just see nothing?
set pass=
set /p pass=Enter your password:
if {%pass%}=={} goto :begin
set authenticated=
for /f "toke...
I'm looking for a way to smoothly increase or decrease the speed of a circular movement.
Using the parametric equation of a circle, I can move an object in a circle over time:
x = center_x + radius * sin(time * speed)
y = center_y + radius * cos(time * speed)
The problem with this approach is that I can't simply do speed = speed + 1 ...
Ok I have 6 custom UIButtons. Their normal state image are all circles images.
They are all spaced out equally but all the circles touch each other.
The problem with the custom UIbutton (which has a circle image on it), is that the hit area of that button is square, and the corners of this square overlaps the hitarea of the other custom...
I'm making a game where all movement is grid based. I also wan't to make entities that can travel around in a circle. So does anyone have any suggestions for creating a circle out of a grid of squares (like the way MS Paint uses the circle tool to make a circle out of square pixels).
...
Is there a reasonably straightforward way to copy a circular area from one image resource to another? Something like imagecopymerge except with circles or ovals etc?
If possible, I want to avoid having to use pre-created image files (any oval shape should be possible), and if there's transparency colours involved they should naturally le...
I have a line from A to B and a circle positioned at C with the radius R. This is in two dimensions.
Which is a good algorithm to use to check whether the line intersects the circle? And at what coordinate along the circles edge it occurred?
...
Is it possible to draw a filled circle with cocos2d ?
An outlined circle can be done using the drawCircle() function, but is there a way to fill it in a certain color? Perhaps by using pure OpenGL?
...
I have tried using the method drawOval with equal height and width but as the diameter increases the circle becomes worse looking. What can I do to have a decent looking circle no matter the size. How would I implement anti-aliasing in java or some other method.
...
hi guys,
i'm trying to set the size of the nodes this way:
controller[shape=circle,width=.5,label="Controller",style=filled,fillcolor="#8EC13A"];
But all three nodes are with different size. How can i set fixed size?
...
I have a bit of a problem. I am trying to do the following using Javascript & the Google Maps API v2:
I can draw individual circles just fine using formulas found all over the Internet. The problem I am facing is that the circles must:
A. Be concentric, and
B. Must have different radius for each "quadrant", i.e., NE, NW, SE & SW
I'...
Suppose I have some 1000 odd points on a plane.
Then, what I think could be done is to discard the points that do not affect the radius of the circle in any way - the points through which the convex hull does not pass [using one of the several algorithms]. This leaves us with points that do matter.
Now from here on, what can be done to...
I need an algorithm to figure out if one angle is within a certain amount of degrees from another angle.
My first thought was (a-x < b) && (a+x > b), but it fails when it has to work with angles that wrap around from -179 to 180.
In the diagram above, the region (green) that the angle must be between wraps between the negative and po...
We have a point (x,y) and some other points (xi,yi). How can we determine wich of (xi,yi) points are within a circle with center (x,y) and radius d (a given number)
Thanks
...
sorry but i need help
how to differentiate between circle rectangle and triangle in black and white images-bitmaps-
...
we have some x, y start point and some circle radius.
We have some engen that can create path from bezier curve points.
How to create circle with Bézier curves?
...
The function below creates a polygon square out of 4 points and I assume the last 5th point closed the squar, I need it to have at least 24 points and to make up a circle. Any ideas?
function getRadius($point="POINT(-29.8368 30.9096)", $radius=2)
{
$km = 0.009;
$center = "GeomFromText('$point')";
$radius = $radius*$km;
...