next | previous | forward | backward | up | top | index | toc | Macaulay2 website
VectorGraphics :: projection

projection -- Orthogonal projection on a line

Synopsis

Description

Gives the orthogonal projection of p on the line defined by p1, p2.

i1 : circ=Circle{Radius=>10,"fill"=>"red","stroke"=>"black",Draggable=>true,TransformMatrix => translation [100,100]};
i2 : gList(Line{circ,projection(circ,vector{0,0},vector{0,1}),"stroke"=>"red"},Line{circ,projection(circ,vector{0,0},vector{1,0}),"stroke"=>"red"},circ,Axes=>true,Margin=>0.15)

o2 = GraphicsList{Axes => true                                                                                                                                                                                                                                                                                          }
                  cache => CacheTable{}
                  Contents => {Line{cache => CacheTable{}                                                                                                             }, Line{cache => CacheTable{}                                                                                                             }, circ}
                                    Point1 => GraphicsCoordinate{JsFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:70:29-70:61]*-      }          Point1 => GraphicsCoordinate{JsFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:70:29-70:61]*-      }
                                                                 RefPointFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:69:37-69:62]*-                                        RefPointFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:69:37-69:62]*-
                                    Point2 => GraphicsCoordinate{JsFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:306:25-306:82]*-      }        Point2 => GraphicsCoordinate{JsFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:306:25-306:82]*-      }
                                                                 RefPointFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:305:33-305:91]*-                                      RefPointFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:305:33-305:91]*-
                                    style => MutableHashTable{...1...}                                                                                                        style => MutableHashTable{...1...}
                  Margin => .15
                  style => MutableHashTable{}

o2 : GraphicsList

Ways to use projection :

For the programmer

The object projection is a method function.