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

place -- Position a point relative to two other points

Synopsis

Description

Gives a point situated at position a along the line (p1,p2) in units where they are at distance 1, and at position b orthogonally to it. Only makes sense in 2d.

i1 : circ=Circle{Radius=>0.1,"fill"=>"red","stroke"=>"black"};
i2 : (p1,p2)=apply(([-1,-1],[1,1]),coord -> gNode(coord,circ,Draggable=>true))

o2 = (p1, p2)

o2 : Sequence
i3 : gList(Polygon{{p1,place(p1,p2,0.7,0.3),p2,place(p1,p2,0.7,-0.3)}},p1,p2)

o3 = GraphicsList{cache => CacheTable{}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           }
                  Contents => {Polygon{cache => CacheTable{}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            }, p1, p2}
                                       PointList => {GraphicsCoordinate{JsFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:70:29-70:61]*-      }, GraphicsCoordinate{JsFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:226:25-226:93]*-      }, GraphicsCoordinate{JsFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:70:29-70:61]*-      }, GraphicsCoordinate{JsFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:226:25-226:93]*-      }}
                                                                        RefPointFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:69:37-69:62]*-                      RefPointFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:225:33-225:76]*-                      RefPointFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:69:37-69:62]*-                      RefPointFunc => -*Function[/usr/share/Macaulay2/VectorGraphics.m2:225:33-225:76]*-
                                       style => MutableHashTable{}
                  style => MutableHashTable{}

o3 : GraphicsList

Ways to use place :

For the programmer

The object place is a method function.