circle

How would one make this shape in an HTML5 canvas?

Hello, I'm wonder how you would go about and create a shape similar to this one below in HTML5 Canvas. It's more or less a cropped circle I guess, though my need would render it a synch different. context.fillStyle = "#000"; context.beginPath(); context.arc(200,200,100,0,Math.PI*2,true); context.closePath(); context.fill(); Now to c...

Calculate point and circle segment collision

If I have calculated an intersection point between a line segment and a circle, how can I tell whether or not this intersection point lies on a segment of the circle? I have the equations to tell whether or not a line segment intersects with the circle, and I also have the intersection point on that circle, but what I need to know is w...

Making a circle out of . (periods)

I am trying to make a function that will draw a circle out of periods with only being given a starting x and y and a radius. Is it possible? I would like to have the full code for it will an explanation for how it works; I've been trying this for 1 year now and I still can't fathom how it may be done. ...

drawing circle in flex

I'm using flex sdk and trying to draw primitive geometry figures, what is wrong in following code? i tried without the trigger(placing) of button, but did not work. <mx:Script> import flash.display.Sprite; import flash.display.Shape; private function draw_circle():void { var myCircle:Shape = new Shap...

Continuous circle-point collision detection and response still allows intersections

I'm developing a game where I need to do collision detection between a mobile circle and a stationary point. I am using a continuous method. I detect if the circle will hit the point before moving it, get the time of intersection, move the circle, then give the circle a new velocity vector. In my case, the new vector pushes the circle...

Drawing a circle on the canvas using mouse events

I am trying to draw a circle using mouse on the canvas using mouse events, but it does not draw anything: tools.circle = function () { var tool = this; this.started = false; this.mousedown = function (ev) { tool.started = true; tool.x0 = ev._x; tool.y0 = ev._y; ctx.moveTo(tool.x0,tool.y0); }; this.mousemove = function (ev) { var center...

Hide a circle along with the binded marker

Hi! I'm working with Google Maps v3 and I use the MarkerManager to hide the markers on a certain zoom level. I bind circle objects to these markers. Anyway, they aren't hided when the markers are. How can I bind the circles to hide with the markers? The binding: var marker = new google.maps.Marker({ position: new google.maps.LatLng(l...

Maximum packing of rectangles in a circle

I work at a nanotech lab where I do silicon wafer dicing. (The wafer saw cuts only parallel lines) We are, of course, trying to maximize the yield of the die we cut. All the of die will be equal size, either rectangular or square, and the die are all cut from a circular wafer. Essentially, I am trying to pack maximum rectangles into a ci...

points inside a circle in Gmap v3

I draw a circle centered at any point. Now i want to show all point markers within that circuller region. I used circle.getBounds() and then contains() method, but it shows some of points outside of circle also(latlngBounds type). I also dont want to use mathematical functions that uses sin(lat)...cos(..) things because i think it will s...

How to calculate points of Chord

Hi, I need to calculate a chord`s starting and ending point, now I have the starting point which lies on the circumfrence of the circle and I also have the angle between starting point and ending point, but I cannot seem to find a way to determine the end of point of chord as it should lie on the circumfrence , I also have the centre an...

Math Equations for Random Snow in a Snow Globe

I've been experimenting with this and I haven't been able to come up with an adequate solution. Hoping one of you Mathletes can point me in the right direction. I'm building a Snow Globe in ActionScript 3 and I need to come up with a set of equations to control two level of snowflakes - one level random, and the other interactive where ...

How to copy pixels from one bitmap to another shaped like a circle ?

I am using setPixel and getPixel functions but they are using matrices which is naturally rectangle.I am trying to copy pixels shaped like circle ! update : now i am using this but i hope there is something more efficient than this one : for(int i=0;i<eHeight ; i++) for(int j=0;j<eWidth ; j++) if( Math.pow((i-eHeigh...