add_orientation_JamPolygon | R Documentation |
Define orientation for each polygon, clockwise or counterclockwise
add_orientation_JamPolygon(
jp,
flip_sign = 1,
include_holes = FALSE,
include_clockwise = FALSE,
include_parent = FALSE,
verbose = FALSE,
...
)
jp |
|
flip_sign |
|
include_holes , include_clockwise , include_parent |
|
verbose |
|
... |
additional arguments are ignored |
Todo:
When polygons are nested, which is intended to create holes inside one larger polygon, the hole should have its orientation flipped so that the border is drawn on the opposite side per its orientation. So the task is to determine whether a polygon is the hole of another polygon.
JamPolygon
with column "orientation"
added to
slot "polygons".
Other JamPolygon:
JamPolygon-class
,
Venndir-class
,
[,JamPolygon,ANY,ANY,ANY-method
,
area_JamPolygon()
,
bbox_JamPolygon()
,
buffer_JamPolygon()
,
check_JamPolygon()
,
check_Venndir()
,
eulerr_to_JamPolygon()
,
farthest_point_JamPolygon()
,
find_venn_overlaps_JamPolygon()
,
has_point_in_JamPolygon()
,
intersect_JamPolygon()
,
label_fill_JamPolygon()
,
label_outside_JamPolygon()
,
label_segment_JamPolygon()
,
labelr_JamPolygon()
,
minus_JamPolygon()
,
nearest_point_JamPolygon()
,
nudge_JamPolygon()
,
plot.JamPolygon()
,
point_in_JamPolygon()
,
polyclip_to_JamPolygon()
,
polygon_circles()
,
polygon_ellipses()
,
sample_JamPolygon()
,
split_JamPolygon()
,
union_JamPolygon()
,
update_JamPolygon()
df3 <- data.frame(name=c("polygon1", "polygon2"),
label=c("polygon1", "polygon2"),
x=I(list(
list(c(1, 6, 6, 1),
c(2, 5, 5, 2),
c(3, 4, 4, 3)),
list(#c(11, 16, 16, 11),
c(12, 15, 15, 12),
c(13, 14, 14, 13))
)),
y=I(list(
list(c(1, 1, 6, 6),
c(2, 2, 5, 5),
c(3, 3, 4, 4)),
list(#c(1, 1, 6, 6),
c(2, 2, 5, 5),
c(3, 3, 4, 4))
)),
fill=c("gold", "firebrick"))
jp3 <- new("JamPolygon", polygons=df3);
plot(jp3);
add_orientation_JamPolygon(jp3,
include_holes=TRUE,
include_clockwise=TRUE,
include_parent=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.