42 argc > 1 ?
argv[1] :
"tikz_scene_example.tex";
47 std::cerr <<
"Cannot open output file: " <<
output_path <<
'\n';
52 scene.put_cartesian_axis()
53 .set_point_radius_mm(0.65);
67 for (
size_t i = 0; i <
arrangement.vertices.size(); ++i)
81 const Point source(72, 16);
82 const Point target(92, 16);
85 scene.visualize_shortest_path_with_portals(
101 "Scene API: arrangement + hull + shortest path"),
106 "Portals=" + std::to_string(
shortest.portals.size()) +
107 ", Hull vertices=" + std::to_string(
hull.size())),
114 <<
"Arrangement vertices: " <<
arrangement.vertices.size() <<
'\n'
115 <<
"Hull vertices: " <<
hull.size() <<
'\n'
117 <<
"Compile with: pdflatex " <<
output_path <<
'\n';
Andrew's monotonic chain convex hull algorithm.
Simple dynamic array with automatic resizing and functional operations.
T & append(const T &data)
Append a copy of data
Dynamic singly linked list with functional programming support.
T & append(const T &item)
Represents a point with rectangular coordinates in a 2D plane.
A general (irregular) 2D polygon defined by a sequence of vertices.
void add_vertex(const Point &point)
Add a vertex to the polygon.
void close()
Close the polygon.
Compute the full planar subdivision induced by a set of segments.
Represents a line segment between two points.
Compute the shortest Euclidean path between two points inside a simple polygon.
Represents a text string positioned at a 2D point.
static constexpr int Layer_Default
static constexpr int Layer_Foreground
static constexpr int Layer_Overlay
High-level scene wrapper to compose objects and algorithm visualizations.
Main namespace for Aleph-w library functions.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.
Tikz_Style tikz_path_style(const std::string &color="red", const bool with_arrow=false)
Creates a style optimized for polyline paths.
Tikz_Style make_tikz_draw_style(const std::string &draw_color)
Create a basic draw style with a custom color.
Tikz_Style tikz_wire_style(const std::string &color="black", const bool dashed=false, const bool with_arrow=false)
Creates a style optimized for wireframe segments and polygons.
Tikz_Style tikz_area_style(const std::string &draw_color="black", const std::string &fill_color="gray!25", const double opacity=0.6)
Creates a style for drawing filled polygons.
Tikz_Style tikz_points_style(const std::string &color="black", const double opacity=-1.0)
Creates a style optimized for point clouds.
Result bundle for shortest-path + funnel portal visualization.
Array< FunnelPortal > portals