Offset The Points In A Polygon Without Having To Change Each One Individually The Points Are In An Array?
Apr 20, 2010
is there a way to offset the points in a polygon without having to change each one individually the points are in an array
View 2 Replies
ADVERTISEMENT
Jan 31, 2010
how can i get the points which make a polygon from a region which was derived from the polygon's points?
View 1 Replies
Jan 31, 2010
how can i inflate an array of points which describe a polygon?
View 1 Replies
Apr 11, 2012
how can i calculate the 13 points on the polygon (see image)?
the 2 points either side of the centre points
are +/- width or height * 0.2761423749154
i have 4 known points, topLeft, topRight, bottomRight, + bottomLeft.
the polygon won't always be a regular rectangle as it is in the image
View 11 Replies
Feb 9, 2011
I'm making a game for a school project We've created a character that moves around the screen and creates blocks behind him as he moves around.We want to make it so that when the character moves from one edge of the screen to another, it fills the screen. So in order to do this we have a Points array that stores every point the character touches on his way to a wall.We then fill the Points array with "formsurface.fillPolygon(Points)"Now I'm wondering is there anyway we can retrieve all the points that are WITHIN or INSIDE the Points array we made? ( remember the points array simply contains the outline or the path the character created, we're filling inside that outline)
View 1 Replies
Oct 2, 2009
I'm trying to create an array of Points but can't seem to get it right.
I can create an array of Integers just fine.
Dim MyArray() as Integer = {1,2,3,4,5}
View 3 Replies
Mar 23, 2012
how can i sort an array of points...? elements added out of sequence causing wrong shapes with e.graphics.drawlines.
View 12 Replies
Sep 29, 2011
I have an application in which I am analyzing a system where there are a large number of interactions. And I need to make certain choices based on the frequency of the occurrences of unique items in the system. For example, if you had this list of letters:A, B, F, G, A, T, S, B, S, B, S, Q, Z, B, Q, S..[code]The above is a tiny example, but I've attached an image which is a simple line graph of a larger system..In this graph the numbers along the bottom aren't really important. They are just marking the number of unique frequencies. And the Y-axis marks the value of that frequency. What I'm looking for is a mathematical/programmatic way to find the point where that line begins to break upwards. My searches haven't yielded what I'm looking for as I'm not really sure what the proper terminology is, or the name of the concept.Right now, we have to manually choose that point based on a human looking at the numbers and saying "here". But I want to, at the very least, already have a "recommended" value chosen, and at the most, be able to remove the human component completely.
For clarification, my current algorithm is producing a list of number pairs occurrence to occurrence frequency. My use of the word "frequency" in no way relates to electromagnetic signals, but rather to how often an occurrence occurs. But I thought that saying "occurrence occurrences" would be more confusing! In this system, the general trend is that a few entities will show up in a large number of interactions, more entities will show up in a medium number of interactions, but the greatest number of entities will show up in just a few, or even no, interactions. It would be tough to imagine a scenario where it was different than that... worst case would probably be a plateau. But there could definitely be a dip after a jump at any point from the beginning to the end. The illustration above just doesn't show that. We cannot assume that there will be a point where it will begin to rise with no drops afterwards.Ultimately what I'm trying to determine is the importance of an entity based on how often it occurs in the system. I need to be able to flag certain items as "important", but all items can't be important. And the method/algorithm I'm looking for would help to identify at what point in that list do I stop considering items important. If you look at the list, you can see where the lower occurrences start becoming more frequent. I don't think that I can sort on the right column because the left column is really the key data. Greater occurrences = more importance.
View 3 Replies
Oct 21, 2009
Edit 9-7-2011: I am still hoping for an answer for this question. There's been a couple of good they have ultimately not sent me in the direction that helped me get the answer.I have an application in which I am analyzing a system where there are a large number of interactions. And I need to make certain choices based on the frequency of the occurrences of unique items in the system. For example, if you had this list of letters:
Here is a list showing how often each letter occurs (occurrences):
A - 2
B - 4
[code].....
View 4 Replies
Mar 2, 2009
I'm trying to generate a list of random points of a 2d array.
ie
(1,0)
(2,1)
(1,2)
(0,0)
(0,1)
....
I need to process each array location, but I would like it to be in a random order.
View 5 Replies
May 9, 2011
I have an global array of points that i want to plot in VB. say X and Y points, and typically they have values of +/-12000. Now I've not done graphics work for a long time and when I did, I used OpenGL with C. Now I need a GUI i'm using VB 2008. Firstly, what's the best method of rendering the array of points? should I use some port of OpenGL? GDI? or what?
Secondly, can I simply print to perhaps a Panel on hit of a button? Thirdly, do I have to place any line drwing code in an "OnPaint" event handler? Finally (for now) if my array represents points in a space much larger than the painting surface, how would I scale and scroll the final image within the the proposed Panel? I look forward to your advice.
View 3 Replies
Apr 30, 2010
I've rewritten my program so it would be more .net friendly (meaning I try to draw in picturebox.Paint event).
I try to use DrawLines using array of points, which are added by user one by one, but I can't figure out how to force my program to only use points that have been set by user and not the whole array.
When I call DrawLines pointing at my array of eg. 10 points and only 5 had been set, I end up with a nice set of lines with the last going to the upper left corner (0,0) and supposedly staying there for 4 more points, which is unacceptable.
I think of using ReDim Preserve each time, but I am not sure if it is the most efficient way to do this.
Anyone can think of something more elegant before I implement this redim monstrosity?
View 4 Replies
Jun 21, 2012
I have an array of type Double() (1 x n) that I am trying to quickly plot on a graph I've already set up. The only thing I want/need to do is take my array and store it as data points (y-axis values) in the series I already have. What's the best way to do this? Also, will the data points that are plotted change as my array changes, and if not, how would I replot those new points and get rid of the old points?
View 1 Replies
Jun 19, 2011
In window textbox, I'd like to just allow 2 decimal points only. I could set text box only numeric but don't know how to limit 2 decimal points.[code]...
View 3 Replies
Apr 14, 2012
I want two decimal points value. I have used this code
lblNo.Text = Math.Round(CDec(txtNo.Text + (txtNo.Text * 0.2)), 2).ToString()
If i have value as 1.32 then its ok but if i have value like 2.3 it shows 2.3 but i want value as 2.30 How can i get this value.
View 3 Replies
Oct 8, 2009
I want to find out the X and Y position of a point which is halfway between a point and another point, in VB.net. Since there is no "direction" property (which would make this much easier...), I have no idea how to do this.
C# code is acceptable as well, though I would prefer vb as it wouldn't require a port.
View 6 Replies
Feb 6, 2012
i have this code in vb and i want to know how to make it to add decimal points
Dim a, b As Integer
a = CSng(TextBox1.Text)
b = CSng(TextBox2.Text)
Dim result As Single
result = a + b
Lb_sum.Text = result
for example if i add 4.2 + 4.4 its show 8 instaid of 8.6
View 2 Replies
Jul 13, 2011
I am drawing an arc within a square or a polygon with the maximum possible radius inside.When the arc is drawn within the boundary of the square or polygon,the arc length will intersect at few points on the square or polygon.How to find the coordinates of the intersecting points of arc at the periphery of the square/ polygon?
View 2 Replies
Aug 14, 2009
This thread (Question) is a continuation of a question answered by JohnWein. the original question asked by me in this thread:http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/4d9b44a0-91ed-4f64-a3a2-74afffce2256 an this is the answer:
[Code]...
The question is, in the case of four connections, how can I make sure that all points are connected with minimum number of connections using the same above code?
View 1 Replies
Mar 18, 2006
Is there a way of converting pixels to points? The dimensions in VB are in pixels, but Office COM such as WordApp.Resize are expressed in points. So trying to align app windows is a mess.I guess the ratio of pixels to points varies from one monitor to another(?), so this would need to be calculated at run time.I tried a nifty trick of doing Me.Font.SizeInPoints / Me.FontHeight but that doesnt seem to be quite right or a very sensible way of doing it.
View 2 Replies
Mar 14, 2012
I have some text I would like to extract from a file. I know what comes before it and what comes after it but the text will be variable. I was thinking read it in line by line until i found the line which is the indicator of the text starting to the indicator that it is ending.[code]...
View 7 Replies
May 13, 2009
I have a question about drawing lines. Most of the code snippets I've seen approach drawing a line with the mouse down as the startpoint and the mouse up as the endpoint. But I am trying to draw a line by startpoint as
a mouse click and then an endpoint as a mouse click just as you do on a typical cad program.
View 8 Replies
Nov 10, 2007
How to eliminate decimal points in VB.net.what kind of function should i use.
For example, i have number x= 23.13 i only want to show x= 23 and if i have another number x=23.89 i also only want to show x= 23
[code]...
View 14 Replies
May 15, 2010
I'm building a card game called 11-UP. See the game here.I've gotten to the point where I need to make scores show up when the selected cards have a sum of 11. For example, if the card is worth 200 points, then "200" should become visible for about a second and then "float away".
I know I can do this with a timer and the location property. I was thinking of creating an array of 22 timers, one for each card. When the selected cards have a sum of eleven, I enable the timers for each selected card. The timer makes the "score" for that card appear, then move up a few times, then vanish.
Does anyone have a better way to do it? Maybe with only one timer?Also, how could I make the "scores" become more transparent as time advances? I'd like to make them not only float away, but also "disolve."
View 13 Replies
Jan 30, 2010
how can i get the points which make a polygon from a region which was derived from the polygon's points?
View 2 Replies
Sep 24, 2009
How to allow two numbers after decimal points ?
View 1 Replies
Nov 2, 2011
I have a collection which is a list of points, and I need to mix them all up before passing them into an algorithm - similar to if i was to pour them into a bad and shake the bag up.
how i might approach this? The collection will always have a different number of points in it..
View 9 Replies
Aug 17, 2010
I have a set of points. The connections among them areenerated. How can Draw lines between theconnected points?In the example below, Plist is the connection list among them. How can I store points to PList so that it draw lines?
Public Class Form1
Dim Matt(7, 7) As Integer
Dim NumberofConnections As Integer
[code].....
View 4 Replies
Apr 7, 2012
I need to check if "4.1.1.1" (example) is greater than "4.1.4" (False in this case), how can I do this in VB.Net when there are multiple decimal points in the 'integer'?
View 1 Replies
May 17, 2011
How do I make a label add points?In other words I have a label with the text of "0" If I click a certain button I want the label to become "1" displaying that as the amount of points.If I click another button that gives 2 points I would want the label to change to "3".Get it? Hope I was clear.
If TextBox1.Text = "Blah Blah Blah" Then
TextBox1.Text = "Generate a New Code - Points + 2"
Label2.Text = +2
End If
View 4 Replies