Search Results

Search found 599 results on 24 pages for 'shapes'.

Page 3/24 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Fitting maximum amount of shapes on a surface

    - by Fuu
    In industry, there is often a problem where you need to calculate the most efficient use of material, be it fabric, wood, metal etc. So the starting point is X amount of shapes of given dimensions, made out of polygons and/or curved lines, and target is another polygon of given dimensions. I assume many of the current CAM suites implement this, but having no experience using them or of their internals, what kind of computational algorithm is used to find the most efficient use of space? Can someone point me to a book or other reference that discusses this subject?

    Read the article

  • what tool should I use for drawing 2d OpenGL shapes?

    - by Kenny Winker
    I'm working on a very simple OpenGL ES 2.0 game, and I'm not sure what tool to use to create the vertex data I need. My first thought was adobe illustrator, but I can't seem to google up any info on how to convert an .ai file to vertices. I'm only going to be using very simple 2d shapes so I wonder if I need to use a 3d modelling program? How is this typically done, when you are working with 2d non-sprite shapes?

    Read the article

  • How to decompose a rectangular shape in a Voronoi diagram, only generating convex shapes?

    - by DevilWithin
    I think this is a very straighforward question, lets say i have a building in 2D, a rectangle shape. Now i want to decompose that area in a lot of convex shapes, as seen in a voronoi diagram, or closely like it, just so I can add those shapes to the physics engine, and have a realistic destruction. Bonus: Possible suggestions on how to make the effect more dynamic and interesting. Please keep in mind we re talking about realtime calculations..

    Read the article

  • add shapes to bing maps from locations stored in a database (bing maps ajax control)

    - by macou
    I am trying to use the Bing Maps Ajax Control to plot pins of locations stored in a database to the bing map on a web page. All the locations are geocoded and the lat longs stored in the database. I am using ASP.NET (C#), but can't figure out or find any tutorials on how to go about doing this. All I can find are articles on how to import shapes into a map from either GeoRSS, Bing Maps, and KML. I have used (and paid for ;o) the excellent control from Simplovations to do alot of what I need to do, namely working with my data as normal in the code behind, getting a DataSet of my locations and plotting the points to the map. It has been great, but I want to know how to do it with out using a third party control. My main reason for wanting this is to be able to cluster my pins and hopefully learn a bit of Javascript along the way. Does anyone know of any tutorials or articles online that can help me on my way. I have been searching the net for hours now and can't find anything :(

    Read the article

  • How to write an intersects for Shapes in android

    - by Rafael T
    I have an written an Object called Shape which has a Point representing the topLeftCorner and a Dimension with represents its width and height. To get the topRightCorner I can simply add the width to the topLeftPoint.x. I use to rotate them on a certain degree around their center. The problem after the rotation is, that my intersects(Shape) method fails, because it does not honor the rotation of the Shapes. The rotation will be the same for each Shape. My current implementation looks like this inside my Shape Object: public boolean intersects(Shape s){ // functions returning a Point of shape s return intersects(s.topLeft()) || intersects(s.topRight()) || intersects(s.bottomLeft()) || intersects(s.bottomRight()) || intersects(s.leftCenter()) || intersects(s.rightCenter()) || intersects(s.center()); } public boolean intersects(Point p){ return p.x >= leftX() && p.x <= rightX() && p.y >= topY() && p.y <= bottomY(); } Basically I need functions like rotatedLeftX() or rotatedTopRight() to work properly. Also for that calculation I think it doesn't matter when the topLeft point before a rotation of ie 90 will turn into topRight... I already read this and this Question here, but do not understand it fully.

    Read the article

  • Unable to locate a specific shape in Visio

    - by Gnanam
    I'm trying to create (convert) a Visio architecture diagram from an existing image which is available in the format of JPG extension. My question is, in this complete architecture diagram which I'm trying to convert, there is one specific shape/symbol which I couldn't able to locate/find in the Visio stencil. Can somebody help me in locating this shape/symbol either inside Visio stencil or from any external stencils/symbols? NOTE: I'm using Visio Professional 2013.

    Read the article

  • Excel 2003 VBA : how to paste a shape after selection

    - by Justin
    Just wondering how I can paste an object after I have selected it: sheet1.shapes("MyShape").select With Selection basically jsut wondering how to duplicate a shape object, or any object really. Eventually I am looking to use code to copy a shape object like above from Excel, and paste it into an access form automatically. Thanks!

    Read the article

  • How to protect custom shapes from being reused? Visio 2010

    - by Chris
    We are building a set of documentation for our business with Visio 2010. We need to make the Visio files accessible to external consultants for review, but we want to ensure that they cannot copy any of our custom shapes or formulas. How can we protect custom shapes/stencils so that they cannot be used outside of our documents? Or, if that's not possible, how can we mark our shapes in such a way that we could prove that they were created by us?

    Read the article

  • Flex: drawing a connector line between shapes

    - by artemb
    Hi! I am building a diagramming tool using Adobe Flex 3. I am about to implement connector lines and I have a question. Imagine I have 2 squares at random positions on the canvas. I need to draw an arrowed connector line between them. I need it to tend to the target square's center but end on its border. How do I find out the exact points between which to draw the line? Thank you

    Read the article

  • Drawing Shapes in Flex 4/AS3 addchild issues

    - by Parris
    Hi All, I am simply trying to draw a rectangle inside of a panel using flex4. I am using spark instead of mx. It complains about addchild being replaced by addelement; however, addelement expects type ivisualcomponent. I think sprite should be of that type; however, it reports an error when trying to use the below code... I have tried a few different ways. I think I am missing something very basic about flex 4. Any enlightenment would be much appreciated! :-D private function drawRectangle(e:MouseEvent):void{ var s:Sprite = new Sprite(); s.graphics.beginFill(0x00ff00, 0.5); s.graphics.drawRect(e.localX,e.localY,50,50); s.graphics.endFill(); canvas.addChild(s); }

    Read the article

  • OCR: How to improve accuracy - existing libraries for removing non-text 'furniture', shapes, etc to

    - by Rob
    I want to remove rectangles etc that enclose text in a screenshot image, so that I can perform optical character recognition to get accurate text from the screenshot. Background: I doing this to extract data from a legacy application for use with other applications. This is the only way to get at this data as associated files are in a closed, proprietary, binary format. I will be using AutoItScript to drive the application to show data in its UI, then I will screenshot this and feed this to tesseract. I've already had some success in automating the UI, and have been able to use tesseract to get plain ascii text out of the bitmap. There are several AutoItScripr forum articles discussing its use with tesseract/OCR but not specifically for my question. http://www.autoitscript.com/forum/index.php?s=6c32c3ece12756e635a619cdf175eff9&showforum=2 What I need to do There are thin, 1-pixel wide rectangles that closely enclose some text, when fed to tesseract, it sees them as I for example for a verticle line of the rectangle. Any thoughts on how to remove the rectangles, or best practices? I'm asking if there is a generic command line based toolset to overwrite rectangles, for example, in .png files. I could then pass the .png through this, then pass it to tesseract. Details on the tesseract release/setup I've used are as follows: Go here: http://code.google.com/p/tesseract-ocr/downloads/list - For the basic english generic character set to get Tesseract up and running and recognising your bitmapped text into ascii text, use tesseract-2.00.eng.tar.gz (current version at time of writing is: "English language data for Tesseract (2.00 and up) Jul 2007 989 KB 84845") Related questions I have already looked at on Stack Overflow http://stackoverflow.com/questions/1335581/how-to-give-best-chance-of-success-to-an-ocr-software http://stackoverflow.com/questions/2296568/analysis-and-transformation-of-the-image-on-the-basis-of-this-analysis-for-better http://stackoverflow.com/questions/2268028/reading-characters-off-of-the-screen In these, my question is not completely answered or a commercial solution is being sold. I do not want to consider a commercial solution at this stage.

    Read the article

  • OpenGL - drawing 2D polygons shapes with texture

    - by plonkplonk
    I am trying to make a few effects in a C+GL game. So far I draw all my sprites as a quad, and it works. However, I am trying to make a large ring appear at times, with a texture following that ring, as it takes less memory than a quad with the ring texture inside. The type of ring I want to make is not a round-shaped GL mesh ring (the "tube" type) but a "paper" 2D ring. That way I can modify the "width" of the ring, getting more of the effect than a simple quad+ring texture. So far all my attempts have been...kind of ridiculous, as I don't understand GL's coordinates too well (and I can't really understand the available documentation...I am just a designer with no coder help or background. A n00b, basically). glBegin(GL_POLYGON); for(i = 0;i < 360; i += 10){ glTexCoord2f(0, 0); glVertex2f(Cos(i)*(H-10),Sin(i)H); glTexCoord2f(0, HP); glVertex2f(Sin(i)(H-10),Cos(i)*(H-10)); glTexCoord2f(WP, HP); glVertex2f(Cos(i)H,Sin(i)(H-10)); glTexCoord2f(WP, 0); glVertex2f(Sin(i)*H,Cos(i)*H); } glEnd(); This is my last attempt, and it seems to generate a "sunburst" from the right edge of the circle instead of a ring. It's an amusing effect but definitely not what I want. Other results included the circle looking exactly the same as the quad textured (aka drawing a sprite literally) or something that looked like a pop-art filter, by working on this train of thought. Seems like my logic here is entirely flawed, so, what would be the easiest way to obtain such a ring? No need to reply in code, just some guidance for a non-math-skilled user...

    Read the article

  • How to generate semi transparent shapes in php using gdlib

    - by fabbrillo
    Hi, this is the script i made // Create image $img = imagecreatetruecolor($w, $h); // Transparent image $white = imagecolorallocate($img,255,255,255); imagefilledrectangle($img,0,0,$w,$h,$white); imagecolortransparent($img, $white); //imagealphablending( $img, true ); //imagesavealpha( $img, true ); // Shape color $bgColor = imagecolorallocatealpha($img, 100, 250, 250, 70); imagefilledrectangle($img, 15, 20, 50, 100, $bgColor); imagefilledrectangle($img, 10, 25, 60, 100, $bgColor); imagepng($img, 'file.png'); the problem is the rectangles are transparent among them but not with the background i mean, i need to create a transparent image with a semi transparent shape inside any suggestions? thanks for your help

    Read the article

  • R: Creating Custom Shapes with ggplot

    - by Brandon Bertelsen
    Full Disclosure: This was also posted to the ggplot2 mailing list. (I'll update if I receive a response) I'm a bit lost on this one, I've tried messing around with geom_polygon but successive attempts seem worse than the previous. The image that I'm trying to recreate is this, the colours are unimportant, but the positions are: In addition to creating this, I also need to be able to label each element with text. At this point, I'm not expecting a solution (although that would be ideal) but pointers or similar examples would be immensely helpful. One option that I played with was hacking scale_shape and using 1,1 as coords. But was stuck with being able to add labels. The reason I'm doing this with ggplot, is because I'm generating scorecards on a company by company basis. This is only one plot in a 4 x 10 grid of other plots (using pushViewport) Note: The top tier of the pyramid could also be a rectangle of similar size.

    Read the article

  • How to generate irregular ball shapes?

    - by tomato
    What kind of algorithms would generate random "goo balls" like those in World of Goo. (btw, if you haven't played it yet, highly recommended). I'm using Proccesing, but any generic algorithm would do. I guess it boils down to how to "randomly" make balls that are kind of round, but not perfectly round, and still looking realistic. Thanks in advance!

    Read the article

  • Drawing outlines around organic shapes

    - by ThunderChunky_SF
    One thing that seems particularly easy to do in the Flash IDE but difficult to do with code is to outline an organic shape. In the IDE you can just use the inkbucket tool to draw a stroke around something. Using nothing but code it seems much trickier. One method I've seen is to add a glow filter to the shape in question and just mess with the strength. But what if i want to only show the outline? What I'd like to do is to collect all of the points that make up the edge of the shape and then just connect the dots. I've actually gotten so far as to collect all of the points with a quick and dirty edge detection script that I wrote. So now I have a Vector of all the points that makeup my shape. How do I connect them in the proper sequence so it actually looks like the original object? For anyone who is interested here is my edge detection script: // Create a new sprite which we'll use for our outline var sp:Sprite = new Sprite(); var radius:int = 50; sp.graphics.beginFill(0x00FF00, 1); sp.graphics.drawCircle(0, 0, radius); sp.graphics.endFill(); sp.x = stage.stageWidth / 2; sp.y = stage.stageHeight / 2; // Create a bitmap data object to draw our vector data var bmd:BitmapData = new BitmapData(sp.width, sp.height, true, 0); // Use a transform matrix to translate the drawn clip so that none of its // pixels reside in negative space. The draw method will only draw starting // at 0,0 var mat:Matrix = new Matrix(1, 0, 0, 1, radius, radius); bmd.draw(sp, mat); // Pass the bitmap data to an actual bitmap var bmp:Bitmap = new Bitmap(bmd); // Add the bitmap to the stage addChild(bmp); // Grab all of the pixel data from the bitmap data object var pixels:Vector.<uint> = bmd.getVector(bmd.rect); // Setup a vector to hold our stroke points var points:Vector.<Point> = new Vector.<Point>; // Loop through all of the pixels of the bitmap data object and // create a point instance for each pixel location that isn't // transparent. var l:int = pixels.length; for(var i:int = 0; i < l; ++i) { // Check to see if the pixel is transparent if(pixels[i] != 0) { var pt:Point; // Check to see if the pixel is on the first or last // row. We'll grab everything from these rows to close the outline if(i <= bmp.width || i >= (bmp.width * bmp.height) - bmp.width) { pt = new Point(); pt.x = int(i % bmp.width); pt.y = int(i / bmp.width); points.push(pt); continue; } // Check to see if the current pixel is on either extreme edge if(int(i % bmp.width) == 0 || int(i % bmp.width) == bmp.width - 1) { pt = new Point(); pt.x = int(i % bmp.width); pt.y = int(i / bmp.width); points.push(pt); continue; } // Check to see if the previous or next pixel are transparent, // if so save the current one. if(i > 0 && i < bmp.width * bmp.height) { if(pixels[i - 1] == 0 || pixels[i + 1] == 0) { pt = new Point(); pt.x = int(i % bmp.width); pt.y = int(i / bmp.width); points.push(pt); } } } }

    Read the article

  • Concept: Mapping irregular shapes (cartoons, sprites) to triangles in OpenGL ES

    - by Moshe
    I understand how mapping a triangle texture to a triangle works, but how do you map other things? I can't see myself mapping a circle onto a triangle. If it were a quad (square), I could see it happening, but why would a graphic not get warped on a triangle? EDIT: Bonus question: What are some good OpenGL ES tutorials online? Videos and articles count. (I've seen the Stanford University stuff on iTunes U and think it's excellent, but I want more.)

    Read the article

  • JTable cells not rendering shapes properly

    - by Andrew
    I'm trying to render my JTable cells with a subclassed JPanel and the cells should appear as coloured rectangles with a circle drawn on them. When the table displays initially everything looks OK but then when a dialog or something is displayed over the cells when it is removed the cells that have been covered do not rendered properly and the circles are broken up etc. I then have to move the scroll bar or extend the window to get them to redraw properly. The paintComponent method of the component I'm using to render the cells is below: protected void paintComponent(Graphics g) { setOpaque(true); super.paintComponent(g); Graphics2D g2d = (Graphics2D) g; GradientPaint gradientPaint = new GradientPaint(new Point2D.Double(0, 0), Color.WHITE, new Point2D.Double(0, getHeight()), paintRatingColour); g2d.setPaint(gradientPaint); g2d.fillRect(0, 0, getWidth(), getHeight()); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); Rectangle clipBounds = g2d.getClipBounds(); int x = new Double(clipBounds.getWidth()).intValue() - 15; int y = (new Double(clipBounds.getHeight()).intValue() / 2) - 6; if (level != null) { g2d.setColor(iconColour); g2d.drawOval(x, y, width, height); g2d.fillOval(x, y, width, height); } }

    Read the article

  • How would you code this: Grid-breaking shapes

    - by BeachRunnerJoe
    I'm a person that learns best from example. Currently, I'm diving into the field of Web Development after fifteen years of developing desktop apps. I'm still getting used to all the web technologies used for developing modern web sites and everywhere I look, I see cool little UI elements and question how they're implemented. So I thought I'd ask you, the web experts...the wexperts :) What are some straight forward or creative ways you could code this grid-breaking arrow... The basic layout for this page looks like... What would the html/css code look like? Would you split the image into multiple images or could you use a single image? I'm sure this is a really simple concept and it completely boggles me. I'm sorry if this is a strange question, remember I'm a noob! :) Thanks in advance for all your help! Here's a link to the original tutorial where I found these images

    Read the article

  • Can we move shape (Diamond) in C#

    - by Ani
    I want to move a Diamond Shape in the form(for example 2 pixels every 200ms) horizantally. I used the following code in From_Paint Event. private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Point p1 = new Point(5,0); Point p2 = new Point(10, 5); Point p3 = new Point(5, 10); Point p4 = new Point(0, 5); Point[] ps = { p1, p2, p3, p4, p1 }; g.DrawLines(Pens.Black, ps);} I know how to move a picturebox but how to do with shape. Thanks, Ani

    Read the article

  • How could I make geometry advanced operations on bezier paths?

    - by yizzreel
    I have a library that draws regular bezier path figures (complex paths formed of a lot of bezier points), using midpoint approximation. I can draw them without problem, but I need to add support for advanced geometry operations: Nearest point of a curve, intersection, figure contains point, and more importantly, path combinations: difference, intersection, exclusive-or, union, ... Is there any good source to get all this? Thanks

    Read the article

  • Area of a irregular shape

    - by Naveen
    I have set of points which lies on the image. These set of points form a irregular closed shape. I need to find the area of this shape. Does any body which is the normal algorithm used for calculating the area ? Or is there any support available in libraries such as boost? I am using C++.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >