|
ellipsoid_tree 0.1.0
Exact intersection tests for ellipsoids and friends
|
A world-coordinate 2D scene of drawable primitives with SVG and PNG writers. More...
#include <ellipsoid_tree/plot2d.hpp>
Public Member Functions | |
| void | add (const Ellipsoid &E, double tau, const Style &style) |
| Add geometric objects (world coordinates, y up) | |
| void | add (const Ball &B, const Style &style) |
| Add a ball to the scene. | |
| void | add (const Box &B, const Style &style) |
| Add an axis-aligned box to the scene. | |
| void | add (const Segment &S, const Style &style) |
| Add a line segment to the scene. | |
| void | add (const Simplex &S, const Style &style) |
| Add a simplex (drawn as a point, segment, or filled polygon) to the scene. | |
| void | add (const Halfspace &H, const Style &style) |
| Add a halfspace, drawn as a boundary line clipped to the plot bounds. | |
| void | add_marker (const Eigen::Ref< const Eigen::Vector2d > &pt, double radius_px, const Style &style) |
| Marker radius is in canvas pixels (independent of zoom) | |
| void | add_polyline (const Eigen::Ref< const Eigen::MatrixXd > &pts, const Style &style, bool closed=false) |
| Add a polyline through the given points, or a closed polygon when closed is true. | |
| void | add_text (const Eigen::Ref< const Eigen::Vector2d > &pt, std::string text, double size_px=12.0, Color color=colors::black(), TextAnchor anchor=TextAnchor::start) |
| Add a text label at pt (text size in canvas pixels). | |
| void | add_cg1_triangle (const Eigen::Ref< const Eigen::MatrixXd > &pts, double t0, double t1, double t2) |
| Triangle carrying normalized scalar values t in [0, 1] at its vertices: the PNG backend interpolates the VALUE barycentrically per pixel and applies the viridis colormap there, so the colormap curve is followed exactly even on coarse meshes (unlike Gouraud color interpolation). | |
| void | add_filled_triangle (const Eigen::Ref< const Eigen::MatrixXd > &pts, const Color &c0, const Color &c1, const Color &c2) |
| Triangle with per-vertex colors: barycentric color interpolation in the PNG backend (Gouraud); flat average-color fill in SVG. | |
| void | axes (bool on) |
| Axes with the physical extents of the drawn data (on by default) | |
| void | set_bounds (const Box &bounds) |
| Override the automatic (data + 5% pad) plot bounds. | |
| void | save_svg (const std::string &path, int width_px=900) const |
| Write the figure to an SVG file at the given pixel width. | |
| std::string | to_svg (int width_px=900) const |
| Return the figure as an SVG document string at the given pixel width. | |
| RenderedImage | render_rgb (int width_px=900) const |
| Rasterize the figure (white background, 1px antialiasing). | |
| void | save_png (const std::string &path, int width_px=900) const |
| Write the figure to a PNG file at the given pixel width. | |
A world-coordinate 2D scene of drawable primitives with SVG and PNG writers.
Add geometric objects (world coordinates, y up)
Add a ball to the scene.
Add an axis-aligned box to the scene.
Add a line segment to the scene.
Add a simplex (drawn as a point, segment, or filled polygon) to the scene.
Add a halfspace, drawn as a boundary line clipped to the plot bounds.
|
inline |
Marker radius is in canvas pixels (independent of zoom)
|
inline |
Add a polyline through the given points, or a closed polygon when closed is true.
|
inline |
Add a text label at pt (text size in canvas pixels).
|
inline |
Triangle carrying normalized scalar values t in [0, 1] at its vertices: the PNG backend interpolates the VALUE barycentrically per pixel and applies the viridis colormap there, so the colormap curve is followed exactly even on coarse meshes (unlike Gouraud color interpolation).
SVG falls back to a flat fill at the mean value.
|
inline |
Triangle with per-vertex colors: barycentric color interpolation in the PNG backend (Gouraud); flat average-color fill in SVG.
pts has shape (2, 3).
|
inline |
Axes with the physical extents of the drawn data (on by default)
|
inline |
Override the automatic (data + 5% pad) plot bounds.
|
inline |
Write the figure to an SVG file at the given pixel width.
|
inline |
Return the figure as an SVG document string at the given pixel width.
|
inline |
Rasterize the figure (white background, 1px antialiasing).
|
inline |
Write the figure to a PNG file at the given pixel width.