FAQ Database Discussion Community

## Get angle in terms of 360 degrees

javascript,circle,angle
I would like to get an angle in terms of 360 degrees... for my game, I need to know which direction the player is heading in... The code here gets the proper angles, but only in terms of 90 degree increments: (meaning, when I click in upper left quadrant, I...

## Plotting random signal on circle

matlab,plot,signals,circle
I have some random signal (for example sin signal) with the time scale. t=0:0.1:2*pi y=sin(t) plot(t,y) Now I want to draw this signal on this circle. So the time vector actually becomes an envelope of the circle. Envelope of the circle represents "y = 0" in cartesian coordinate system. Here...

## Why is my ball not round with arc?

javascript,canvas,circle
I am trying to make a little game in javascript. But now at the start my circle is not round... I don`t know what to do after searching for 20 min. on the internet. Hopefully you guys can help me. My question is: Why is my circle not perfect round?...

## Moving circle changing color in javafx

java,javafx,circle
I want my ball to change color everytime i click on it, but i wont get it to work. Also im wondering about the movement of my ball. I wonder how you can change the path its going. so it can down up and down and other ways instead of...

## Can I divide the circle which create by using div and border-radius into 6 equal parts and get that points coordinates?

javascript,jquery,html,css,circle
I want to divide circle (created by using div and border-radius) into 6 equal parts and place lines (created by using li tag) to equal parts over the circle like this; <div class="circle"> <ul class="lines"> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> </div> .circle { width: 280px; height: 280px; border-radius:...

## Working with coordinates x y

c++,function,structure,coordinates,circle
I need to read from a file coordinates of points. The file looks like this: x0 y0 x1 y1 .... Then find center and diameter of the smallest enclosing circle. But I stucked in the beginning. I don't know how to hold coordinates and decided to choose array of structures....

## JavaFX, Can you bind property of an moving circle?

java,binding,properties,javafx,circle
So i got one moving circle on a timeline. And im trying to bind it to the screen so when i rezise the screen on the app, i want the ball to scale instead of moving outside the screen. Is that possible? circle.centerXProperty().bind(pane.widthProperty().divide(2)); circle.centerYProperty().bind(pane.heightProperty().divide(2)); circle.radiusProperty().bind(pane.widthProperty().divide(2)); This is the code i...

## SVG circle starting point

javascript,css,svg,rotation,circle
How can I change the starting point of a svg circle for animate it progressively begining at 0 o'clock? the default circle svg begin at 3 o'clock. My current circle ( hover for animation): #timeline{ position:fixed; width:500px; height:500px; top:50%; left:50%; margin-top:-250px; margin-left:-250px; overflow:hidden; pointer-events: all; z-index:99999; } #bluecircle{ stroke-dasharray:1510; stroke-dashoffset:1510;...

## Hide part of line from an arc c#

c#,line,circle
I am trying to draw an arc over a line and have it hide part of a line to look like the line is continuous as follows: http://i188.photobucket.com/albums/z265/fac7orx/hide%20portion%20of%20line1_zpsegcc6vhy.png So far I am drawing a graph, then a line, then the arc. onPaintGraphics.DrawLine(greenPen, (float)point1.X, 320f, point2.X, 0f); //portion of code drawing...

## Masking circle segments in swift

I'm creating a simple player app. There is a circle, that shows a progress of playing a song. What is the best way to draw this circle in Swift and make a mask? I assume I can draw a 2 circles putting the width stroke to the thickness I want...

## Jquery - Load function when page position seen

I begin with jquery and I try to execute a function when my page position is seen. Example with "http://www.jqueryscript.net/demo/Animated-Circle-Statistics-Plugin-With-jQuery-Canvas-Circliful/" : <div id="myStat4" data-startdegree="180" data-dimension="250" data-text="35%" data-info="New Clients" data-width="30" data-fontsize="38" data-percent="35" data-fgcolor="#61a9dc" data-bgcolor="#eee"></div> \$(window).load(function() { \$('#myStat4').circliful(); } But it doesn't work, pourcentage circle are already completed when I scroll to...

## android.support.v4.widget.CircleImageView does not work

android,circle,material-design
when I try to use : android.support.v4.widget.CircleImageView <android.support.v4.widget.CircleImageView android:id="@+id/picture" android:layout_width="100dp" android:layout_height="100dp" android:layout_gravity="center_vertical" android:src="@drawable/ic_bg" /> it makes my app crash how to support new Material Design Widget CircleImageView is there any example use this new widget Logcat java.lang.RuntimeException: Unable to start activity...

## filled semicircle in Matlab

matlab,plot,circle,matlab-figure
Is there some good tip how to plot filled circle about specific point in Matlab? I've found solution for normal circle, but I dont know how fill it. I need this because I should have circle with two different colors on each half of it. Is this possible? Thank you...

## WPF circle progress bar

wpf,progress-bar,circle
I want to replace the regular ProgressBar with circle one and after shot search here in the forum i found what i want. CircularProgressBar.XAML <Grid> <Path x:Name="pathRoot" Stroke="{Binding SegmentColor, ElementName=userControl}" StrokeThickness="{Binding StrokeThickness, ElementName=userControl}" HorizontalAlignment="Left" VerticalAlignment="Top"> <Path.Data> <PathGeometry> <PathGeometry.Figures> <PathFigureCollection> <PathFigure x:Name="pathFigure"> <PathFigure.Segments>...

Does anyone know how I can get the lat and the lng as separate variables using the Google Maps API .getCenter() method For example, I call the following line of code to get the centre of a circle on a map: var circle_centre=selector_circle.getCenter(); The above works fine. Is there a...

## How can I declare a circle as a variable? [closed]

java,variables,graphics,circle
So I'm trying to make a class where I run the java applet and then a garage band like drumset pops up where I can then click the different drums in order to make different sounds. I have the drums set to different circles that I created and I am...

## C# EmguCV - Circle line thickness calculation

c#,circle,emgucv
I want to Circle line thickness calculation like this below: Which method can help me to do so? Thanks for your reply David. I'm new to emgucv. So I do not know where I'll start. I can do the following image using canny edge. But I can not calculate distance,...

## iOS - An easy way to draw a circle using CAShapeLayer

ios,objective-c,circle,uibezierpath,cashapelayer
In questions like How to draw a smooth circle..., ...Draw Circle... and ...draw filled Circles the question and answer is very broad, contains lots of unnecessary steps and the methods used isn't always the easiest to re-create or manage. What is an easy way to draw a circle and add...

## How to model many to many relationships without circles

database,relationship,circle
Note: Because my original question wasn't understood clearly I'm writing it completely new! I have two tables in my database, plus a junction/join table: Recipes: CREATE TABLE Recipes( id INT(11) NOT NULL AUTO_INCREMENT, name VARCHAR(100) NOT NULL, PRIMARY KEY (id) ) Ingredients: CREATE TABLE Ingredients( id INT(11) NOT NULL AUTO_INCREMENT,...

## Generate Macular Grid in Javascript

javascript,automatic-ref-counting,circle,easeljs
How to generate macular grid in Javascript? In Macular grid contains a no.of circles that should in 'V' shape format. Creation of dotted circles in 'V' shape? let us know how to resolve this? To Identify the Macular grid shape, please refer the below link i have added a screenshot....

## calculating angle between two points on edge of circle Swift SpriteKit

swift,circle,angle,degrees
How would you calculate the degrees between two points on the edge of a circle in Swift. ...

## for loop does not “grow” the circle. I need to “grow” a circle

java,android,animation,android-canvas,circle
I am trying to write an android application that draws Circles at random positions over and over forever. This is already done in my code. The next objective for me is to slowly animate these circles to make them "grow" onto the screen. Basically increment the radius of the circle...

## Libgdx falling circles

java,libgdx,circle
I am working on a libgdx game and am having a certain problem. I am trying to constantly generate random coordinates (above the screen) and for each coordinate, draw a circle. Then add to their y-coordinates so they will have a falling effect. Once a circle is off the screen,...

## Traverse Pixels in a circle from the center

c#,.net,algorithm,circle
I need an algorithm like Bresenham's circle algorithm, but with some modifications. The algorithm must visit all pixels in the radius (so essentially a fill). The algorithm must start from the center of the circle It must visit all points that would normally be visited (no holes) It must visit...

## WPF how to put label in the middle of circle

wpf,circle,textblock
I have WPF application and Circle ProgressBar: <Grid> <Path x:Name="pathRoot" Stroke="{Binding SegmentColor, ElementName=userControl}" StrokeThickness="{Binding StrokeThickness, ElementName=userControl}" HorizontalAlignment="Left" VerticalAlignment="Top" Height="100" Width="100"> <Path.Data> <PathGeometry> <PathGeometry.Figures> <PathFigureCollection> <PathFigure x:Name="pathFigure"> <PathFigure.Segments> <PathSegmentCollection> <ArcSegment x:Name="arcSegment"...

## Python OpenCV HoughCircles not giving good results

python,opencv,circle,contour
I need to do quick and accurate circle detection so I figured that using OpenCV's Hough Circle would be a good choice. Unfortunately, no matter how good an image I give it and how much I adjust the parameters, it refuses to detect all of the circles in an image....

## Make UIView a Circle in Swift [duplicate]

This question already has an answer here: How to make a circular UIView 6 answers I have tried Googling my problem but cannot seem to find anything anywhere! Basically I have a UIView which retrieves a Users Facebook Photo once they log into my app. At the moment it...

## How to draw Circles in an Arc?

javascript,svg,d3.js,circle
I'm trying to make an arc and fill it with small circles, but I can't add circle in path tag.I have to draw 10 rows of circles inside an Arc that each row contains 10 circles.The circles should be like Tilford Tree,Visit http://bl.ocks.org/mbostock/4063550. Does anyone know what I'm doing wrong?...

## Using aggregate with a complex FUN argument

r,aggregate,circle
I am interested in calculating hourly averages. In the past I have had success using the aggregate function like so: Time<-c("1:00","1:20","1:40","2:00","2:20","2:40","3:00","3:20","3:40","4:00","4:20","4:40") Hour<-c(1,1,1,2,2,2,3,3,3,4,4,4) Bearing<-c(10,20,30,350,3,20,170,195,200,300,20,50) DF<-data.frame(Time,Hour,Bearing) ByHR<-aggregate(.~Hour,data=DF,mean) In this way, I get an hourly average of my Bearing data. But now I want to use the circ.mean() function to calculate means of...

## Making an ArrayList containing objects (Ellipses, Rectangles etc.)

java,arraylist,javafx,circle,ellipse
I am creating a program for a school project where the user can create a geometrical shape (which is supposed to look like a horse) using buttons which control the size and color of: One Ellipse, one Circle, two Rectangles and one String (as a title for the figure). To...

## How to display polygons that are within a specific range (circle) using Leaflet

mongodb,leaflet,polygon,openstreetmap,circle
I am trying find a solution on how to display polygons that are only within a specific range, a circle with radius using leaflet. Polygons screenshots Before, I have ask for help regarding on the display of points within a specific range but this time, since a polygon have many...

## How to know radius while drawing a circle on Google Maps

What I have : As per Google suggestion we have used MVC object and the events DistanceWidget & RadiusWidget to display the radius while re-sizing the circle which is working fine for existing circle (circle drawn by DistanceWidget). Fiddle Demo What I need : I need to show the radius...

## How to get CAShapeLayer() circle to resize based on the size class

ios,swift,circle,cashapelayer,size-classes
I'm trying to create a circle using CGPoint and CGFloat. But I want the circle to be different in siz based on which device is used. I changed all my Size classes to reflect the sizes I want and I was hoping, it would recognise that but it doesn't. WhiteBar...

## Python, Circular Shortest Path [closed]

python,algorithm,circle,shortest-path
I am trying to make strange shortest path finder method. But I don't know how I can. I need a algorithm. I did some research and found some algorithm for finding shortest path, like Dijkstra's algorithm, Floyd–Warshall algorithm, Johnson's algorithm. But I think they don't meet my expectation. I want...

## What is wrong with this CSS background syntax?

css,background,circle
At this link: [http://codepen.io/FelixKiunke/pen/nvDcj][1] you can see that this guy made a nice circle that finishing filling its edges up every 10 seconds. This is what I want to duplicate. I have copied the compiled CSS as well as the HTML from this page and put it in some local...