Re: How can I determine if a point is a given distance from a second point?



On Mar 31, 1:58 pm, thomasnguyencom <thomasnguyen...@xxxxxxxxx> wrote:
On Mar 31, 1:24 pm, "Tom P." <padilla.he...@xxxxxxxxx> wrote:

I am writing a drawing program but I want to keep the scale down
(there could end up being several hundred objects on the screen).

I want to limit the points collected to a certain distance from other
points already collected, in other words, if you're drawing a line it
will only record points on the line every 6 pixels. How do I determine
how far away one point is from another? if they are restricted to
straight lines that's fine but as soon as they draw at an angle I'm
faced with determining how far away one point is from another in co-
ordinate space.

Any help would be appreciated.

Tom P.

Point x = new Point(1, 2);
Point y = new Point(3, 4);
double distance = Point.Distance(x, y);

I hope that helps.

goodluck,
-tom

On second thought... no it doesn't help.

I'm not finding that static method. Am I missing a namespace or
something?

Tom P.
.



Relevant Pages

  • How can I check if a shape overlaps a hidden geometry section?
    ... with a rectangular geometry section to define the scale ... and starting distance of each section of the drawing. ... Way hidden so as not to clutter the drawing. ...
    (microsoft.public.visio.developer.vba)
  • Re: Depth of field difference between APS-C and full frame
    ... I would plug it into that calculator but I'm not sure how to figure the field of view at different focal lengths and focal distances. ... That calculator does include focal distance and there is a drawing but I don't know how the light bends to reproduce the drawing for these scenarios: ... 0.5m Furthest distance of acceptable sharpness ...
    (rec.photo.digital.slr-systems)
  • Re: Measuring Tool
    ... No need to create a drawing to measure distance. ... absolute space to absolute space, ... reference from, so I need a nearest point. ...
    (comp.cad.solidworks)
  • Re: How can I determine if a point is a given distance from a second point?
    ... points already collected, in other words, if you're drawing a line it ... If the distance cutoff is constant you're going to be executing this ... Tom P. ...
    (microsoft.public.dotnet.languages.csharp)