31 std::string
output_path =
"tikz_scene_beamer_example.tex";
34 for (
int i = 1; i <
argc; ++i)
36 const std::string
arg =
argv[i];
37 if (
arg ==
"--handout")
46 std::cerr <<
"Cannot open output file: " <<
output_path <<
'\n';
51 scene.put_cartesian_axis()
52 .set_point_radius_mm(0.70);
55 const Point source(2, 16);
56 const Point target(22, 16);
59 scene.visualize_shortest_path_with_portals(
73 "Tikz_Scene beamer export: portals=" +
74 std::to_string(
shortest.portals.size())),
80 opts.frame_options =
"t";
81 opts.class_options =
"aspectratio=169";
89 <<
"Mode: " << (
handout ?
"handout" :
"beamer") <<
'\n'
90 <<
"Portals: " <<
shortest.portals.size() <<
'\n'
91 <<
"Compile with: pdflatex " <<
output_path <<
'\n';
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 shortest Euclidean path between two points inside a simple polygon.
Represents a text string positioned at a 2D point.
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.
Options used by Tikz_Scene beamer/handout export helpers.
std::string frame_title
Frame title used by scene exports.