# Easy drawing of basic geometric objects: SimpleDrawingObjects

**URL:** https://discourse.julialang.org/t/easy-drawing-of-basic-geometric-objects-simpledrawingobjects/120741
**Category:** Package Announcements
**Tags:** plotting, visualization, geometry
**Created:** [September 30, 2024, 9:14pm UTC](https://discourse.julialang.org/t/easy-drawing-of-basic-geometric-objects-simpledrawingobjects/120741 "2024-09-30T21:14:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![scheinerman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scheinerman/32/35303_2.png) [@scheinerman](https://discourse.julialang.org/u/scheinerman)
#### Post date: [September 30, 2024, 9:14pm UTC](https://discourse.julialang.org/t/easy-drawing-of-basic-geometric-objects-simpledrawingobjects/120741/1 "2024-09-30T21:14:35Z")

</div>

There are full-featured, sophisticated Julia packages for plotting and visualization. Personally, I have found them to be so rich that they are difficult to learn and use (for me). To make drawing easier, I wrote [SimpleDrawing](https://docs.juliahub.com/General/SimpleDrawing/stable/) and now offer [SimpleDrawingObjects](https://docs.juliahub.com/General/SimpleDrawingObjects/stable/). These make drawing of basic geometric structures such as line segments, circles, and so on rather painless. Both are built on top of [Plots](https://docs.juliaplots.org/latest/).

For example, to draw a red circle, centered at the origin, with radius 1, and with line thickness 2, we have these choices:

Using `SimpleDrawing`:

```julia
draw_circle(0, 0, 1, linecolor = :red, linewidth = 2)

```

Using `SimpleDrawingObjects`:

```julia
C = Circle(0, 0, 1)
set_linewidth!(C, 2)
set_linecolor!(C, :red)
draw(C)

```

The advantage to the second approach is that the drawing attributes of `C` can be modified and then `C` can be redrawn.

I hope this makes other folks plotting as easy as:

```julia
using SimpleDrawing, SimpleDrawingObjects

function pie()
    s1 = Segment(0, 0, 1, 0)
    s2 = Segment(0, 0, sqrt(0.5), sqrt(0.5))
    a = Arc(0, 0, 1, 0, pi / 8, pi / 4)

    newdraw()
    draw([s1, s2, a])
end

```
