taiwanhilt.blogg.se

Reflection across x 3 formula
Reflection across x 3 formula








reflection across x 3 formula

Var t:Number = ((p.x - l.sx) * dx + (p.y - l.sy) * dy) / (dx * dx + dy * dy) Reflection about the y-axis: None Compressing and stretching depends on the value of a a. Return new Point(2 * l.sx - p.x, 2 * l.sy - p.y) Reflection about the x-axis: None The graph is reflected about the y-axis when g(x) f (x) g ( x) f ( - x). Here it is in actionscript: public static function reflect(p:Point, l:Line):Point

reflection across x 3 formula

I've found a formula which does this, but it seems as though it does not work with lines that look like they have equation y = x. Is there a simple way to calculate (x', y'), the reflection of point (x, y) in a line, where the line is described by the two points (x1, y1) and (x2, y2)? Edit:

  • My line is not described in the form y = ax + c (so I'd have to translate it, which is easy to do, but it means the process is slower). The following formula is used to reflect a coordinate point about the x-axis.
  • However there are two problems with this implementation for my needs: Given (x,y) and a line y = ax + c we want the point (x', y') reflected on the line. A reflection over the x-axis can be seen in the picture below in which point A is reflected to its image A.

    Reflection across x 3 formula how to#

    I have been looking at how to reflect a point in a line, and found this question which seems to do the trick, giving this formula to calculate the reflected point: TRgraph1 Vertical Reflection: Reflections are mirror images.










    Reflection across x 3 formula