Macaulay2 » Documentation
Packages » VectorGraphics :: place
next | previous | forward | backward | up | index | toc

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 p1, place (GraphicsCoordinate p1, GraphicsCoordinate p2), GraphicsCoordinate p2, place (GraphicsCoordinate p1, GraphicsCoordinate p2)}
                                       style => MutableHashTable{}
                  style => MutableHashTable{}

o3 : GraphicsList

Ways to use place :

For the programmer

The object place is a method function.