Search Results

Search found 902 results on 37 pages for 'circle'.

Page 12/37 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Extracting attribute data from a raster

    - by user308827
    Hi, I have a raster file (basically 2D array) with close to a million points. I am trying to extract a circle from the raster (and all the points that lie within the circle. Using ArcGIS is exceedingly slow for this. Can anyone suggest any image processing library that is both easy to learn and powerful and quick enough for something like this? Thanks!

    Read the article

  • bearing in iphone

    - by Jaimin
    i want to make a compass bearing in iphone. like there will be a circle in the corner and it will have 'v' shape drawn inside. so when i start my camera and move than i shlould see the markers... but my first question is a) how to make that circle in the corner whose center will be my current location. so now if i find any point at particular lat long than it should appear as dot in the quadrant.

    Read the article

  • Extract points within a shape from a raster

    - by user308827
    Hi, I have a raster file (basically 2D array) with close to a million points. I am trying to extract a circle from the raster (and all the points that lie within the circle. Using ArcGIS is exceedingly slow for this. Can anyone suggest any image processing library that is both easy to learn and powerful and quick enough for something like this? Thanks!

    Read the article

  • Finding a simple object in a low-quality image

    - by Ramon Snir
    Hi, I want to do this thing in C# (or any other .NET language), not sure how: I have an image I captured from webcam and I want to find a specific simple object in it (let's say a red circle with a black square in it). The red circle can be a bit different from time to time (because of shadows) and the square might be also a bit brighter sometimes and even rotated a bit. Please help me!

    Read the article

  • Setting the origin to center of the screen instead of the top left screen?(iPhone)

    - by thyrgle
    Hi, I am working on an iPhone app and I am trying to make something that has to do with line-circle collision detection. I am using the slope of the line and checking if the coordinates of a circle suffice the equation y = mx + b. But, with the current origin (0,0) at the top left it is a pain to get the slope. Any way I can convert the coordinates so the origin is in the center of the screen?

    Read the article

  • How to smooth the edge of a zig-zag line?

    - by Horace Ho
    Currently I draw a zig-zap line by CGContextMoveToPoint, CGContextAddLineToPoint, and CGContextStrokePath, following touchesMoved events. How can I smooth the edges of the line? Such that when the user draw a circle-like shape, the circle can be more round'ed. The GLPaint example use OpenGL, is that the only way to do it?

    Read the article

  • UITableViewCell with 'ball' like calendar App

    - by Stuart Tevendale
    in the iPhone Calendar app, the view to select the calendar for a particular event has a coloured circle next to the calendar name, drawn with a graduated/3D effect of a ball. Does anyone have any sample code for how this is drawn - I can draw a solid circle in the UITableViewCell, but I'm not sure how to get the 3D effect. Thanks.

    Read the article

  • iphone mapview current location

    - by satyam
    I'm able to show current location on mapview. It shows round blue color circle. When I click on the circle, it shows "Current Location". I want to show users current location as green pin. on click of pin, i want to show "My Location" annotation. How to do it. Please suggest me how to do it.

    Read the article

  • How is location accuracy measured in Android?

    - by John Palmer
    Does anyone know the proper interpretation of the accuracy measurements returned by getAccuracy()? For instance, are they calculated as: Circular Error Probability (meaning, if i understand correctly, radius of a 50% confidence circle)? Radius of 95% confidence circle? something else? Many thanks for any advice you can give me.

    Read the article

  • Can we find out the difference between 2 RGb colors to find out a 3rd color?

    - by AK
    2 colors are mixed together. If i have the RGB for the resultant color and RGB for one of the colors mixed, then somehow i could calculate the 2nd color? I will try to explain visually what i am trying to say. Here is a flickr link http://www.flickr.com/photos/48150615@N08/4407414157 I know that the circle in the middle has an opacity of 20% Is there any way to know the color value of the circle so that i can deduct that to get the same color value as the background color.

    Read the article

  • Generics and Derived Classes .NET 3.5

    - by Achilles
    Consider the following where class "Circle" inherits from "Shape": dim objListOfCircles as new List(of Circle) DrawShapes(objListOfCirlces) Private sub DrawShapes(byref objListOfShapes as List(of Shape)) for each objShape as Shape in objListOfShapes objShape.Draw() next end sub I can't get this to work. What is the explaination as to why this doesn't work?

    Read the article

  • how to capture the right click event using getMouse()

    - by Leyond
    I am trying to use graphics.py to write a user graphics interface. The problem is that how can I capture the right click event? It seems that the function getMouse() could just returns where the mouse was left-clicked as a Point object. from graphics import * def main(): win = GraphWin("My Circle", 100, 100) c = Circle(Point(50,50), 10) c.draw(win) win.getMouse() # pause for click in window win.close() main() I want to know how can I capture the right-click event in the window, thanks.

    Read the article

  • printing the instance in Python

    - by kame
    Hello! With this code: class Complex: def __init__(self, realpart, imagpart): self.real = realpart self.imag = imagpart print self.real, self.imag class Circle: def __init__(self, radius): print "A circle wiht the radius", radius, "has the properties:" print "circumference =", 3.14*radius print "area =", 3.14*radius**2 I get this output: >>> Complex(3,2) 3 2 <__main__.Complex instance at 0x01412210> But why does he print the last line?

    Read the article

  • Create a Search Filter List in Google Chrome

    - by Asian Angel
    Are you tired of unwanted and/or non-relevant results cluttering up the search results at Bing, Yahoo, and Google? With the Search Filter extension for Chrome you can easily remove the unwanted “chaff” from your search results. Note: The extension only works on Bing, Yahoo, and Google at this time. Before For our example we conducted a search for “anime wallpapers” at Yahoo Singapore, Bing Singapore, and Google. In each set of results we decided to focus on results that would display either a yellow or red warning color from WOT. You can see our targeted result for Yahoo Singapore… The one for Bing Singapore… And the targeted result from Google. Search Filter in Action As soon as you install the extension you should take a quick look at the “Options”. At first the “Filters List Area” will be empty but will not remain so for long as you create your own filter list. The second part may or may not be of interest to you…the ability to opt into the filter service. If you opt in your filter list will be connected to your “Google Account” and will be available on any of your Chrome installs with the extension installed (and set to “Opt In”). Keep in mind that if you choose this option the filter list that you create will be aggregated anonymously and have a GUID number attached to it. After installing the extension we refreshed each of our three search pages…notice the small red circle button beside each search result link. Clicking on the red circle button will cause the entire browser window area to “shade out” temporarily while you decide between adding that website to the filter list or cancelling the action. If you add a website to the filter list that result will immediately disappear from the search results list without refreshing the webpage. Looks like we have another website at the bottom that we could add to the filter list… Click, click, click! After adding one website from each of the three search services you can see that our filter list has gotten off to a nice start. If for some reason you accidentally add a website to the list or change your mind about a website simply click on the red circle button to remove that particular listing. Conclusion If you are looking for an easy way to create a search filter list then this is definitely an extension that is worth taking the time to look at. Links Download the Search Filter extension (Google Chrome Extensions) Visit the Search Filter Hub Website to View Lists of Filtered Sites Similar Articles Productive Geek Tips How to Make Google Chrome Your Default BrowserGeek’s Spam Filter – Updated to Version 0.2Access Wolfram Alpha Search in Google ChromeGain Access to a Search Box in Google ChromeGeek’s Spam Filter – Updated to Version 0.3 TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 PCmover Professional Scan News With NY Times Article Skimmer SpeedyFox Claims to Speed up your Firefox Beware Hover Kitties Test Drive Mobile Phones Online With TryPhone Ben & Jerry’s Free Cone Day, 3/23/10 New Stinger from McAfee Helps Remove ‘FakeAlert’ Threats

    Read the article

  • Cocos2d Box2d how to shoot an object inside the screen

    - by Ahoura Ghotbi
    I have the code below : - (id) initWithGame:(mainGame*)game { if ((self = [super init])) { isTouchEnabled_ = YES; self.game = game; CGSize size = [[CCDirector sharedDirector] winSize]; screenH = size.height; screenW = size.width; character = [CCSprite spriteWithFile:@"o.png"]; character.position = ccp( size.width /2 , size.height/2 ); character.contentSize = CGSizeMake(72, 79); [self addChild:character z:10 tag:1]; _body = NULL; _radius = 14.0f; // Create ball body and shape b2BodyDef ballBodyDef; ballBodyDef.type = b2_dynamicBody; ballBodyDef.position.Set(100/PTM_RATIO, 100/PTM_RATIO); ballBodyDef.userData = character; _body = _game.world->CreateBody(&ballBodyDef); b2CircleShape circle; circle.m_radius = 26.0/PTM_RATIO; b2FixtureDef ballShapeDef; ballShapeDef.shape = &circle; ballShapeDef.density = 1.0f; ballShapeDef.friction = 0.2f; ballShapeDef.restitution = 0.8f; _body->CreateFixture(&ballShapeDef); [self schedule:@selector(gameChecker:)]; [self schedule:@selector(tick:)]; } return self; } - (void)gameChecker:(ccTime) dt{ if(character.position.y > 200){ [self unschedule:@selector(tick:)]; [self schedule:@selector(dropObject:)]; } } - (void)tick:(ccTime) dt { b2Vec2 force; force.Set(_body->GetLinearVelocity().x, _body->GetLinearVelocity().y+1.0f); for (b2Body* b = _game.world->GetBodyList(); b; b = b->GetNext()) { if (b->GetUserData() == character) { b->SetLinearVelocity(force); } } _game.world->Step(dt, 10, 10); for(b2Body *b = _game.world->GetBodyList(); b; b=b->GetNext()) { if (b->GetUserData() != NULL) { CCSprite *ballData = (CCSprite *)b->GetUserData(); ballData.position = ccp(b->GetPosition().x * PTM_RATIO, b->GetPosition().y * PTM_RATIO); ballData.rotation = -1 * CC_RADIANS_TO_DEGREES(b->GetAngle()); } } } -(void)dropObject:(ccTime) dt{ b2Vec2 force; force.Set(_body->GetLinearVelocity().x, _body->GetLinearVelocity().y-1.0f); for (b2Body* b = _game.world->GetBodyList(); b; b = b->GetNext()) { if (b->GetUserData() == character) { b->SetLinearVelocity(force); } } _game.world->Step(dt, 10, 10); for(b2Body *b = _game.world->GetBodyList(); b; b=b->GetNext()) { if (b->GetUserData() != NULL) { CCSprite *ballData = (CCSprite *)b->GetUserData(); ballData.position = ccp(b->GetPosition().x * PTM_RATIO, b->GetPosition().y * PTM_RATIO); ballData.rotation = -1 * CC_RADIANS_TO_DEGREES(b->GetAngle()); } } } I have been trying to get the effect that fruit ninja has when shooting the fruits. but it seems like its hard to get such animation so I was wondering if anyone can point me to the right direction and/or give me a sample code for a single object that gets thrown into the screen with a direction.

    Read the article

  • Need help regarding one LALR(1) parsing.

    - by AppleGrew
    I am trying to parse a context-free language, called Context Free Art. I have created its parser in Javascript using a YACC-like JS LALR(1) parser generator JSCC. Take the example of following CFA (Context Free Art) code. This code is a valid CFA. startshape A rule A { CIRCLE { s 1} } Notice the A and s in above. s is a command to scale the CIRCLE, but A is just a name of this rule. In the language's grammar I have set s as token SCALE and A comes under token STRING (I have a regular expression to match string and it is at the bottom of of all tokens). This works fine, but in the below case it breaks. startshape s rule s { CIRCLE { s 1} } This too is a perfectly valid code, but since my parser marks s after rule as SCALE token so it errors out saying that it was expecting STRING. Now my question is, if there is any way to re-write the production rules of the parser to account for this? The related production rule is:- rule: RULE STRING '{' buncha_replacements '}' [* rule(%2, 1) *] | RULE STRING RATIONAL '{' buncha_replacements '}' [* rule(%2, 1*%3) *] ; One simple solution I can think of is create a copy of above rule with STRING replaced by SCALE, but this is just one of the many similar rules which would need such fixing. Furthermore there are many other terminals which can get matched to STRING. So that means way too many rules!

    Read the article

  • Smoothing touch-based animation in iPhone OpenGL?

    - by quixoto
    I know this is vague, but looking for general tips/help on this, as it's not an area of significant expertise for me. I have some iPhone code that's basically an EAGL view handling a single touch. The app draws (using GL) a circle via triangle fan at the touch point, and moves it when the user moves the touch point, and re-renders the view then. When dragging a finger slowly, the circle keeps up and consistent with the finger as it moves. If I scribble my finger quickly back and forth across the screen, the rendering doesn't keep up with the touch motion, so you see an optical illusion of "multiple" discrete circles on the screen "at once". (Normal persistence of vision illusion). This optical illusion is jarring. How can I make this look more natural? Can I blur the motion of the circle somehow? Is this result the evidence of some bad frame rate issue? I see this artifact even when nothing else is being rendered, so I think this might just be as fast as we can go. Any hints or suggestions? Much appreciated. Thanks.

    Read the article

  • d3.js force layout increase linkDistance

    - by user1159833
    How to increase linkDistance without affecting the node alignment, example: http://mbostock.github.com/d3/talk/20110921/force.html when I try to increase the circle radius and linkDistance the it collapse <script type="text/javascript"> var w = 1280, h = 800, z = d3.scale.category20c(); var force = d3.layout.force() .size([w, h]); var svg = d3.select("#chart").append("svg:svg") .attr("width", w) .attr("height", h); svg.append("svg:rect") .attr("width", w) .attr("height", h); d3.json("flare.json", function(root) { var nodes = flatten(root), links = d3.layout.tree().links(nodes); force .nodes(nodes) .links(links) .start(); var link = svg.selectAll("line") .data(links) .enter().insert("svg:line") .style("stroke", "#999") .style("stroke-width", "1px"); var node = svg.selectAll("circle.node") .data(nodes) .enter().append("svg:circle") .attr("r", 4.5) .style("fill", function(d) { return z(d.parent && d.parent.name); }) .style("stroke", "#000") .call(force.drag); force.on("tick", function(e) { link.attr("x1", function(d) { return d.source.x; }) .attr("y1", function(d) { return d.source.y; }) .attr("x2", function(d) { return d.target.x; }) .attr("y2", function(d) { return d.target.y; }); node.attr("cx", function(d) { return d.x; }) .attr("cy", function(d) { return d.y; }); }); }); function flatten(root) { var nodes = []; function recurse(node, depth) { if (node.children) { node.children.forEach(function(child) { child.parent = node; recurse(child, depth + 1); }); } node.depth = depth; nodes.push(node); } recurse(root, 1); return nodes; } </script>

    Read the article

  • ActionScript - clicking and determining the sprite's class

    - by TheDarkIn1978
    i'd like to add all or most of my mouse events to stage, but in order to do that i need to be able to tell what is the type of the sprite being clicked. i've added two sprites to the display list, one of which is from a class called Square, the other from a class called Circle. var mySquare:Sprite = new Square(); var myCircle:Sprite = new Circle(); addChild(mySquare); addChild(myCircle); now when i click on these sprites, i'd like to know from which class they are from, or which type of sprite it is. //mousePoint returns mouse coordinates of the stage var myArray:Array = stage.getObjectsUnderPoint(mousePoint()); if (myArray[myArray.length - 1] is Sprite) ... so far i know how to do is determine if it IS a sprite display object, but since i'll only be working with sprites i need something more specific. rather than checking "is Sprite", is there a way i can check "is Square" or "is Circle"? if (myArray[myArray.length - 1] is Square)

    Read the article

  • Plotting an Arc in Discrete Steps

    - by phobos51594
    Good afternoon, Background My question relates to the plotting of an arbitrary arc in space using discrete steps. It is unique, however, in that I am not drawing to a canvas in the typical sense. The firmware I am designing is for a gcode interpreter for a CNC mill that will translate commands into stepper motor movements. Now, I have already found a similar question on this very site, but the methodology suggested (Bresenham's Algorithm) appears to be incompatable for moving an object in space, as it only relies on the calculation of one octant of a circle which is then mirrored about the remaining axes of symmetry. Furthermore, the prescribed method of calculation an arc between two arbitrary angles relies on trigonometry (I am implementing on a microcontroller and would like to avoid costly trig functions, if possible) and simply not taking the steps that are out of the range. Finally, the algorithm only is designed to work in one rotational direction (e.g. counterclockwise). Question So, on to the actual question: Does anyone know of a general-purpose algorithm that can be used to "draw" an arbitrary arc in discrete steps while still giving respect to angular direction (CW / CCW)? The final implementation will be done in C, but the language for the purpose of the question is irrelevant. Thank you in advance. References S.O post on drawing a simple circle using Bresenham's Algorithm: "Drawing" an arc in discrete x-y steps Wiki page describing Bresenham's Algorithm for a circle http://en.wikipedia.org/wiki/Midpoint_circle_algorithm Gcode instructions to be implemented (see. G2 and G3) http://linuxcnc.org/docs/html/gcode.html

    Read the article

  • Controlling the alpha of a UIImageView with Slider ..Can' t get it

    - by user1824839
    first i' d like to say this Forum was really helpfull for me that just started coding some weeks ago .. I succeed to do a quite nice app for the moment , than, but i m stuck on this : HOW COULD I CONTROL THE ALPHA OF A UIIMAGEVIEW , WITH A SLIDER EMBEDED IN ANOTHER VIEW ??? ; Basically i' like to do like the alpha slider of this : http://www.edumobile.org/iphone/how-to-make-an-app-2/controlling-a-uiviews-properties-for-ipad/ , but for a UIImageView. I promised i searched for hours , and didnt find how to do it ... Could someone have some minutes to give me ideas ?? Sorry for my poor english too. Thanks if you can. L. The resume of the link i posted, only focussing on the alpha property would be : ( considering a UIView ( View ) embeded in a ViewController ( ViewController ): enter code here ----View.h----- @interface View : UIView @property ( nonatomic, assign ) CGFloat alpha; @end enter code here ----View.m---- @implementation View @synthesize alpha; ?} @end enter code here ------ViewController.h----- import "View.h" @interface ViewController : UIViewController @property (nonatomic, strong) IBOutlet View *view; ?- (IBAction)alphaChanged:(UISlider *)sender; @end enter code here -------ViewController.m------ @interface ViewController () @end @implementation ViewController @synthesize view; (View *)view {?     if (!view) {?        view = [[View alloc] init];?    }?    return view;?} enter code here (IBAction)redChanged:(UISlider *)sender? {?    self.circle.alpha = sender.value;?    [self.circle setNeedsDisplay];?} (void)viewDidLoad ?{?    [super viewDidLoad];?         ?    self.circle.alpha = (CGFloat)1;?} (void)didReceiveMemoryWarning? {?  [super didReceiveMemoryWarning];?    @end enter code here

    Read the article

  • How to refresh/redraw the screen (not the program window)

    - by mohrphium
    I'm having a bit of a hard time figuring out, how to remove a drawn ellipse after it has been drawn somewhere else. I need a circle to follow my mouse all the time and this is all the program should do. I get the mousepositions and draw my circle but how can I remove the last one? #include <Windows.h> #include <iostream> void drawRect(int a1, int a2){ HDC screenDC = ::GetDC(0); //Draw circle at mouse position ::Ellipse(screenDC, a1, a2+5, a1+9, a2+14); ::ReleaseDC(0, screenDC); //::InvalidateRect(0, NULL, TRUE); //<- I tried that but then everything flickers //Also, the refresh rate is not fast enough... still some circles left } int main(void) { int a1; int a2; bool exit=false; while (exit!=true) { POINT cursorPos; GetCursorPos(&cursorPos); float x = 0; x = cursorPos.x; float y = 0; y = cursorPos.y; a1=(int)cursorPos.x; a2=(int)cursorPos.y; drawRect(a1, a2); } } I am working with graphics and all that stuff for the first time. Im kinda stuck here... once again. Thanks.

    Read the article

  • What is the error in this java code ? What changes should I do to remove it ?

    - by mekasperasky
    import javax.swing.*; // For JPanel, etc. import java.awt.*; // For Graphics, etc. import java.awt.geom.*; // For Ellipse2D, etc. public class ShapeExample extends JPanel { private Ellipse2D.Double circle = new Ellipse2D.Double(10, 10, 350, 350); private Rectangle2D.Double square = new Rectangle2D.Double(10, 10, 350, 350); public void paintComponent(Graphics g) { clear(g); Graphics2D g2d = (Graphics2D)g; g2d.fill(circle); g2d.draw(square); } // super.paintComponent clears offscreen pixmap, // since we're using double buffering by default. protected void clear(Graphics g) { super.paintComponent(g); } protected Ellipse2D.Double getCircle() { return(circle); } public static void main(String[] args) { WindowUtilities.openInJFrame(new ShapeExample(), 100, 100); } } The error I am getting is this . symbol : variable WindowUtilities location: class ShapeExample WindowUtilities.openInJFrame(new ShapeExample(), 100, 100); ^ 1 error What is wrong in the code? r

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >