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++.
...
I want to design shape class. I need to distinguish several different shapes:
-Point
-Line
-Triangle
-Circle
-Polygons
The main purpose of this class is to calculate distance between two shapes.
I've all methods for calculating those distances, but I want to have a single method that can be used, it should looks like this:...
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 =...
Hello all,
Here I have to create a diamond using drawlines method and make it move horizontally along a path that is half way from the top of the form.
I created a diamond and it is moving horizontally, but i want it to start moving from a position which is half way from the top of the form.
This is the code to create a diamond,
...
I'm practicing my swing abilities for the upcoming test, and fried gave me idea to draw biohazard sign like this :
I could draw the circles with Elipse2D, but then I somehow need to cut those 3 triangles. Any ideas how I can do that ?
...
Hi. I have task to write program allowing users to draw stars, which can differ in size and amount of arms. When I was dealing with basic stars I was doing it with GeneralPath and tables of points :
int xPoints[] = { 55, 67, 109, 73, 83, 55, 27, 37, 1, 43 };
int yPoints[] = { 0, 36, 36, 54, 96, 72, 96, 54, 36, 36 };
Graph...
Hi,
I have a small library of a few shortest path search algorithms. They were developed for simple undirected graphs (the normal representation - vertices and edges). Now I'd like to somehow apply them on a bit different scenario - where the maps are represented as 2-dimensional shapes, connected by shared edges (edges of the polygons,...
Hi,
Can anyone tell me how to recognize geometric shape using C#?
I have geometric shapes like triangle, hexagon, pentagon, diamond, square,parallelogram, rectangle, etc.
I have drawn all these shapes using mspaint.
i have one picture box, using opendialog i am selecting any of the geometric shapes, into picturebox.
I want to identify...
Hi,
If I have a QuadCurve like this (+ = node):
+ +
\ ./
+--⁻⁻
And I fill it in Java 2D the result is something like this: (x = colored)
+xxxxxxxxx+
\xxxxxx./
+--⁻⁻
But I want to color the other side:
+ +
x\ ./x
xxx +--⁻⁻xx
xxxxxxxxxxx
This succeeds by drawing a rectangle around the curve in th...
Basically, i am creating a button in Oval shape. But my button label is too long to display in one line. So i wanted to split in to multiple lines. So the Oval button looks good.
My Problem is, How to enable word wrap on a Button?
Any suggestions?
...
Hi,
I have to draw an ellipse of arbitrary size and orientation pixel by pixel. It seems pretty easy to draw an ellipse whose major and minor axes align with the x and y axes, but rotating the ellipse by an arbitrary angle seems trickier. Initially I though it might work to draw the unrotated ellipse and apply a rotation matrix to eac...
I can't post images yet:
http://i.imgur.com/7Kci5.jpg
Using Actionscript 3 I'm drawing multiple Shapes onto a MovieClip [top drawing]. The end result I need is the bottom drawing. I originally thought it would be simple to just merge the shapes and then find a way to draw a border around the end result but I can't seem to find any way o...
I have a set of points, drawn by the user. They will be drawing around some objects.
I need to somehow turn this set of points into a shape, so I can find the area to detect collisions.
An image will clarify:
.
The best idea I have had so far involves iterating over every pixel determining if it is 'inside' or 'outside' the shape, b...
I want to apply an rotation to an uiimageview for shapes like "U" and "T" using compund objects and box2D, because "U" shapes are concave polygons so i can't do it using b2polygondef only.
Here it is the method to make an "u" shape box when the user click on the screen
// map from the world to the screen and screen to the world
#define...
I'm trying to create a resource Style for a Path (Shape), however, when creating several Paths that use the Style, only the first one is rendered.
//In resources xaml
<clr:String x:Key="path">M 50,50 L 35,15 A 8,10 0 0 1 65,15z</clr:String>
<Style TargetType="Path" x:Key="pathStyle">
<Setter Property="Stroke" Value="Black">
</Style...
I have an ArrayList of MCommand objects (cmdList) and I want to sort it so that shapes with closest points are next to each other in the ArrayList. For example, say I have three lines in the ArrayList:
line(xs, ys, zs, xe, ye, ze)
cmdList[0] = line1(1.3, 2.5, 3, 4, 5, 6)
cmdList[1] = line2(1, 5, 6.77, 7, 8, 2)
cmdList[2] = line3(1, 6,...
I have a path shape that I would like to combine lines that have different line thicknesses?
The StrokeThickness property is set on the Path object so I cannot change it for different lines. This same issue would arise if I wanted to change my line color.
The reason I want to do this is so that I can draw an arrowhead. Charles Petzold a...
I have an occupancy grid that has 3 states - Occupied, Free, Unknown. Occupancy grid is a simple 2 dimensional array of states. The grid represents a floor plan where Occupied=Wall, Free=Open Floor, Unknown=what's behind the wall or not mapped. This grid is say 800x800 wide with each cell representing 5cm of the real world.
I want to...
hello,
Im a new bee in flex , I want to draw different dynamic shapes.. a sample url is given below.
Any suggestion would be appreciated..
http://www.onlinelabels.com/maestro-label-design-software.htm
...
Hi,
I've created a custom toolbar using a gradient inside a shape. It looks very nice, but since we only have the option for 3 colors (startColor, centerColor, endColor) it looks very round. I would like to do a glass effect, which requires a sharp change in color in the middle. Basically I need 4 colors (startColor, justabovecenterC...