Distance to Nearest Quad Edge

  • Thread starter rebeka
  • Start date
  • Tags
    Edge
In summary, the conversation is about the equation k = \frac{2}{(2r+w)\sqrt{(x_0 - x_1)^2 - (y_0 - y_1)^2}} and the process of deriving it. The speakers discuss their thoughts on the equation, including its similarity to slope formula derivatives and its relation to a distance to a point equation. They also question the presence of a negative sign in the equation and seek clarification on the role of the determinant of the major line. The conversation ends with a typo being identified in the equation.
  • #1
rebeka
44
0
From this example

Anti-Aliasing section 22.4.1
http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter22.html

what does the following equation represent and how was it derived?

[tex]k = \frac{2}{(2r+w)\sqrt{(x_0 - x_1)^2 - (y_0 - y_1)^2}}[/tex]

I assume the 4 sets of linear equation coefficients are slope formula derivatives but I can't quite work it out! I assume there is something of a dot product going on in there but I'm really having a hard time putting it together and I won't use something in code(home project) until I understand it completely!

Thanks for any input,
BekaD:
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
I mean just for starters [tex]\frac{2}{r+2w} = \frac{1}{w}[/tex] looks to be [tex]\frac{1}{|\vec{U}|}[/tex] and [tex]\frac{1}{\sqrt{(x_0-x_1)^2 - (y_0-y_1)^2}}[/tex] looks to be [tex]\frac{1}{|\vec{V}|}[/tex] except that there's a negative in there? A few thoughts on that, inverted y screen coordinate <= probably not -.- ok one thought...

So then with [tex]\vec{e}[/tex] plugging the k into the first two coefficients of each looks to be just missing the [tex]\vec{U}[/tex] or [tex]\vec{V}[/tex] from a [tex]cos\theta[/tex]! The missing is obviously filled in when [tex]d_n = (x,y,1)\cdot\vec{e}[/tex] is expanded(proper wording??)... but what is the determinant of the major line doing being added to one and divided by the product of the magnitudes? And why is the resultant like two rotations and a magnitude(guessing)...

The one text I have Linear Algebra and Differential Equations says the following about a distance to a point:

The distance to a point [tex]d(U,V) = |\vec{U}-\vec{V}|[/tex] and well I have a really hard time reading Bernsteins Matrix Mathematics but if anyone knows something I should read in there :D

I could be on this one for a while...
 
  • #3
re the negative -- that equation is going to put a negative number in the square root whenever the line changes more in y than x? So, I'm guessing it's a typo and they mean + not - ...
 
  • #4
Zaphos said:
re the negative -- that equation is going to put a negative number in the square root whenever the line changes more in y than x? So, I'm guessing it's a typo and they mean + not - ...

'tis true... o-o
 

What is the "Distance to Nearest Quad Edge"?

The "Distance to Nearest Quad Edge" is a measurement used in computer graphics to determine the distance between a given point and the nearest edge of a quadrilateral shape.

Why is the "Distance to Nearest Quad Edge" important in computer graphics?

This measurement is important because it helps determine how a point should be rendered or shaded on a 2D surface. It is also used in algorithms to determine the visibility of objects in a scene.

How is the "Distance to Nearest Quad Edge" calculated?

The distance is calculated by finding the perpendicular distance between the given point and each edge of the quadrilateral, and then selecting the shortest distance as the "Distance to Nearest Quad Edge".

Is the "Distance to Nearest Quad Edge" always accurate?

No, the accuracy of this measurement depends on the complexity and shape of the quadrilateral, as well as the precision of the calculation method used.

Are there any other applications of the "Distance to Nearest Quad Edge" besides computer graphics?

Yes, this measurement can also be used in fields such as geography and urban planning to determine the distance between a point and the nearest boundary or edge of a region or city block.

Similar threads

  • Linear and Abstract Algebra
Replies
3
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
895
  • Special and General Relativity
Replies
11
Views
168
  • Classical Physics
Replies
3
Views
679
  • Classical Physics
Replies
0
Views
128
  • Introductory Physics Homework Help
Replies
6
Views
226
Replies
4
Views
804
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
Replies
3
Views
1K
Replies
3
Views
490
Back
Top