gadfly shapes
This commit is contained in:
parent
1a490551e6
commit
56cf25eebf
@ -217,18 +217,11 @@ function hexagon(xs::AbstractArray, ys::AbstractArray, rs::AbstractArray)
|
|||||||
r = rs[mod1(i, length(rs))]
|
r = rs[mod1(i, length(rs))]
|
||||||
u = 0.6r
|
u = 0.6r
|
||||||
|
|
||||||
# make a "plus sign"
|
|
||||||
polys[i] = Tuple{Compose.Measure, Compose.Measure}[
|
polys[i] = Tuple{Compose.Measure, Compose.Measure}[
|
||||||
(x-r, y-u), (x-r, y+u), # L edge
|
(x-r, y-u), (x-r, y+u), # L edge
|
||||||
# (x-u, y+u), # BL inside
|
(x, y+r), # B
|
||||||
# (x-u, y+r), (x+u, y+r), # B edge
|
|
||||||
(x, y+r),
|
|
||||||
# (x+u, y+u), # BR inside
|
|
||||||
(x+r, y+u), (x+r, y-u), # R edge
|
(x+r, y+u), (x+r, y-u), # R edge
|
||||||
(x, y-r)
|
(x, y-r) # T
|
||||||
# (x+u, y-u), # TR inside
|
|
||||||
# (x+u, y-r), (x-u, y-r), # T edge
|
|
||||||
# (x-u, y-u) # TL inside
|
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -246,16 +239,11 @@ function octagon(xs::AbstractArray, ys::AbstractArray, rs::AbstractArray)
|
|||||||
r = rs[mod1(i, length(rs))]
|
r = rs[mod1(i, length(rs))]
|
||||||
u = 0.4r
|
u = 0.4r
|
||||||
|
|
||||||
# make a "plus sign"
|
|
||||||
polys[i] = Tuple{Compose.Measure, Compose.Measure}[
|
polys[i] = Tuple{Compose.Measure, Compose.Measure}[
|
||||||
(x-r, y-u), (x-r, y+u), # L edge
|
(x-r, y-u), (x-r, y+u), # L edge
|
||||||
# (x-u, y+u), # BL inside
|
|
||||||
(x-u, y+r), (x+u, y+r), # B edge
|
(x-u, y+r), (x+u, y+r), # B edge
|
||||||
# (x+u, y+u), # BR inside
|
|
||||||
(x+r, y+u), (x+r, y-u), # R edge
|
(x+r, y+u), (x+r, y-u), # R edge
|
||||||
# (x+u, y-u), # TR inside
|
|
||||||
(x+u, y-r), (x-u, y-r), # T edge
|
(x+u, y-r), (x-u, y-r), # T edge
|
||||||
# (x-u, y-u) # TL inside
|
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user