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

Circle -- An SVG circle

Description

An SVG circle. The two compulsory options are Center (coordinates of the center) and Radius (radius). Instead of the radius, one can specify any point of the circle. In 3d, gives a decent approximation of a sphere.

i1 : Circle{Center=>vector {10,10},Radius=>1,"fill"=>"green","stroke"=>"none"}

o1 = Circle{cache => CacheTable{}              }
            Center => GraphicsCoordinate | 10 |
                                         | 10 |
                                         |  0 |
                                         |  1 |
            Radius => 1
            style => MutableHashTable{...2...}

o1 : Circle
i2 : Circle{[10,10],1} -- equivalent syntax for coordinates

o2 = Circle{cache => CacheTable{}              }
            Center => GraphicsCoordinate | 10 |
                                         | 10 |
                                         |  0 |
                                         |  1 |
            Radius => 1
            style => MutableHashTable{}

o2 : Circle
i3 : gList apply(10,i->Circle{<|2*pi*i/10,(1+sqrt 5)/2|>,1}) -- another syntax: polar coordinates

o3 = GraphicsList{cache => CacheTable{}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    }
                  Contents => {Circle{cache => CacheTable{}                   }, Circle{cache => CacheTable{}                   }, Circle{cache => CacheTable{}                   }, Circle{cache => CacheTable{}                   }, Circle{cache => CacheTable{}                    }, Circle{cache => CacheTable{}                       }, Circle{cache => CacheTable{}                    }, Circle{cache => CacheTable{}                    }, Circle{cache => CacheTable{}                    }, Circle{cache => CacheTable{}                    }}
                                      Center => GraphicsCoordinate | 1.61803 |          Center => GraphicsCoordinate | 1.30902 |          Center => GraphicsCoordinate |    .5   |          Center => GraphicsCoordinate |   -.5   |          Center => GraphicsCoordinate | -1.30902 |          Center => GraphicsCoordinate |   -1.61803  |          Center => GraphicsCoordinate | -1.30902 |          Center => GraphicsCoordinate |    -.5   |          Center => GraphicsCoordinate |    .5    |          Center => GraphicsCoordinate |  1.30902 |
                                                                   |    0    |                                       | .951057 |                                       | 1.53884 |                                       | 1.53884 |                                       |  .951057 |                                       | 1.98152e-16 |                                       | -.951057 |                                       | -1.53884 |                                       | -1.53884 |                                       | -.951057 |
                                                                   |    0    |                                       |    0    |                                       |    0    |                                       |    0    |                                       |     0    |                                       |      0      |                                       |     0    |                                       |     0    |                                       |     0    |                                       |     0    |
                                                                   |    1    |                                       |    1    |                                       |    1    |                                       |    1    |                                       |     1    |                                       |      1      |                                       |     1    |                                       |     1    |                                       |     1    |                                       |     1    |
                                      Radius => 1                                       Radius => 1                                       Radius => 1                                       Radius => 1                                       Radius => 1                                        Radius => 1                                           Radius => 1                                        Radius => 1                                        Radius => 1                                        Radius => 1
                                      style => MutableHashTable{}                       style => MutableHashTable{}                       style => MutableHashTable{}                       style => MutableHashTable{}                       style => MutableHashTable{}                        style => MutableHashTable{}                           style => MutableHashTable{}                        style => MutableHashTable{}                        style => MutableHashTable{}                        style => MutableHashTable{}
                  style => MutableHashTable{}

o3 : GraphicsList

Types of Circle:

  • Light -- A source of light

For the programmer

The object Circle is an instance of the type GraphicsType, with ancestor classes Ellipse < GraphicsObject < GraphicsAncestor < HashTable < Thing.


The source of this document is in VectorGraphics.m2:1880:0.